[Bug 26395] New: Move translatable strings out of letter.tt into letter.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26395 Bug ID: 26395 Summary: Move translatable strings out of letter.tt into letter.js Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: testopia@bugs.koha-community.org Depends on: 21156 Strings defined for translation in letter.tt can now be wrapped in the new translation function and put in letter.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=26395 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=26395 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 109683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109683&action=edit Bug 26395: Move translatable strings out of letter.tt into letter.js This patch moves strings defined for translation in letter.tt into letter.js for translation using the new double-underscore i81n function. Note, the "MSG_NO_NOTICE_FOUND" usage has been removed because it didn't work. To test, apply the patch and go to Tools -> Notices & Slips. - Use the "Copy" dropdown to copy an existing notice to a specific library. - Save the copied notice. - Return to the "All libraries" view on the Notices & Slips page. - Repeat the same process above: Copy the same notice to the same library. - When you click save on the "Add notice" page you should get an error message, "A letter with the code 'ACCTDETAILS' already exists for <library>" - From the "All libraries" view on the Notices & Slips page, copy the text in the "Code" column of an existing notice. - Click "New notice" and choose the module of the notice you copied from. - On the "Add notice" page, paste the code into the "Code" field and enter a name in the "Name" field. - Click "Save" without making any other changes. You should get an error message, "Please fill at least one template." - Enter some data into one of the message body fields but not message subject, and click "Save" again. - You should get an error, "Please specify title and content for <notice>" - Enter data in the message subject field and click "Save" again. - You should get an error, "A default letter with the code <CODE> already exists." 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/letter.js for translation, e.g.: msgid "Please fill at least one template." 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=26395 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexis.ripetti@inLibro.com --- Comment #2 from Alexis Ripetti <alexis.ripetti@inLibro.com> ---
Note, the "MSG_NO_NOTICE_FOUND" usage has been removed because it didn't work.
This line seems to be important. I just applied your patch and I am not able to reproduce the second part of your test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26395 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=26395 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109683|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 110815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110815&action=edit Bug 26395: Move translatable strings out of letter.tt into letter.js This patch moves strings defined for translation in letter.tt into letter.js for translation using the new double-underscore i81n function. Note, the "MSG_NO_NOTICE_FOUND" usage has been removed because it didn't work. To test, apply the patch and go to Tools -> Notices & Slips. - Use the "Copy" dropdown to copy an existing notice to a specific library. - Save the copied notice. - Return to the "All libraries" view on the Notices & Slips page. - Repeat the same process above: Copy the same notice to the same library. - When you click save on the "Add notice" page you should get an error message, "A letter with the code 'ACCTDETAILS' already exists for <library>" - From the "All libraries" view on the Notices & Slips page, copy the text in the "Code" column of an existing notice. - Click "New notice" and choose the module of the notice you copied from. - On the "Add notice" page, paste the code into the "Code" field and enter a name in the "Name" field. - Click "Save" without making any other changes. You should get an error message, "Please fill at least one template." - Enter some data into one of the message body fields but not message subject, and click "Save" again. - You should get an error, "Please specify title and content for <notice>" - Enter data in the message subject field and click "Save" again. - You should get an error, "A default letter with the code <CODE> already exists." 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/letter.js for translation, e.g.: msgid "Please fill at least one template." 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=26395 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=26395 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110815|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110824 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110824&action=edit Bug 26395: Move translatable strings out of letter.tt into letter.js This patch moves strings defined for translation in letter.tt into letter.js for translation using the new double-underscore i81n function. Note, the "MSG_NO_NOTICE_FOUND" usage has been removed because it didn't work. To test, apply the patch and go to Tools -> Notices & Slips. - Use the "Copy" dropdown to copy an existing notice to a specific library. - Save the copied notice. - Return to the "All libraries" view on the Notices & Slips page. - Repeat the same process above: Copy the same notice to the same library. - When you click save on the "Add notice" page you should get an error message, "A letter with the code 'ACCTDETAILS' already exists for <library>" - From the "All libraries" view on the Notices & Slips page, copy the text in the "Code" column of an existing notice. - Click "New notice" and choose the module of the notice you copied from. - On the "Add notice" page, paste the code into the "Code" field and enter a name in the "Name" field. - Click "Save" without making any other changes. You should get an error message, "Please fill at least one template." - Enter some data into one of the message body fields but not message subject, and click "Save" again. - You should get an error, "Please specify title and content for <notice>" - Enter data in the message subject field and click "Save" again. - You should get an error, "A default letter with the code <CODE> already exists." 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/letter.js for translation, e.g.: msgid "Please fill at least one template." 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=26395 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=26395 --- 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=26395 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- this patch does not apply cleanly to 20.05.x, no backport please rebase if needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26395 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org CC| |frederic@tamil.fr Component|Templates |I18N/L10N -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org