[Bug 43260] New: Debug options in navigation bar untranslatable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 Bug ID: 43260 Summary: Debug options in navigation bar untranslatable Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: caroline.cyr-la-rose@inlibro.com, f.demians@tamil.fr, jonathan.druart@gmail.com, julian.maurice@biblibre.com Target Milestone: --- The options added by bug 39142 in the navigation bar are not translatable. I could only find "Toggle User CSS", "Toggle User JS", and "Toggle Custom Stylesheets" in the po files. But in the navbar, the options are "Disable User CSS", "Enable User CSS", "Disable User JS", "Enable User JS", "Disable Custom Stylesheets" and "Enable Custom Stylesheets". To test : cd misc/translator/po git grep "Disable User CSS" fr-CA* --> returns nothing Sorry for the weird test plan. I don't know how else to find strings. -- 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=43260 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39142 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39142 [Bug 39142] Add debug permission to allow user to toggle JS and CSS customizations on/off -- 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=43260 --- Comment #1 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Could we also fix the capitalization at the same time? And maybe the terminology? User CSS and User JS is not really clear to an end user (IMO, feel free to disagree). I would change it to - Disable/Enable custom CSS - Disable/Enable custom JS - Disable/Enable custom stylesheets -- 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=43260 Bug 43260 depends on bug 39142, which changed state. Bug 39142 Summary: Add debug permission to allow user to toggle JS and CSS customizations on/off https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39142 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- 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=43260 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=43260 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal 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=43260 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch Comma delimited| |Athens County Public list of Sponsors| |Libraries Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 203455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203455&action=edit Bug 43260: Debug options in navigation bar untranslatable These patches update the templates which control the display of the debug menu item in the staff interface header. The strings need to be wrapped in the _() i18n function. The patch also corrects capitalization and uses the term "custom" instead of "user." A follow-up patch will move this JS into js_includes.inc so that the _() is available. This patch is separate to make it easier to view the diff. Testing requires the follow-up. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 203456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203456&action=edit Bug 43260: (follow-up) Move debug menu JS into js_includes.inc The _() function isn't available to JS in intranet-bottom.inc. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from the template e.g. misc/translator/po/fr-FR-staff-prog.po - Locate strings pulled from includes/js_includes.inc for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc:105 #, fuzzy msgid "Disable custom CSS" msgstr "Désactiver " - Remove the "fuzzy" line. - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation:
perl translate install fr-FR
Log in to the staff interface as a user with debug permission. Test the debug menu in the header, confirming that the strings look correct and that the toggles work correctly. Switch to your translated templates and test again. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 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=43260 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203455|0 |1 is obsolete| | Attachment #203456|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 203504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203504&action=edit Bug 43260: Debug options in navigation bar untranslatable These patches update the templates which control the display of the debug menu item in the staff interface header. The strings need to be wrapped in the _() i18n function. The patch also corrects capitalization and uses the term "custom" instead of "user." A follow-up patch will move this JS into js_includes.inc so that the _() is available. This patch is separate to make it easier to view the diff. Testing requires the follow-up. Sponsored-by: Athens County Public Libraries 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=43260 --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 203505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203505&action=edit Bug 43260: (follow-up) Move debug menu JS into js_includes.inc The _() function isn't available to JS in intranet-bottom.inc. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from the template e.g. misc/translator/po/fr-FR-staff-prog.po - Locate strings pulled from includes/js_includes.inc for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc:105 #, fuzzy msgid "Disable custom CSS" msgstr "Désactiver " - Remove the "fuzzy" line. - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation:
perl translate install fr-FR
Log in to the staff interface as a user with debug permission. Test the debug menu in the header, confirming that the strings look correct and that the toggles work correctly. Switch to your translated templates and test again. Sponsored-by: Athens County Public Libraries 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=43260 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the "Debug release notes| |controls" options in the | |staff interface so that | |they are translatable. It | |also changes the options to | |sentence case, as per the | |coding guidelines. | | | |The debug controls menu | |that is shown in the top | |right-hand side of the top | |menu in the staff interface | |(only shows if the staff | |patron has "Display the | |debug interface (debug)" | |permissions) - options are | |now in sentence case: | |- Disable custom CSS | |- Disable custom JS | |- Disable custom | |stylesheets CC| |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=43260 --- Comment #6 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Thank you both! I didn't have time today to test but I'm happy it's SO! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m 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=43260 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I'll provide an updated test plan here because I ran into some trouble testing: - cd misc/translator/po - make sure git status is clean and git pull - return to koha root directory - gulp po:update - this should run without errors now - cd misc/translator/po git grep "Enable custom stylesheets" - Verify the string appears in the po files :) If you want to see it in action: - edit po file of chosen language - remove fuzzy and add ("nonsense") translations - sudo koha-translate --install de-DE --dev kohadev - replace de-DE with your chosen language's code - Now you can confirm your translation appears in the GUI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 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=43260 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203504|0 |1 is obsolete| | Attachment #203505|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 203605 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203605&action=edit Bug 43260: Debug options in navigation bar untranslatable These patches update the templates which control the display of the debug menu item in the staff interface header. The strings need to be wrapped in the _() i18n function. The patch also corrects capitalization and uses the term "custom" instead of "user." A follow-up patch will move this JS into js_includes.inc so that the _() is available. This patch is separate to make it easier to view the diff. Testing requires the follow-up. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> 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=43260 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 203606 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203606&action=edit Bug 43260: (follow-up) Move debug menu JS into js_includes.inc The _() function isn't available to JS in intranet-bottom.inc. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from the template e.g. misc/translator/po/fr-FR-staff-prog.po - Locate strings pulled from includes/js_includes.inc for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc:105 #, fuzzy msgid "Disable custom CSS" msgstr "Désactiver " - Remove the "fuzzy" line. - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation:
perl translate install fr-FR
Log in to the staff interface as a user with debug permission. Test the debug menu in the header, confirming that the strings look correct and that the toggles work correctly. Switch to your translated templates and test again. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> 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=43260 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.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=43260 --- Comment #10 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43260 --- Comment #11 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Since the original patch was added in 26.05, can this be backported? Thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org