[Bug 26217] New: Move translatable strings out of templates into acq.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26217 Bug ID: 26217 Summary: Move translatable strings out of templates into acq.js Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.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 templates as global variables and used in acq.js can now be wrapped in the new translation function and put in acq.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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26217 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26217 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 108393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108393&action=edit Bug 26217: Move translatable strings out of templates into acq.js This patch removes the definition of translatable strings out of templates and into the JavaScript file, using the new JS i81n function. To test: - Apply the patch, go to acquisitions, and view a vendor. - Click "Uncertain prices" in the sidebar menu. - In the table of orders, enter something in the "price" form field which isn't a valid price. You should get an error message. - Test the validation of fund amounts: Go to Administration -> Budgets and create an active budget if necessary. - Add a fund to that budget. Try to save the fund with a fund amount which exceed the amount in the budget. - You should get an error message: "Fund amount exceeds period allocation" - Add a fund with valid data and then go to Administration -> Funds and locate the fun you just created. - Use the "Actions" menu to add a sub fund to that fund. - Try to save this new fund with an amount which exceeds the amount in the parent fund. - You should get an error message, "Fund amount exceeds parent allocation." Note: I was unable to properly test the error message "New budget-parent is beneath budget." I couldn't figure out how to trigger it. 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/acq.js for translation, e.g.: msgid "Fund amount exceeds period allocation" 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26217 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26217 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=26217 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108393|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 110814 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110814&action=edit Bug 26217: Move translatable strings out of templates into acq.js This patch removes the definition of translatable strings out of templates and into the JavaScript file, using the new JS i81n function. To test: - Apply the patch, go to acquisitions, and view a vendor. - Click "Uncertain prices" in the sidebar menu. - In the table of orders, enter something in the "price" form field which isn't a valid price. You should get an error message. - Test the validation of fund amounts: Go to Acquisitions -> Budgets and create an active budget if necessary. - Add a fund to that budget. Try to save the fund with a fund amount which exceed the amount in the budget. - You should get an error message: "Fund amount exceeds period allocation" - Add a fund with valid data and then go to Administration -> Funds and locate the fun you just created. - Use the "Actions" menu to add a sub fund to that fund. - Try to save this new fund with an amount which exceeds the amount in the parent fund. - You should get an error message, "Fund amount exceeds parent allocation." Note: I was unable to properly test the error message "New budget-parent is beneath budget." I couldn't figure out how to trigger it. 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/acq.js for translation, e.g.: msgid "Fund amount exceeds period allocation" 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=26217 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=26217 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110814|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110825 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110825&action=edit Bug 26217: Move translatable strings out of templates into acq.js This patch removes the definition of translatable strings out of templates and into the JavaScript file, using the new JS i81n function. To test: - Apply the patch, go to acquisitions, and view a vendor. - Click "Uncertain prices" in the sidebar menu. - In the table of orders, enter something in the "price" form field which isn't a valid price. You should get an error message. - Test the validation of fund amounts: Go to Administration -> Budgets and create an active budget if necessary. - Add a fund to that budget. Try to save the fund with a fund amount which exceed the amount in the budget. - You should get an error message: "Fund amount exceeds period allocation" - Add a fund with valid data and then go to Administration -> Funds and locate the fun you just created. - Use the "Actions" menu to add a sub fund to that fund. - Try to save this new fund with an amount which exceeds the amount in the parent fund. - You should get an error message, "Fund amount exceeds parent allocation." Note: I was unable to properly test the error message "New budget-parent is beneath budget." I couldn't figure out how to trigger it. 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/acq.js for translation, e.g.: msgid "Fund amount exceeds period allocation" 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=26217 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It would be nice if the look and feel of the message could be a bit modernized - it still follows the very old style including ----- for formatting :) "Fund amount exceeds parent allocation" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26217 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=26217 --- 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=26217 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.11.00 |20.11.00, 20.05.05 released in| | 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=26217 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