Bug 38492 - Some javascript translatable strings do not get picked up for translation
Summary: Some javascript translatable strings do not get picked up for translation
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on: 36453
Blocks:
  Show dependency treegraph
 
Reported: 2024-11-20 10:40 UTC by Pedro Amorim
Modified: 2024-11-20 13:21 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 38492: Update occurrences of _() to __() (6.26 KB, patch)
2024-11-20 10:41 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-11-20 10:40:08 UTC

    
Comment 1 Pedro Amorim 2024-11-20 10:41:21 UTC
Created attachment 174832 [details] [review]
Bug 38492: Update occurrences of _() to __()

Test plan, ktd:
1) Generate translation files
$ gulp po:update --lang de-DE
2) Verify that strings using _() do not exist on the pot file:
$ cat -n misc/translator/Koha-messages-js.pot | grep "Copied!"
$ cat -n misc/translator/Koha-messages-js.pot | grep "Form not submitted because of the following problem"
$ cat -n misc/translator/Koha-messages-js.pot | grep "No matches found"
3) Apply patch. Repeat test plan.
Comment 2 Pedro Amorim 2024-11-20 10:41:35 UTC
Questions:
1) Is function _(s) in staff-global.js and onboarding.js necessary?
2) Should we add this rule to the qa script (need to use double underscore in .js files, not single underscore)?
Comment 3 Katrin Fischer 2024-11-20 10:52:06 UTC
Treating this one as a "follow-up" and picking it for master. Reviewed changes carefully.
Comment 4 Jonathan Druart 2024-11-20 11:29:59 UTC
(In reply to Pedro Amorim from comment #2)
> Questions:
> 1) Is function _(s) in staff-global.js and onboarding.js necessary?

Yes you have to define it, otherwise the calls will fail.

> 2) Should we add this rule to the qa script (need to use double underscore
> in .js files, not single underscore)?

yes, there is an issue already.
https://gitlab.com/koha-community/qa-test-tools/-/issues/55
Comment 5 Katrin Fischer 2024-11-20 13:21:40 UTC
Pushed for 24.11!

Well done everyone, thank you!