Bug 38450

Summary: Missing translation string in catalogue_detail.inc
Product: Koha Reporter: Andreas Jonsson <andreas.jonsson>
Component: I18N/L10NAssignee: Jonathan Druart <jonathan.druart>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, jonathan.druart
Version: unspecifiedKeywords: RM_priority
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 38450: Fix some translation pickups

Description Andreas Jonsson 2024-11-14 16:58:31 UTC
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?
Comment 1 Katrin Fischer 2024-11-14 17:00:14 UTC
We found out today that the strings hadn't been synced properly for a little while. Please check again tomorrow!
Comment 2 Jonathan Druart 2024-11-14 18:34:01 UTC
Indeed, please check again tomorrow.
Comment 3 Jonathan Druart 2024-11-18 09:55:13 UTC
This is valid.
Comment 4 Jonathan Druart 2024-11-18 10:04:49 UTC
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.
Comment 5 Jonathan Druart 2024-11-18 10:07:47 UTC
(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