[Bug 29588] New: Yesterday and tomorrow in datepicker don't translate
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 Bug ID: 29588 Summary: Yesterday and tomorrow in datepicker don't translate Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr Depends on: 29478 Tomorrow, Yesterday and or in the new Flatpickr datepicker don't translate. Today does, I am not sure why. I think it should be either only one underscore in an .inc file or it's something else. I tried updating the po files locally, but the strings didn't show up. ++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -34,6 +34,7 @@ <!-- / calendar.inc --> [% Asset.js("js/calendar.js") | $raw %] [% Asset.js("lib/flatpickr/flatpickr.min.js") | $raw %] +[% Asset.js("lib/flatpickr/shortcut-buttons-flatpickr.min.js") | $raw %] <script> flatpickr.l10ns.default.weekdays = flatpickr_weekdays; flatpickr.l10ns.default.months = flatpickr_months; @@ -84,6 +85,38 @@ $(on_close_focus).focus(); } }, + plugins: [ + ShortcutButtonsPlugin({ + button: [ + { + label: __("Yesterday") + }, + { + label: __("Today") + }, + { + label: __("Tomorrow") + } + ], + label: "or", Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29478 [Bug 29478] flatpickr misses quick shortcut to "Today" date -- 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=29588 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com --- Comment #1 from Andrew Nugged <nugged@gmail.com> ---
I tried updating the po files locally, but the strings didn't show up.
It's JS runtime translations, so it goes from ln-LN-messages-js.po to locale_data.js, but it's not detected by the parser (or we should do some magic?)... Let's call for JD for help :), we bumped a lot before release. I did the update for .po manually and it worked (in ITEM EDIT page for example): *** fi-FI-messages-js.po.orig --- fi-FI-messages-js.po *************** *** 1305,1314 **** --- 1305,1323 ---- msgid "Thursday" msgstr "Torstai" + #: koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc:92 + msgid "Yesterday" + msgstr "Eilen" + + #: koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc:95 #: koha-tmpl/intranet-tmpl/prog/js/calendar.js:111 msgid "Today" msgstr "Tänään" + #: koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc:98 + msgid "Tomorrow" + msgstr "Huomenna" + #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:291 #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:658 msgid "Today's checkouts" -- 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=29588 --- Comment #2 from Andrew Nugged <nugged@gmail.com> --- the parallel issue I found: these translations make flatpickr translated on the ITEM EDIT page, but not translate all three words at all on the USER EDIT page. (/me researching) -- 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=29588 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Andrew Nugged from comment #1)
I tried updating the po files locally, but the strings didn't show up.
It's JS runtime translations, so it goes from ln-LN-messages-js.po to locale_data.js, but it's not detected by the parser (or we should do some magic?)... Let's call for JD for help :), we bumped a lot before release.
Yes, but a git grep didn't bring the string up in any of the .po files. The issue might be the file ending. This is an .inc, so it's not parsed as a .js but like a .tt file. This is .js code, but the translation tool doesn't know or expect it (is my guess)
I did the update for .po manually and it worked (in ITEM EDIT page for example):
*** fi-FI-messages-js.po.orig --- fi-FI-messages-js.po *************** *** 1305,1314 **** --- 1305,1323 ---- msgid "Thursday" msgstr "Torstai"
+ #: koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc:92 + msgid "Yesterday" + msgstr "Eilen" + + #: koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc:95 #: koha-tmpl/intranet-tmpl/prog/js/calendar.js:111 msgid "Today" msgstr "Tänään"
+ #: koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc:98 + msgid "Tomorrow" + msgstr "Huomenna" + #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:291 #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:658 msgid "Today's checkouts"
-- 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=29588 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Try changing __ to _ maybe? -- 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=29588 --- Comment #5 from Andrew Nugged <nugged@gmail.com> --- the parallel issue I found: these translations make flatpickr translated on the ITEM EDIT page accordingly to the current language, but I found strange behavior on the USER EDIT page: it sticks to some language from available (randomly? I am researching) and is ignorant to the current chosen language (wth?) -- 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=29588 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- That does sound odd, good luck for the bug hunting! It's a prominent spot, so I hope we can figure it out for .1 -- 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=29588 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=29588 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128102&action=edit Bug 29588: (bug 29478 follow-up) Make strings translatable "or", "Yesterday", "Today" and "Tomorrow" are not translatable, we are using __ when _ should be used (__ is for .js files only). Test plan: 0. Apply the patch 1. cd misc/translator && perl translate update fr-FR 2. Edit misc/translator/po/fr-FR-staff-prog.po Search for "or", "Yesterday", "Today" and "Tomorrow" and translate them 3. cd misc/translator && perl translate install fr-FR 4. Enable fr-FR (syspref 'language') 5. Edit a patron and an item and confirm that the flatpickr widget has the strings correctly translated -- 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=29588 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_11_candidate Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |jonathan.druart+koha@gmail. | |com -- 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=29588 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #8 from David Nind <david@davidnind.com> --- For whatever reason I couldn't get "Tomorrow" to translate. I tried it with fr-FR and de-DE - there was a translation for that already available, but it didn't change anything in the staff interface. (All the other ones worked as expected.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to David Nind from comment #8)
For whatever reason I couldn't get "Tomorrow" to translate. I tried it with fr-FR and de-DE - there was a translation for that already available, but it didn't change anything in the staff interface. (All the other ones worked as expected.)
Did you remove the fuzzy line? It should look like that (fr-FR): 62284 #: koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc:38 62285 msgid "Tomorrow" 62286 msgstr "Demain" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 --- Comment #10 from David Nind <david@davidnind.com> --- (In reply to Jonathan Druart from comment #9)
Did you remove the fuzzy line? It should look like that (fr-FR):
I didn't - this now works as expected now. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 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=29588 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128102|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 128121 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128121&action=edit Bug 29588: (bug 29478 follow-up) Make strings translatable "or", "Yesterday", "Today" and "Tomorrow" are not translatable, we are using __ when _ should be used (__ is for .js files only). Test plan: 0. Apply the patch 1. cd misc/translator && perl translate update fr-FR 2. Edit misc/translator/po/fr-FR-staff-prog.po Search for "or", "Yesterday", "Today" and "Tomorrow" and translate them 3. cd misc/translator && perl translate install fr-FR 4. Enable fr-FR (syspref 'language') 5. Edit a patron and an item and confirm that the flatpickr widget has the strings correctly translated 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=29588 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128121|0 |1 is obsolete| | --- Comment #12 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Created attachment 128126 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128126&action=edit Bug 29588: (bug 29478 follow-up) Make strings translatable "or", "Yesterday", "Today" and "Tomorrow" are not translatable, we are using __ when _ should be used (__ is for .js files only). Test plan: 0. Apply the patch 1. cd misc/translator && perl translate update fr-FR 2. Edit misc/translator/po/fr-FR-staff-prog.po Search for "or", "Yesterday", "Today" and "Tomorrow" and translate them 3. cd misc/translator && perl translate install fr-FR 4. Enable fr-FR (syspref 'language') 5. Edit a patron and an item and confirm that the flatpickr widget has the strings correctly translated Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: ThibaudGLT <thibaud.guillot@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128126|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 128509 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128509&action=edit Bug 29588: (bug 29478 follow-up) Make strings translatable "or", "Yesterday", "Today" and "Tomorrow" are not translatable, we are using __ when _ should be used (__ is for .js files only). Test plan: 0. Apply the patch 1. cd misc/translator && perl translate update fr-FR 2. Edit misc/translator/po/fr-FR-staff-prog.po Search for "or", "Yesterday", "Today" and "Tomorrow" and translate them 3. cd misc/translator && perl translate install fr-FR 4. Enable fr-FR (syspref 'language') 5. Edit a patron and an item and confirm that the flatpickr widget has the strings correctly translated Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: ThibaudGLT <thibaud.guillot@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Man.. that's an easy hole to fall into! Works as expected now, Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 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=29588 --- Comment #15 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=29588 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes "or", release notes| |"Yesterday", "Today" and | |"Tomorrow" in the flatpickr | |date selector so they can | |be translated. (This was | |because __ was used when _ | |should have been used (__ | |is for .js files only)). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|22.05.00 |22.05.00,21.11.02 released in| | CC| |kyle@bywatersolutions.com --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29588 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |andrew@bywatersolutions.com Status|Pushed to stable |RESOLVED --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Missing dependency, not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org