[Koha-bugs] [Bug 25321] Move translatable strings out of strings.inc into the corresponding JavaScript

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 18 18:55:00 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25321

Owen Leonard <oleonard at myacpl.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #106026|0                           |1
        is obsolete|                            |

--- Comment #3 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 106027
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106027&action=edit
Bug 25321: (Part 1) Move translatable strings out of strings.inc into
checkouts.js

This patch movies translatable strings out of an include file and into
the JavaScript file where the string is used. It is no longer necessary
to have such strings in a Template::Toolkit file in order for them to be
translated.

To test, apply the patch and test that the correct strings appear in
the staff client. For instance:

 - The "Claim returned" button in the patron's table of checkouts.
 - The "Today's checkouts" and "Previous checkouts" headers in the table
   of checkouts.
 - The "On hold" message in the "Renew" column in the table of checkouts
   when the item is on hold for another patron.

Test that the correct strings are 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/checkouts.js for
   translation, e.g.:

   #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:560
   msgid "Claim returned"
   msgstr ""

 - Edit the "msgstr" string however you want (it's just for testing)
 - Install the updated translation:

   > perl translate install fr-FR

In the staff client, switch to the language you're testing. Confirm that
your translated string appears. In the above example, by opening the
checkouts page for a patron who has items checked out. In the "Déclarés
rendus" column, confirm that the "Claim returned" button text appears as
you translated it.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list