[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
Thu Mar 31 20:13:01 CEST 2022


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

Kyle M Hall <kyle at bywatersolutions.com> changed:

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

--- Comment #7 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 132806
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132806&action=edit
Bug 26244: 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.

Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

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


More information about the Koha-bugs mailing list