| Summary: | Input prompt in datatables column search boxes 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: | minor | ||
| Priority: | P5 - low | CC: | dcook, f.demians, fridolin.somers |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.04,22.11.10
|
|
| Circulation function: | |||
| Attachments: |
Bug 34310: Input prompt in datatables column search boxes untranslatable
Bug 34310: Input prompt in datatables column search boxes untranslatable Bug 34310: Input prompt in datatables column search boxes untranslatable |
||
|
Description
Caroline Cyr La Rose
2023-07-19 15:50:19 UTC
Created attachment 153717 [details] [review] Bug 34310: Input prompt in datatables column search boxes untranslatable This patch corrects the internationalization function wrapped around the "% search" string in datatables.js. It should be the double-underscore function instead of the single-underscore. To test, apply the patch and test that the placeholder string is translatable. In this example I'm testing fr-FR: - Update a translation: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from prog/js/datatables.js for translation, e.g.: \#: koha-tmpl/intranet-tmpl/prog/js/datatables.js:894 \#, javascript-format msgid "%s search" msgstr "%s recherche" - Install the updated translation: > perl translate install fr-FR In the staff interface, test a page that has column header filters, e.g. patron search. Confirm that the table of search results shows the translated string in the column header placeholders. Created attachment 153742 [details] [review] Bug 34310: Input prompt in datatables column search boxes untranslatable This patch corrects the internationalization function wrapped around the "% search" string in datatables.js. It should be the double-underscore function instead of the single-underscore. To test, apply the patch and test that the placeholder string is translatable. In this example I'm testing fr-FR: - Update a translation: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from prog/js/datatables.js for translation, e.g.: \#: koha-tmpl/intranet-tmpl/prog/js/datatables.js:894 \#, javascript-format msgid "%s search" msgstr "%s recherche" - Install the updated translation: > perl translate install fr-FR In the staff interface, test a page that has column header filters, e.g. patron search. Confirm that the table of search results shows the translated string in the column header placeholders. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Thanks Owen! There is a little issue with the aria-label for "Expires on" but that's unrelated to this change. Created attachment 155252 [details] [review] Bug 34310: Input prompt in datatables column search boxes untranslatable This patch corrects the internationalization function wrapped around the "% search" string in datatables.js. It should be the double-underscore function instead of the single-underscore. To test, apply the patch and test that the placeholder string is translatable. In this example I'm testing fr-FR: - Update a translation: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from prog/js/datatables.js for translation, e.g.: \#: koha-tmpl/intranet-tmpl/prog/js/datatables.js:894 \#, javascript-format msgid "%s search" msgstr "%s recherche" - Install the updated translation: > perl translate install fr-FR In the staff interface, test a page that has column header filters, e.g. patron search. Confirm that the table of search results shows the translated string in the column header placeholders. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Pushed to master for 23.11. Nice work everyone, thanks! This should be in QA tools : https://gitlab.com/koha-community/qa-test-tools/-/issues/55 Or in test suite. Pushed to 23.05.x for 23.05.04 Nice work everyone! Pushed to oldstable for 22.11.x |