Koha/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc
Owen Leonard f5894d41d2 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>
2019-05-30 10:06:18 +00:00

43 lines
1.9 KiB
PHP

[% USE scalar %]
[% USE Koha %]
[% USE Categories %]
<script>
var MSG_CONFIRM_RENEW_PATRON = _("Are you sure you want to renew this patron's registration?");
var MSG_CONFIRM_UPDATE_CHILD = _("Are you sure you want to update this child to an Adult category? This cannot be undone.");
var MSG_DATE_FORMAT_US = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
var MSG_DATE_FORMAT_ISO = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
var MSG_DATE_FORMAT_METRIC = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
var MSG_DATE_FORMAT_DMYDOT = _("Dates of birth should be entered in the format 'DD.MM.YYYY'");
var advsearch = "[% advsearch | html %]";
var destination = "[% destination | html %]";
var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers | html %]";
var dateformat = "[% Koha.Preference('dateformat') | html %]";
var borrowernumber;
var number_of_adult_categories = 0;
[% IF patron %]
borrowernumber = "[% patron.borrowernumber | html %]";
[% IF patron.is_child %]
[% SET adult_categories = Categories.scalar.all(category_type => 'A') %]
[% SET number_of_adult_categories = adult_categories.count %]
number_of_adult_categories = [% number_of_adult_categories | html %]
[% END %]
[% END %]
[% IF ( patron.image ) %]
$("body").on("click", "#delpicture", function(){
return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
});
$('#manage-patron-image').find("input[value*=Upload]").click(function(){
if($("#uploadfile").val() == ""){
alert(_("Please choose a file to upload"));
return false;
}
return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
});
[% END %]
</script>