Summary: | "Click to edit" in Point of sale is untranslatable | ||
---|---|---|---|
Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Component: | I18N/L10N | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | andrew, f.demians, fridolin.somers, martin.renvoize, oleonard |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.04
|
|
Circulation function: | |||
Attachments: |
Bug 27816: "Click to edit" in Point of sale is untranslatable
Bug 27816: "Click to edit" in Point of sale is untranslatable |
Description
Caroline Cyr La Rose
2021-02-26 19:20:07 UTC
Hm, I had a look into fixing this, but it seems to come from here: koha-tmpl/intranet-tmpl/lib/datatables/datatables.js: * "defaultContent": "Click to edit" I am not sure how to deal with the string in the datatables library. Created attachment 118251 [details] [review] Bug 27816: "Click to edit" in Point of sale is untranslatable This patch adds an option to the Point of sale jEditable configuration to explicitly set the title attribute to "Click to edit." This will allow the string to be picked up for translation. To test, apply the patch and test that the correct string is translated. In this example I'm testing fr-FR: - Update a translation: > cd misc/translator > perl translate update fr-FR The "Click to edit" string should already have been translated, so it's not necessary to update the .po file. - Install the updated translation: > perl translate install fr-FR In the staff interface, switch to the language you're testing and open the point of sale page. Add some items for purchase. They should appear in the "This sale" table. Hover your mouse over the values in the "Coût" and "Quantité" columns. You should see the translated string, "Cliquer pour modifier." Nice, thanks Owen, I hadn't got to working out where the magic happens for this one yet [U+1F600] Nice, thanks Owen, I hadn't got to working out where the magic happens for this one yet [U+1F600] Created attachment 118327 [details] [review] Bug 27816: "Click to edit" in Point of sale is untranslatable This patch adds an option to the Point of sale jEditable configuration to explicitly set the title attribute to "Click to edit." This will allow the string to be picked up for translation. To test, apply the patch and test that the correct string is translated. In this example I'm testing fr-FR: - Update a translation: > cd misc/translator > perl translate update fr-FR The "Click to edit" string should already have been translated, so it's not necessary to update the .po file. - Install the updated translation: > perl translate install fr-FR In the staff interface, switch to the language you're testing and open the point of sale page. Add some items for purchase. They should appear in the "This sale" table. Hover your mouse over the values in the "Coût" and "Quantité" columns. You should see the translated string, "Cliquer pour modifier." Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Works perfectly.. going for a straight QA on this one. Pushed to master for 21.05, thanks to everybody involved! Small useful enhancement, I choose to backport. Pushed to 20.11.x for 20.11.04 Enhancement, not backported to 20.05 (In reply to Andrew Fuerste-Henry from comment #9) > Enhancement, not backported to 20.05 Actually a bug - fixed the status. |