From db9975db23c98d6a131a42f91e31796c8be179cf Mon Sep 17 00:00:00 2001 From: =?utf8?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 NOTE: Followed test plan similar to bug 18776 comment 3. Signed-off-by: Mark Tompsett Signed-off-by: Jonathan Druart (cherry picked from commit 9ed4bdc87e92506ba4a51f92cc198f3c5ce282eb) Signed-off-by: Fridolin Somers (cherry picked from commit b17412da1b14dca4d42ed534482abdeff1c2fd2f) Signed-off-by: Katrin Fischer --- .../bootstrap/en/modules/opac-memberentry.tt | 242 +++++++----------- 1 file changed, 93 insertions(+), 149 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 02acab9512..25b5dbd0d4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -70,7 +70,7 @@ [% END %] [% END %] - Please correct the errors and resubmit. + Please correct and resubmit. [% END %] @@ -81,7 +81,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,10 +117,8 @@
- [% 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 @@ -128,12 +126,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') %] -