[Bug 26242] New: Move translatable strings out of results.tt and into results.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26242 Bug ID: 26242 Summary: Move translatable strings out of results.tt and into results.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 catalogue/results.tt can now be wrapped in the new translation function and put in js/pages/results.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=26242 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=26242 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 108535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108535&action=edit Bug 26242: Move translatable strings out of results.tt and into results.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 perform a catalog search which will return multiple results. - Without checking any checkboxes, click the "Add to Cart" button. You should see a message, "No item was selected." - The same should happen if you select an item from the "Add to list" menu or click the "Place hold" button. - Click the "Select all" link to check all checkboxes. - Click the "Place hold" button. - You will inevitably get a "One or more selected items cannot be placed on hold." message. If you were to want to complete this process you would have to painstakingly sift through each search result to find which item couldn't be placed on hold so that you could uncheck the corresponding checkbox. Luckily this test plan doesn't require you to do that. - If you don't get an error message you're living in a catalog utopia unlike any I have ever seen. 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/results.js for translation, e.g.: msgid "Nothing is selected" 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=26242 Alexis Ripetti <alexis.ripetti@inLibro.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=26242 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108535|0 |1 is obsolete| | --- Comment #2 from Alexis Ripetti <alexis.ripetti@inLibro.com> --- Created attachment 109772 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109772&action=edit Bug 26242: Move translatable strings out of results.tt and into results.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 perform a catalog search which will return multiple results. - Without checking any checkboxes, click the "Add to Cart" button. You should see a message, "No item was selected." - The same should happen if you select an item from the "Add to list" menu or click the "Place hold" button. - Click the "Select all" link to check all checkboxes. - Click the "Place hold" button. - You will inevitably get a "One or more selected items cannot be placed on hold." message. If you were to want to complete this process you would have to painstakingly sift through each search result to find which item couldn't be placed on hold so that you could uncheck the corresponding checkbox. Luckily this test plan doesn't require you to do that. - If you don't get an error message you're living in a catalog utopia unlike any I have ever seen. 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/results.js for translation, e.g.: msgid "Nothing is selected" 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: Alexis Ripetti <alexis.ripetti@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26242 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=26242 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109772|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 109992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109992&action=edit Bug 26242: Move translatable strings out of results.tt and into results.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 perform a catalog search which will return multiple results. - Without checking any checkboxes, click the "Add to Cart" button. You should see a message, "No item was selected." - The same should happen if you select an item from the "Add to list" menu or click the "Place hold" button. - Click the "Select all" link to check all checkboxes. - Click the "Place hold" button. - You will inevitably get a "One or more selected items cannot be placed on hold." message. If you were to want to complete this process you would have to painstakingly sift through each search result to find which item couldn't be placed on hold so that you could uncheck the corresponding checkbox. Luckily this test plan doesn't require you to do that. - If you don't get an error message you're living in a catalog utopia unlike any I have ever seen. 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/results.js for translation, e.g.: msgid "Nothing is selected" 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: Alexis Ripetti <alexis.ripetti@inLibro.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=26242 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 110891 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110891&action=edit Bug 26242: Remove one unused occurrences of MSG_NON_RESERVES_SELECTED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26242 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26242 --- Comment #5 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=26242 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 #6 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=26242 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #7 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