| Summary: | Wrong use of '__()' in .tt files | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
| Component: | I18N/L10N | Assignee: | Owen Leonard <oleonard> |
| Status: | Needs documenting --- | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | f.demians, fridolin.somers, jonathan.druart, lucas, wainuiwitikapark |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Small patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.06,23.11.11
|
|
| Circulation function: | |||
| Bug Depends on: | 35511, 28130 | ||
| Bug Blocks: | |||
| Attachments: |
Bug 37814: Fix incorrect use of __() in .tt files
Bug 37814: Fix incorrect use of __() in .tt files |
||
Created attachment 170981 [details] [review] Bug 37814: Fix incorrect use of __() in .tt files This patch corrects instances of the double-underscore function being used in .tt files where the single-underscore function should be used instead. To test, apply the patch and update a translation, e.g. fr-FR: > gulp po:update --lang fr-FR - Open the corresponding .po file for the affected strings, in this case misc/translator/po/fr-FR-staff-prog.po - Confirm that the strings are now in the .po file for translation. You should find these lines: - koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt: "Are you sure you want to unsubscribe %s from email alerts for %s?" - koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt "Click to expand this section" - Check fr-FR-opac-bootstrap.po for this line: - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt: "Are you sure you want to unsubscribe %s from email alerts for %s?" Sponsored-by: Athens County Public Libraries Created attachment 170989 [details] [review] Bug 37814: Fix incorrect use of __() in .tt files This patch corrects instances of the double-underscore function being used in .tt files where the single-underscore function should be used instead. To test, apply the patch and update a translation, e.g. fr-FR: > gulp po:update --lang fr-FR - Open the corresponding .po file for the affected strings, in this case misc/translator/po/fr-FR-staff-prog.po - Confirm that the strings are now in the .po file for translation. You should find these lines: - koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt: "Are you sure you want to unsubscribe %s from email alerts for %s?" - koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt "Click to expand this section" - Check fr-FR-opac-bootstrap.po for this line: - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt: "Are you sure you want to unsubscribe %s from email alerts for %s?" Sponsored-by: Athens County Public Libraries Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Trivial, skipping QA. Thanks for these! Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 Code in koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt does not exists so only impacted : koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt Not backporting to 22.11 |
__() does not work in .tt files (only .js files) _() must be used instead The 4 occurrences returned here are wrong. % git grep '__(' **/*.tt koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt: return confirmDelete(__("Are you sure you want to unsubscribe %s from email alerts for %s?").format(patron, title)); koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt: node.addClass("collapsed").removeClass("expanded").attr("title", __("Click to expand this section") ); koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt: node.addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") ); koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt: return confirmDelete(__("Are you sure you want to unsubscribe %s from email alerts for %s?").format(patron, title));