Bugzilla – Attachment 109424 Details for
Bug 26334
Move translatable strings out of members-menu.inc into members-menu.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26334: Move translatable strings out of members-menu.inc into members-menu.js
Bug-26334-Move-translatable-strings-out-of-members.patch (text/plain), 4.86 KB, created by
Owen Leonard
on 2020-09-01 12:50:07 UTC
(
hide
)
Description:
Bug 26334: Move translatable strings out of members-menu.inc into members-menu.js
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-09-01 12:50:07 UTC
Size:
4.86 KB
patch
obsolete
>From ea20380b17ececb2e53f7006b050be053062c89d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 1 Sep 2020 12:24:57 +0000 >Subject: [PATCH] Bug 26334: Move translatable strings out of members-menu.inc > into members-menu.js > >This patch moves translatable strings out of members-menu.inc into >members-menu.js where they can be translated using the double-underscore >i18n function. > >To test, apply the patch and go to Patrons. > >- Expand the search options in the search header by clicking the [+] > link. >- Select "Date of birth" from the "Search fields" dropdown. > - A tooltip should appear above the search form, "Dates of birth > should be entered in the format..." with your current date format. >- Remove all "Adult" type patron categories but one. > - Check out to a child patron. > - From the "More" menu choose "Update child to adult patron." > - You should see a confirmation. >- From the checkout screen, from the "More" menu, choose "Renew patron" > - You should get a confirmation. >--- > .../intranet-tmpl/prog/en/includes/str/members-menu.inc | 7 ------- > koha-tmpl/intranet-tmpl/prog/js/members-menu.js | 14 +++++++------- > 2 files changed, 7 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc >index d07cf4602e..6f47bda714 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc >@@ -3,13 +3,6 @@ > [% USE Categories %] > <!-- str/members-menu.inc --> > <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 %]"; > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >index f5458cfea4..9db8b24bbe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >@@ -1,4 +1,4 @@ >-/* global borrowernumber advsearch dateformat _ CAN_user_borrowers_edit_borrowers number_of_adult_categories destination Sticky MSG_DATE_FORMAT_US MSG_DATE_FORMAT_ISO MSG_DATE_FORMAT_METRIC MSG_DATE_FORMAT_DMYDOT MSG_CONFIRM_UPDATE_CHILD MSG_CONFIRM_RENEW_PATRON */ >+/* global borrowernumber advsearch dateformat __ CAN_user_borrowers_edit_borrowers number_of_adult_categories destination Sticky */ > > $(document).ready(function(){ > >@@ -106,13 +106,13 @@ function searchfield_date_tooltip(filter) { > if ( $(type).val() == 'dateofbirth' ) { > var MSG_DATE_FORMAT = ""; > if( dateformat == 'us' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_US; >+ MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'MM/DD/YYYY'"); > } else if( dateformat == 'iso' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_ISO; >+ MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'YYYY-MM-DD'"); > } else if( dateformat == 'metric' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_METRIC; >+ MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'DD/MM/YYYY'"); > } else if( dateformat == 'dmydot' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_DMYDOT; >+ MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'DD.MM.YYYY'"); > } > $(field).attr("title", MSG_DATE_FORMAT).tooltip('show'); > } else { >@@ -121,7 +121,7 @@ function searchfield_date_tooltip(filter) { > } > > function confirm_updatechild() { >- var is_confirmed = window.confirm( MSG_CONFIRM_UPDATE_CHILD ); >+ var is_confirmed = window.confirm( __("Are you sure you want to update this child to an Adult category? This cannot be undone.") ); > if (is_confirmed) { > window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=' + borrowernumber; > } >@@ -136,7 +136,7 @@ function update_child() { > } > > function confirm_reregistration() { >- var is_confirmed = window.confirm( MSG_CONFIRM_RENEW_PATRON ); >+ var is_confirmed = window.confirm( __("Are you sure you want to renew this patron's registration?") ); > if (is_confirmed) { > window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=' + borrowernumber + '&destination=' + destination + '&reregistration=y'; > } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26334
:
109424
|
109436
|
110813
|
110826