When viewing a table (for example, the memberresultst table), there are search boxes under each column heading. The prompt inside these boxes say, for example "Card search", "Name search", "Date of birth search", etc. When I switch the interface in French or German, the Card/Name/Date of birth parts are translated, but "search" part is not translated. I cannot find the string to translate this. It would need to be "%s search" so we can move the words around. To replicate: 1. In the staff interface, go to Patrons 2. Click the Search button on the left --> Search results appear in a table, search boxes have prompts like "Card search" 3. Optionally, switch the interface to another language --> Only the column name part (e.g. Card) is translated
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