[Bug 26243] New: Move translatable strings out of templates and into circulation.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 Bug ID: 26243 Summary: Move translatable strings out of templates and into circulation.js Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr, testopia@bugs.koha-community.org Depends on: 21156 Strings defined for translation in circulation.tt and moremember.tt can now be wrapped in the new translation function and put in js/circulation.js. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21156 [Bug 21156] Internationalization: plural forms, context, and more for JS files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 108551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108551&action=edit Bug 26243: Move translatable strings out of templates and into circulation.js This patch removes the definition of translatable strings out of templates and into the corresponding JavaScript file, using the new JS i81n function. To test: - Apply the patch and check out to a patron. - If there are none on the account, add a new message using the "Add a new message" link. - Click "Delete" for that message. - You should get a confirmation message, "Are you sure you want to delete this message? This cannot be undone." - If necessary, enable the ExportCircHistory system preference. - Check out to a patron who has one or more items checked out. - Wihtout checking any checkboxes, click the "Export" button at the bottom of the page. - You should get an error message, "You must select checkout(s) to export." - Add a restriction the patron's account. - Delete the restriction. You should get a confirmation message, "Remove restriction?" - Perform the same tests from the patron detail page. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR:
cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js for translation, e.g.: msgid "You must select checkout(s) to export" msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation:
perl translate install fr-FR
- Switch to your newly translated language in the staff client and repeat the test plan above. The translated strings should appear. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- Hi Owen. There doesn't appear to be an option in misc/translator/po/fr-FR-messages-js.po to add a translation for the message "Are you sure you want to delete this message? This cannot be undone." There are only options to translate: - Remove restriction? - You must select checkout(s) to export Everything else as per the test plan works. David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- (In reply to David Nind from comment #2)
There doesn't appear to be an option in misc/translator/po/fr-FR-messages-js.po to add a translation for the message "Are you sure you want to delete this message? This cannot be undone."
Sorry to have been unclear: This particular string is in the regular template rather than in JavaScript, so it will be picked up by the regular translation process, appearing in fr-FR-staff-prog.po. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 --- Comment #4 from David Nind <david@davidnind.com> ---
Sorry to have been unclear: This particular string is in the regular template rather than in JavaScript, so it will be picked up by the regular translation process, appearing in fr-FR-staff-prog.po.
Thanks Owen! Another sign off on the way... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108551|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 110799 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110799&action=edit Bug 26243: Move translatable strings out of templates and into circulation.js This patch removes the definition of translatable strings out of templates and into the corresponding JavaScript file, using the new JS i81n function. To test: - Apply the patch and check out to a patron. - If there are none on the account, add a new message using the "Add a new message" link. - Click "Delete" for that message. - You should get a confirmation message, "Are you sure you want to delete this message? This cannot be undone." - If necessary, enable the ExportCircHistory system preference. - Check out to a patron who has one or more items checked out. - Wihtout checking any checkboxes, click the "Export" button at the bottom of the page. - You should get an error message, "You must select checkout(s) to export." - Add a restriction the patron's account. - Delete the restriction. You should get a confirmation message, "Remove restriction?" - Perform the same tests from the patron detail page. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR:
cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js for translation, e.g.: msgid "You must select checkout(s) to export" msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation:
perl translate install fr-FR
- Switch to your newly translated language in the staff client and repeat the test plan above. The translated strings should appear. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110799|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110807&action=edit Bug 26243: Move translatable strings out of templates and into circulation.js This patch removes the definition of translatable strings out of templates and into the corresponding JavaScript file, using the new JS i81n function. To test: - Apply the patch and check out to a patron. - If there are none on the account, add a new message using the "Add a new message" link. - Click "Delete" for that message. - You should get a confirmation message, "Are you sure you want to delete this message? This cannot be undone." - If necessary, enable the ExportCircHistory system preference. - Check out to a patron who has one or more items checked out. - Wihtout checking any checkboxes, click the "Export" button at the bottom of the page. - You should get an error message, "You must select checkout(s) to export." - Add a restriction the patron's account. - Delete the restriction. You should get a confirmation message, "Remove restriction?" - Perform the same tests from the patron detail page. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR:
cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js for translation, e.g.: msgid "You must select checkout(s) to export" msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation:
perl translate install fr-FR
- Switch to your newly translated language in the staff client and repeat the test plan above. The translated strings should appear. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110808&action=edit Bug 26243: (QA follow-up) Switch quotes to avoid translation issues The QA script warned about text in single quotes which can be a problem for languages like French that need to be able to use these quotes in their translations. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.05 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26243 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #10 from Aleisha Amohia <aleisha@catalyst.net.nz> --- enhancement, not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org