Bug 27644: (follow-up) Wrap strings in translation function
authorOwen Leonard <oleonard@myacpl.org>
Wed, 7 Apr 2021 18:09:09 +0000 (18:09 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 21 Apr 2021 13:25:07 +0000 (15:25 +0200)
commit983feccf648cd3c77d05795cfc0eb2c098977835
treefb9eb68af01983647911951facd88cc69d074054
parentc9a15b73f01796e1f6f71e5eca8efbee94958af5
Bug 27644: (follow-up) Wrap strings in translation function

This patch updates the in-template JavaScript so that some English
strings which were previously untranslatable. This patch wraps them in
the _() function.

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
  JavaScript  e.g.  misc/translator/po/fr-FR-staff-prog.po
- Locate strings pulled from reports/guided_reports_start.tt for
  translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt:1324
  #, fuzzy, c-format
  msgid "Authorized value category:"
  msgstr "Catégorie de valeur autorisée&nbsp;: "

- Edit the "msgstr" string if necessary, or remove the "fuzzy," before
  "c-format"
- Install the updated translation:

  > perl translate install fr-FR

In the staff interface, switch to the language you're testing. Confirm
that your translated strings appear. In this case, test in particular:

 - The controls on the modal window when you preview a report's SQL from
   the list of saved reports.
 - The controls and modal dialog for inserting a runtime parameter.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt