Bug 34310: Input prompt in datatables column search boxes untranslatable
authorOwen Leonard <oleonard@myacpl.org>
Thu, 20 Jul 2023 11:24:23 +0000 (11:24 +0000)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Fri, 15 Sep 2023 10:08:29 +0000 (10:08 +0000)
commitc575123dc79ad61280d84de77805fdd6e07e9ac9
tree1583a2895c44edb022b1a0a36fea5c92c787dd1e
parentba5f2ff91072490b0946fbd409c99c932627eed2
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c23f36b81218032ed2aa3f2f476fd880e2d1b704)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d1d9a3353502101e6d86411eafe0988bdf2e9185)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/js/datatables.js