Bug 22904: Untranslatable strings in members-menu.js
authorOwen Leonard <oleonard@myacpl.org>
Tue, 14 May 2019 13:43:12 +0000 (13:43 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 30 May 2019 20:20:20 +0000 (21:20 +0100)
commit9c411575078b529e57e98c808ab7eb2facef1e65
treeda07a5fb860c5af28e52643d9edf54c6200c6ddd
parente83e2a47a3fc490634be78750e5464ffef894667
Bug 22904: Untranslatable strings in members-menu.js

This patch moves several English strings out of members-menu.js and into
str/members-menu.inc where they can be picked up by the translation
process. The following strings are affected:

"Are you sure you want to renew this patron's registration?"
"Are you sure you want to update this child to an Adult category?  This
cannot be undone."
"Dates of birth should be entered in the format 'MM/DD/YYYY'"
"Dates of birth should be entered in the format 'YYYY-MM-DD'"
"Dates of birth should be entered in the format 'DD/MM/YYYY'"
"Dates of birth should be entered in the format 'DD.MM.YYYY'"

This patch also makes a correction to members-toolbar.inc in order to
enable the presence of the "Update child to Adult" menu item.

To test:

 - Install and update a language.
 - Check the po-file for that language. You should find no msgid for
   the strings listed above.
 - Apply the patch.
 - Update the language you installed.
 - You should find entries for all the strings above.
 - Translate those messages and update the translated templates.
 - Reinstall the translation.

In the staff client:

 - Select your updated translation.
 - Open an expired patron's account and choose "Renew patron" from the
   "More" button in the toolbar. You should be prompted for confirmation
   using the translation you provided.
 - To test the "Update child" confirmation you should have only one
   patron category in the "Adult" category.
   - Open a patron record with a child category and choose "Update
     child" from the "More" menu in the toolbar. You should be prompted
     for confirmation using the translation you provided.
 - To test the date format messages: From the patrons home page, expand
   the advanced search options in the header search form. Select "Date
   of birth" under "Search fields." A correctly-translated tooltip
   should appear above the search field.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f5894d41d21b3d57217397f7d8de500082e66157)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc
koha-tmpl/intranet-tmpl/prog/js/members-menu.js