From 556f42a15fba618144f9e1af9efc543761a94041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 11 Jun 2017 20:16:46 +0200 Subject: [PATCH] Bug 18777: Translatability: Get rid of exposed tt directives in opac-memberentry.tt The file opac-memberentry.tt exposes template directives to translation where translators should not be confronted with. Example from po file: "%s [%% UNLESS hidden.defined('B_address') && hidden.defined('B_address2') && " "hidden.defined('B_city') && hidden.defined('B_state') && hidden." "defined('B_zipcode') && hidden.defined('B_country') && hidden." "defined('B_phone') && hidden.defined('B_email') && hidden." "defined('contactnote') %%] " To test: - Apply patch - Verify that advanced search in OPAC the page 'your personal details' behaves as before - Verify that you can change values and submit an update request - Create a new translation for a 'language' aa-AA (perl translate create aa-AA) - Verify that template directives ar no longer exposed in aa-AA-opac-bootstrap.p --- .../bootstrap/en/modules/opac-memberentry.tt | 244 ++++++++------------- 1 file changed, 94 insertions(+), 150 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 231e2bf..6f36f49 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -72,7 +72,7 @@ [% END %] [% END %] - Please correct the errors and resubmit. + Please correct and resubmit. [% END %] @@ -83,7 +83,7 @@ [% ELSIF cardnumber_already_exists %] The entered card number is already in use. [% END %] - Please correct this and resubmit. + Please correct and resubmit. [% END %] @@ -117,15 +117,13 @@ [% END %] [% IF ( extended_unique_id_failed_code ) %] -
[% extended_unique_id_failed_description %] value [% extended_unique_id_failed_value %] is already in use.
+
[% extended_unique_id_failed_description _ ': ' %] Value is already in use ([% extended_unique_id_failed_value %])
[% END %]
- [% UNLESS - ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && - hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') - %] + [%# Following on one line for translatability %] + [% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
Library @@ -133,12 +131,10 @@ [% UNLESS hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) %]
  • [% IF mandatory.defined('cardnumber') %] -
  • [% IF mandatory.defined('branchcode') %] -
  • [% IF mandatory.defined('surname') %] -
  • [% IF mandatory.defined('firstname') %] -
  • [% IF mandatory.defined('dateofbirth') %] -
  • [% IF mandatory.defined('initials') %] -
  • [% IF mandatory.defined('othernames') %] -