[Bug 22490] New: Some strings in javascript files are untranslatable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Bug ID: 22490 Summary: Some strings in javascript files are untranslatable Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: josef.moravec@gmail.com QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr Target Milestone: --- You can find them easily with these commands: git grep "_(" koha-tmpl/intranet-tmpl/prog/js git grep "_(" koha-tmpl/opac-tmpl/bootstrap/js They should be fixed, see https://wiki.koha-community.org/wiki/Coding_Guidelines#JS5:_Enabling_transla... -- 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=22490 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- *** Bug 22601 has been marked as a duplicate of this bug. *** -- 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=22490 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m Status|NEW |ASSIGNED -- 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=22490 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- I will create a xxx-strings.inc for each js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22904 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22904 [Bug 22904] Untranslatable strings in members-menu.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22114 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22114 [Bug 22114] Untranslatable "Patron note:" in checkout.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- A Koha test must be provided here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21156 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Won't be a problem with bug 21156. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Lowering severity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|fridolin.somers@biblibre.co |koha-bugs@lists.koha-commun |m |ity.org --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Bug 24046 fixed "Activate filters" -- 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=22490 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24046 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24046 [Bug 24046] 'Activate filters' untranslatable -- 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=22490 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jeremy.breuillard@biblibre. |ity.org |com CC| |julian.maurice@biblibre.com -- 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=22490 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Some strings in javascript |Some strings in JavaScript |files are untranslatable |files are untranslatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 --- Comment #7 from Jérémy Breuillard <jeremy.breuillard@biblibre.com> --- Created attachment 133813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133813&action=edit Bug 22490: Some strings in JavaScript files are untranslatable This patch updates the translation functions of the strings in Javascript files Test Plan: 1) Find a string in a popup or from a Javascript file who is still not translated or 1) Home > Administration > Authority types 2) Make sure to have at least one Authority type saved 3) Click on Action > Import 4) Import button without adding any file to trigger the popup 5) The string inside the popup appears without translation 6) Apply patch and repeat from 3) to 5) : now the string is translated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jérémy Breuillard <jeremy.breuillard@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff CC| |jeremy.breuillard@biblibre. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jérémy Breuillard <jeremy.breuillard@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133813|0 |1 is obsolete| | --- Comment #8 from Jérémy Breuillard <jeremy.breuillard@biblibre.com> --- Created attachment 133906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133906&action=edit Bug 22490: Some strings in JavaScript files are untranslatable This patch updates the translation functions of the strings in Javascript files Test Plan: 1) Find a string in a popup or from a Javascript file who is still not translated or 1) Home > Administration > Authority types 2) Make sure to have at least one Authority type saved 3) Click on Action > Import 4) Import button without adding any file to trigger the popup 5) The string inside the popup appears without translation 6) Apply patch and repeat from 3) to 5) : now the string is translated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jérémy Breuillard <jeremy.breuillard@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=22490 Jérémy Breuillard <jeremy.breuillard@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133906|0 |1 is obsolete| | --- Comment #9 from Jérémy Breuillard <jeremy.breuillard@biblibre.com> --- Created attachment 134072 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134072&action=edit Bug 22490: Some strings in JavaScript files are untranslatable This patch updates the translation functions of the strings in Javascript files Test Plan: 1) Find a string in a popup or from a Javascript file who is still not translated or 1) Home > Administration > Authority types 2) Make sure to have at least one Authority type saved 3) Click on Action > Import 4) Import button without adding any file to trigger the popup 5) The string inside the popup appears without translation 6) Apply patch and repeat from 3) to 5) : now the string is translated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jérémy Breuillard <jeremy.breuillard@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134072|0 |1 is obsolete| | --- Comment #10 from Jérémy Breuillard <jeremy.breuillard@biblibre.com> --- Created attachment 134204 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134204&action=edit Bug 22490: Some strings in JavaScript files are untranslatable This patch updates the translation functions of the strings in Javascript files Test Plan: 1) Find a string in a popup or from a Javascript file who is still not translated or 1) Home > Administration > Authority types 2) Make sure to have at least one Authority type saved 3) Click on Action > Import 4) Import button without adding any file to trigger the popup 5) The string inside the popup appears without translation 6) Apply patch and repeat from 3) to 5) : now the string is translated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Jérémy Breuillard <jeremy.breuillard@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134204|0 |1 is obsolete| | --- Comment #11 from Jérémy Breuillard <jeremy.breuillard@biblibre.com> --- Created attachment 134207 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134207&action=edit Bug 22490: Some strings in JavaScript files are untranslatable This patch updates the translation functions of the strings in Javascript files Test Plan: 1) Find a string in a popup or from a Javascript file who is still not translated or 1) Home > Administration > Authority types 2) Make sure to have at least one Authority type saved 3) Click on Action > Import 4) Import button without adding any file to trigger the popup 5) The string inside the popup appears without translation 6) Apply patch and repeat from 3) to 5) : now the string is translated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #12 from Josef Moravec <josef.moravec@gmail.com> --- There are some more strings on master in these files: koha-tmpl/intranet-tmpl/prog/js/datatables.js (1 string) koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (2 more strings) Found by: git grep '[^_]_(' koha-tmpl/intranet-tmpl/prog/js Also there are dummy functions defined in koha-tmpl/intranet-tmpl/prog/js/onboarding.js and koha-tmpl/intranet-tmpl/prog/js/staff-global.js. I am not sure what was this function meant to be for, but I believe it 'legitimate' the '_' function in javascript runtime -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jeremy.breuillard@biblibre. |julian.maurice@biblibre.com |com | Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134207|0 |1 is obsolete| | --- Comment #13 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 146854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146854&action=edit Bug 22490: Some strings in JavaScript files are untranslatable Javascript function `_` works only if used in template file (.tt or .inc). In .js files we should use `__` This patch updates .js files to use `__` instead of `_` Test Plan: 1. Do not apply the patch yet 2. Run `npx gulp po:update --lang fr-FR` (choose another language if you prefer) 3. Open misc/translator/po/fr-FR-messages-js.po and search "Please select a CSV (.csv) or ODS (.ods) spreadsheet file" 4. Notice that the references above only mention biblio_framework.js 5. If not already translated, translate it 6. Run misc/translator/translate install fr-FR 7. Go to staff interface and change language to fr-FR 8. Go to Administration » Authority types and click on "Actions -> Import" 9. In the modal window, click on "Import" without selecting a file. You should see an alert with the non-translated text 10. Apply the patch 11. Run `npx gulp po:update --lang fr-FR` 12. Open misc/translator/po/fr-FR-messages-js.po and search "Please select a CSV (.csv) or ODS (.ods) spreadsheet file" 13. Notice that the references above now also mention authtype.js 14. If the translation is marked as fuzzy, remove the fuzzy flag 15. Run misc/translator/translate install fr-FR 16. Go to staff interface again 17. Go to Administration » Authority types and click on "Actions -> Import" 18. In the modal window, click on "Import" without selecting a file. You should see an alert, this time with the translated text -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Josef Moravec from comment #12)
There are some more strings on master in these files:
koha-tmpl/intranet-tmpl/prog/js/datatables.js (1 string) koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (2 more strings) Fixed
Also there are dummy functions defined in koha-tmpl/intranet-tmpl/prog/js/onboarding.js and koha-tmpl/intranet-tmpl/prog/js/staff-global.js.
I am not sure what was this function meant to be for, but I believe it 'legitimate' the '_' function in javascript runtime It's used to detect translatable strings in .inc/.tt for the older translation system
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=22490 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146854|0 |1 is obsolete| | --- Comment #15 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 146868 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146868&action=edit Bug 22490: Some strings in JavaScript files are untranslatable Javascript function `_` works only if used in template file (.tt or .inc). In .js files we should use `__` This patch updates .js files to use `__` instead of `_` Test Plan: 1. Do not apply the patch yet 2. Run `npx gulp po:update --lang fr-FR` (choose another language if you prefer) 3. Open misc/translator/po/fr-FR-messages-js.po and search "Please select a CSV (.csv) or ODS (.ods) spreadsheet file" 4. Notice that the references above only mention biblio_framework.js 5. If not already translated, translate it 6. Run misc/translator/translate install fr-FR 7. Go to staff interface and change language to fr-FR 8. Go to Administration » Authority types and click on "Actions -> Import" 9. In the modal window, click on "Import" without selecting a file. You should see an alert with the non-translated text 10. Apply the patch 11. Run `npx gulp po:update --lang fr-FR` 12. Open misc/translator/po/fr-FR-messages-js.po and search "Please select a CSV (.csv) or ODS (.ods) spreadsheet file" 13. Notice that the references above now also mention authtype.js 14. If the translation is marked as fuzzy, remove the fuzzy flag 15. Run misc/translator/translate install fr-FR 16. Go to staff interface again 17. Go to Administration » Authority types and click on "Actions -> Import" 18. In the modal window, click on "Import" without selecting a file. You should see an alert, this time with the translated text Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- How did we miss all those? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 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=22490 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146868|0 |1 is obsolete| | --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 147337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147337&action=edit Bug 22490: Some strings in JavaScript files are untranslatable Javascript function `_` works only if used in template file (.tt or .inc). In .js files we should use `__` This patch updates .js files to use `__` instead of `_` Test Plan: 1. Do not apply the patch yet 2. Run `npx gulp po:update --lang fr-FR` (choose another language if you prefer) 3. Open misc/translator/po/fr-FR-messages-js.po and search "Please select a CSV (.csv) or ODS (.ods) spreadsheet file" 4. Notice that the references above only mention biblio_framework.js 5. If not already translated, translate it 6. Run misc/translator/translate install fr-FR 7. Go to staff interface and change language to fr-FR 8. Go to Administration » Authority types and click on "Actions -> Import" 9. In the modal window, click on "Import" without selecting a file. You should see an alert with the non-translated text 10. Apply the patch 11. Run `npx gulp po:update --lang fr-FR` 12. Open misc/translator/po/fr-FR-messages-js.po and search "Please select a CSV (.csv) or ODS (.ods) spreadsheet file" 13. Notice that the references above now also mention authtype.js 14. If the translation is marked as fuzzy, remove the fuzzy flag 15. Run misc/translator/translate install fr-FR 16. Go to staff interface again 17. Go to Administration » Authority types and click on "Actions -> Import" 18. In the modal window, click on "Import" without selecting a file. You should see an alert, this time with the translated text Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.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=22490 --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.04 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 --- Comment #19 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22490 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #20 from Lucas Gass <lucas@bywatersolutions.com> --- No patron-autocomplete.js in 22.05.x so this does not apply. No backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org