Summary: | Move translatable strings out of templates and into circulation.js | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | I18N/L10N | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | aleisha, david, f.demians, lucas, testopia |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.05
|
|
Circulation function: | |||
Bug Depends on: | 21156 | ||
Bug Blocks: | |||
Attachments: |
Bug 26243: Move translatable strings out of templates and into circulation.js
Bug 26243: Move translatable strings out of templates and into circulation.js Bug 26243: Move translatable strings out of templates and into circulation.js Bug 26243: (QA follow-up) Switch quotes to avoid translation issues |
Description
Owen Leonard
2020-08-18 18:42:03 UTC
Created attachment 108551 [details] [review] 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. 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 (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. > 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...
Created attachment 110799 [details] [review] 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> Created attachment 110807 [details] [review] 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> Created attachment 110808 [details] [review] 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> Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.05 enhancement, not backported to 19.11.x |