The string "Waiting at %s, %s since %s." in koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc is missing in Weblate. Is there a problem with the string extraction?
We found out today that the strings hadn't been synced properly for a little while. Please check again tomorrow!
Indeed, please check again tomorrow.
This is valid.
Created attachment 174672 [details] [review] Bug 38450: Fix some translation pickups _("This %s is picked").format(foo) _("This %s is NOT picked".format(bar)) Both constructs are valid, but our translation script does not pick the second one. I found very few occurrences (using `git grep '.".format('`) that are displayed on the UI. I don't have the time right now to deep dive into the translation script to fix this problem, easier to adjust the occurrences. How to prevent that in the future however? We could raise a warning from the QA script. Test plan: Do not apply this patch Generate the strings (`gulp po:update --lang LANG`) cd misc/translator/po && git commit -a -m"wip" Apply this patch, regenerate the strings cd misc/translator/po && git diff Notice the changes, you should see new translations added to the .po files. Ideally translate them, install the templates and confirm that the new strings are translated on the UI.
(In reply to Jonathan Druart from comment #4) > How to prevent that in the future however? We could raise a warning from > the QA script. Opened https://gitlab.com/koha-community/qa-test-tools/-/issues/89
Created attachment 175013 [details] [review] Bug 38450: Fix some translation pickups _("This %s is picked").format(foo) _("This %s is NOT picked".format(bar)) Both constructs are valid, but our translation script does not pick the second one. I found very few occurrences (using `git grep '.".format('`) that are displayed on the UI. I don't have the time right now to deep dive into the translation script to fix this problem, easier to adjust the occurrences. How to prevent that in the future however? We could raise a warning from the QA script. Test plan: Do not apply this patch Generate the strings (`gulp po:update --lang LANG`) cd misc/translator/po && git commit -a -m"wip" Apply this patch, regenerate the strings cd misc/translator/po && git diff Notice the changes, you should see new translations added to the .po files. Ideally translate them, install the templates and confirm that the new strings are translated on the UI. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 175256 [details] [review] Bug 38450: Fix some translation pickups _("This %s is picked").format(foo) _("This %s is NOT picked".format(bar)) Both constructs are valid, but our translation script does not pick the second one. I found very few occurrences (using `git grep '.".format('`) that are displayed on the UI. I don't have the time right now to deep dive into the translation script to fix this problem, easier to adjust the occurrences. How to prevent that in the future however? We could raise a warning from the QA script. Test plan: Do not apply this patch Generate the strings (`gulp po:update --lang LANG`) cd misc/translator/po && git commit -a -m"wip" Apply this patch, regenerate the strings cd misc/translator/po && git diff Notice the changes, you should see new translations added to the .po files. Ideally translate them, install the templates and confirm that the new strings are translated on the UI. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed for 25.05! Well done everyone, thank you!
Nice work everyone! Pushed to 24.11.x for 24.11.01
Hi Jonathan, We are testing this patchset for backport to 24.05.x I would like to check I am testing it correctly please: === BEFORE APPLYING PATCH ON 24.05.X kohadev-koha@kohadevbox:koha((4470b0f18cc...))$ gulp po:update --lang en-NZ [20:46:41] Using gulpfile /kohadevbox/koha/gulpfile.js [20:46:41] Starting 'po:update'... [20:46:41] Starting 'po_update_marc_marc21'... [20:46:41] Starting 'po_update_marc_unimarc'... [20:46:41] Starting 'po_update_staff'... [20:46:41] Starting 'po_update_opac'... [20:46:41] Starting 'po_update_pref'... [20:46:41] Starting 'po_update_messages'... [20:46:41] Starting 'po_update_messages_js'... [20:46:41] Starting 'po_update_installer'... [20:46:41] Starting 'po_update_installer_marc21'... [20:46:41] Starting 'po_update_installer_unimarc'... [20:46:41] Finished 'po_update_pref' after 452 ms [20:46:42] Finished 'po_update_installer_unimarc' after 511 ms [20:46:42] Finished 'po_update_installer' after 513 ms [20:46:42] Finished 'po_update_installer_marc21' after 573 ms [20:46:42] Finished 'po_update_messages_js' after 719 ms [20:46:42] Finished 'po_update_marc_unimarc' after 1.03 s [20:46:42] Finished 'po_update_opac' after 1.04 s [20:46:42] Finished 'po_update_marc_marc21' after 1.42 s [20:46:43] Finished 'po_update_messages' after 2.07 s [20:46:45] Finished 'po_update_staff' after 3.51 s [20:46:45] Finished 'po:update' after 3.51 s kohadev-koha@kohadevbox:koha((4470b0f18cc...))$ cd misc/translator/po && git commit -a -m"wip" Success, pre-commit checks passed HEAD detached at upstream/24.05.x Untracked files: (use "git add <file>..." to include in what will be committed) ../Koha-installer-MARC21.pot ../Koha-installer-UNIMARC.pot ../Koha-installer.pot ../Koha-marc-MARC21.pot ../Koha-marc-UNIMARC.pot ../Koha-messages-js.pot ../Koha-messages.pot ../Koha-opac-bootstrap.pot ../Koha-pref.pot ../Koha-staff-prog.pot nothing added to commit but untracked files present (use "git add" to track) kohadev-koha@kohadevbox:po((4470b0f18cc...))$ --- AFTER APPLYING PATCH ON 24.05.x kohadev-koha@kohadevbox:koha((4470b0f18cc...))$ git cherry-pick 07bb1730fc78e8148caff0ebcf0cba22ba0a4f9f Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc Auto-merging koha-tmpl/intranet-tmpl/prog/js/checkouts.js Auto-merging koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js [detached HEAD 46aa2dd71e7] Bug 38450: Fix some translation pickups Author: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Date: Mon Nov 18 10:57:22 2024 +0100 4 files changed, 6 insertions(+), 6 deletions(-) kohadev-koha@kohadevbox:koha((46aa2dd71e7...))$ kohadev-koha@kohadevbox:koha((46aa2dd71e7...))$ kohadev-koha@kohadevbox:koha((46aa2dd71e7...))$ kohadev-koha@kohadevbox:koha((46aa2dd71e7...))$ gulp po:update --lang en-NZ [20:37:52] Using gulpfile /kohadevbox/koha/gulpfile.js [20:37:52] Starting 'po:update'... [20:37:52] Starting 'po_update_marc_marc21'... [20:37:52] Starting 'po_update_marc_unimarc'... [20:37:52] Starting 'po_update_staff'... [20:37:52] Starting 'po_update_opac'... [20:37:52] Starting 'po_update_pref'... [20:37:52] Starting 'po_update_messages'... [20:37:52] Starting 'po_update_messages_js'... [20:37:52] Starting 'po_update_installer'... [20:37:52] Starting 'po_update_installer_marc21'... [20:37:52] Starting 'po_update_installer_unimarc'... [20:37:52] Finished 'po_update_installer_unimarc' after 508 ms [20:37:52] Finished 'po_update_installer' after 509 ms [20:37:52] Finished 'po_update_pref' after 654 ms [20:37:52] Finished 'po_update_messages_js' after 660 ms [20:37:52] Finished 'po_update_installer_marc21' after 690 ms [20:37:53] Finished 'po_update_marc_unimarc' after 999 ms [20:37:53] Finished 'po_update_opac' after 1.02 s [20:37:53] Finished 'po_update_marc_marc21' after 1.41 s [20:37:54] Finished 'po_update_messages' after 1.97 s [20:37:55] Finished 'po_update_staff' after 3.39 s [20:37:55] Finished 'po:update' after 3.39 s kohadev-koha@kohadevbox:koha((46aa2dd71e7...))$ cd misc/translator/po && git diff kohadev-koha@kohadevbox:po((46aa2dd71e7...))$ ==== Notice there are no new translations added to the .po files after regenerating the strings. Am I testing this incorrectly?
(In reply to Alex Buckley from comment #10) > Hi Jonathan, > > We are testing this patchset for backport to 24.05.x > > I would like to check I am testing it correctly please: > [skip] > > Am I testing this incorrectly? I think I've followed the exact same steps. However I have a diff +#. For the first occurrence, +#. SCRIPT +#: koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc:78 +#: koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc:75 +#, fuzzy, c-format +msgid "Waiting at %s since %s." +msgstr "Billing date: %s From %s To %s %s All since %s %s " +#. SCRIPT +#: koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc:78 +#, fuzzy +msgid "Waiting at %s, %s since %s." +msgstr "Billing date: %s From %s To %s %s All since %s %s " +#. SCRIPT +#: koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc:1 +#, fuzzy +msgid "A patron from %s" +msgstr "User library" Which are the expected changes.
(In reply to Jonathan Druart from comment #11) > (In reply to Alex Buckley from comment #10) > > Hi Jonathan, > > > > We are testing this patchset for backport to 24.05.x > > > > I would like to check I am testing it correctly please: > > [skip] > > > > Am I testing this incorrectly? > > I think I've followed the exact same steps. However I have a diff > > +#. For the first occurrence, > +#. SCRIPT > +#: > koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/ > catalogue_detail.inc:78 > +#: koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc:75 > +#, fuzzy, c-format > +msgid "Waiting at %s since %s." > +msgstr "Billing date: %s From %s To %s %s All since %s %s " > > +#. SCRIPT > +#: > koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/ > catalogue_detail.inc:78 > +#, fuzzy > +msgid "Waiting at %s, %s since %s." > +msgstr "Billing date: %s From %s To %s %s All since %s %s " > > > +#. SCRIPT > +#: koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc:1 > +#, fuzzy > +msgid "A patron from %s" > +msgstr "User library" > > Which are the expected changes. Thank you for testing Jonathan. We will look into getting this backported next month - to 24.05.09, now we are so close to the March release.