[Bug 26244] New: Move translatable strings out of memberentrygen.tt and into JavaScript
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Bug ID: 26244 Summary: Move translatable strings out of memberentrygen.tt and into JavaScript 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 memberentrygen.tt can now be wrapped in the new translation function and put in members.js and messaging-preference-form.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=26244 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26245 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26245 [Bug 26245] Remove unused functions from members.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 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=26244 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 108688 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108688&action=edit Bug 26243: Move translatable strings out of memberentrygen.tt and into JavaScript This patch removes the definition of translatable strings out of templates and into the corresponding JavaScript file, using the new JS i81n function. Note: I was unable to trigger the confirmation message in the check_form_borrowers function. I think the form is now structured in a way that it is never triggered, thus a candidate for removal. To test: - Apply the patch and go to Patrons. - Add or edit a patron. - Select a date of birth at least one month in the past and confirm that the patron's age is displayed in the hint below. - Test multiple variations to confirm that the singular and plural of 'year' and 'month' display correctly. (e.g. 1 year 9 months, 2 years, etc). - Set some patron messaging preferences for the patron. - Change the patron category. - You should get a confirmation: "Change messaging preferences to default for this category?" 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/members.js for translation, e.g.: msgid "%s years" 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=26244 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- Hi Owen. I'm not sure what I'm doing wrong for this one. I've tried several times. But whatever I try I can't get it to recognise changes for the age/month/year phrases or the message when changing patron category. David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108688|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 126581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126581&action=edit Bug 26244: Move translatable strings out of memberentrygen.tt and into JavaScript This patch removes the definition of translatable strings out of templates and into the corresponding JavaScript file, using the new JS i81n function. Note: I was unable to trigger the confirmation message in the check_form_borrowers function. I think the form is now structured in a way that it is never triggered, thus a candidate for removal. To test: - Apply the patch and go to Patrons. - Add or edit a patron. - Select a date of birth at least one month in the past and confirm that the patron's age is displayed in the hint below. - Test multiple variations to confirm that the singular and plural of 'year' and 'month' display correctly. (e.g. 1 year 9 months, 2 years, etc). - Set some patron messaging preferences for the patron. - Change the patron category. - You should get a confirmation: "Change messaging preferences to default for this category?" 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/members.js for translation, e.g.: msgid "%s years" 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=26244 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29278 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Please note that a bug in memberentry.pl could prevent complete testing of this patch. If you have switched to fr-FR, for example, and are editing an existing patron record, the "lang" variable will not be correctly set in the template, causing the localization file to be omitted. One way around this would be to set borrowers.lang in the patron record you are testing to match the language, e.g. 'fr-FR' Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29278 [Bug 29278] write_age function broken by Flatpickr conversion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Bug 26244 depends on bug 29278, which changed state. Bug 29278 Summary: write_age function broken by Flatpickr conversion https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29278 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126581|0 |1 is obsolete| | --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 131540 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131540&action=edit Bug 26244: Move translatable strings out of memberentrygen.tt and into JavaScript This patch removes the definition of translatable strings out of templates and into the corresponding JavaScript file, using the new JS i81n function. Note: I was unable to trigger the confirmation message in the check_form_borrowers function. I think the form is now structured in a way that it is never triggered, thus a candidate for removal. To test: - Apply the patch and go to Patrons. - Add or edit a patron. - Select a date of birth at least one month in the past and confirm that the patron's age is displayed in the hint below. - Test multiple variations to confirm that the singular and plural of 'year' and 'month' display correctly. (e.g. 1 year 9 months, 2 years, etc). - Set some patron messaging preferences for the patron. - Change the patron category. - You should get a confirmation: "Change messaging preferences to default for this category?" 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/members.js for translation, e.g.: msgid "%s years" 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: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |fridolin.somers@biblibre.co | |m --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- I've checked that each text is well moved and appears in PO files after translation update. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Kyle M Hall <kyle@bywatersolutions.com> 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=26244 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131540|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 132806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132806&action=edit Bug 26244: Move translatable strings out of memberentrygen.tt and into JavaScript This patch removes the definition of translatable strings out of templates and into the corresponding JavaScript file, using the new JS i81n function. Note: I was unable to trigger the confirmation message in the check_form_borrowers function. I think the form is now structured in a way that it is never triggered, thus a candidate for removal. To test: - Apply the patch and go to Patrons. - Add or edit a patron. - Select a date of birth at least one month in the past and confirm that the patron's age is displayed in the hint below. - Test multiple variations to confirm that the singular and plural of 'year' and 'month' display correctly. (e.g. 1 year 9 months, 2 years, etc). - Set some patron messaging preferences for the patron. - Change the patron category. - You should get a confirmation: "Change messaging preferences to default for this category?" 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/members.js for translation, e.g.: msgid "%s years" 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: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26244 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.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=26244 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, 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=26244 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org