[Koha-bugs] [Bug 26244] Move translatable strings out of memberentrygen.tt and into JavaScript

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 19 20:09:08 CEST 2020


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

--- Comment #1 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 108688
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108688&action=edit
Bug 26243: Move translatable strings out of memberentrygen.tt and into
JavaScript

This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

Note: I was unable to trigger the confirmation message in the
check_form_borrowers function. I think the form is now structured in a
way that it is never triggered, thus a candidate for removal.

To test:

- Apply the patch and go to Patrons.
- Add or edit a patron.
- Select a date of birth at least one month in the past and confirm that
  the patron's age is displayed in the hint below.
- Test multiple variations to confirm that the singular and plural of
  'year' and 'month' display correctly. (e.g. 1 year 9 months, 2 years,
  etc).
- Set some patron messaging preferences for the patron.
- Change the patron category.
- You should get a confirmation: "Change messaging preferences to
  default for this category?"

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/members.js for translation, e.g.:

  msgid "%s years"
  msgstr ""

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

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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


More information about the Koha-bugs mailing list