From 1c9e281e3981f965d61070644d14456a3a5f630c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Fri, 10 Jun 2016 10:25:54 +0200 Subject: [PATCH] Bug 16621: Translatability: Issues in opac-user.tt (sentence splitting) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes issues due to sentence splitting in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt Note: This is a string patch. It does not add or change functionallity. To test: - Examine code and verify that the text changes remove sentence splitting and that the changes make sense. - Log in to OPAC and verify that messages look correct - with blocked /debarred user (with and without comment and date) - with user who has to much fines (needs syspref OpacRenewalAllowed and syspref OPACFineNoRenewals) - with user who has his card marked as lost - with user with an account that is about to expire - with user with expired account - with user with uncertain address information (with and without syspref OPACPatronDetails set to Allow) Note: Amended to make patch apply 2016-07-10 mv Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit dc1ff4efff70cabfad5b8e2e69e7a9448cc61e16) Signed-off-by: Frédéric Demians --- .../bootstrap/en/modules/opac-user.tt | 34 +++++++++---------- opac/opac-user.pl | 7 ++-- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index af025085c4..a1910f3119 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -2,6 +2,7 @@ [% USE KohaDates %] [% USE Branches %] [% USE ItemTypes %] +[% USE Price %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your library home @@ -103,25 +104,22 @@ Using this account is not recommended because some parts of Koha will not functi
    [% IF ( userdebarred ) %] -
  • Please note: Your account has been frozen[% IF ( BORROWER_INFO.userdebarreddate ) %] until [% BORROWER_INFO.userdebarreddate | $KohaDates %][% END %] - [% IF ( BORROWER_INFO.debarredcomment ) %] with the comment - - [% IF BORROWER_INFO.debarredcomment.search('OVERDUES_PROCESS') %] - "Restriction added by overdues process [% BORROWER_INFO.debarredcomment.remove('OVERDUES_PROCESS ') %]" - [% ELSE %] - [% BORROWER_INFO.debarredcomment %] - [% END %] - - [% END %]. Usually the reason for freezing an account is old overdues or damage fees. If your account page shows your account to be clear, please contact the library.
  • +
  • Please note: Your account has been frozen. + [% IF ( BORROWER_INFO.debarredcomment ) %] Comment: "[% BORROWER_INFO.debarredcomment %]"[% END %] + [% IF ( BORROWER_INFO.userdebarreddate ) %] End date: [% BORROWER_INFO.userdebarreddate | $KohaDates %][% END %] + Usually the reason for freezing an account is old overdues or damage fees. If your account shows to be clear, please contact the library. Go to your account page
  • [% END %] [% IF ( BORROWER_INFO.gonenoaddress ) %] -
  • Please note: According to our records, we don't have up-to-date [% UNLESS OPACPatronDetails %]contact information[% ELSE %]contact information[% END %] on file. Please contact the library[% IF OPACPatronDetails %] or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)[% END %].
  • +
  • Please note: According to our records, we don't have up-to-date contact information. Please contact the library. + [% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %] + [% IF ( Koha.Preference('OPACPatronDetails') ) %](Please note: there may be a delay in restoring your account if you submit online.)[% END %] +
  • [% END %] [% IF ( BORROWER_INFO.lost ) %] -
  • Please note: Your library card has been marked as lost or stolen. If this is an error, please contact the library.
  • +
  • Please note: Your library card has been marked as lost or stolen. If this is an error, please contact the library.
  • [% END %] - [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %] -
  • Please note: Since you have [% IF renewal_blocked_fines != "0.00" %] more than [% renewal_blocked_fines %] in [% END %] fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
  • + [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %] +
  • Please note: You cannot renew your books online. Reason: [% IF ( renewal_blocked_fines ) > 0 %]Your fines exceed [% renewal_blocked_fines | $Price %].[% ELSE %]You have fines.[% END %] [% END %]
@@ -136,9 +134,9 @@ Using this account is not recommended because some parts of Koha will not functi [% IF relatives %]
  • Relatives' checkouts
  • [% END %] [% IF ( overdues_count ) %]
  • Overdue ([% overdues_count %])
  • [% END %] [% IF ( OPACFinesTab ) %] - [% IF ( BORROWER_INFO.amountoverfive ) %]
  • Fines ([% BORROWER_INFO.amountoutstanding %])
  • [% END %] - [% IF ( BORROWER_INFO.amountoverzero ) %]
  • Fines ([% BORROWER_INFO.amountoutstanding %])
  • [% END %] - [% IF ( BORROWER_INFO.amountlessthanzero ) %]
  • Credits ([% BORROWER_INFO.amountoutstanding %])
  • [% END %] + [% IF ( BORROWER_INFO.amountoverfive ) %]
  • Fines ([% BORROWER_INFO.amountoutstanding | $Price %])
  • [% END %] + [% IF ( BORROWER_INFO.amountoverzero ) %]
  • Fines ([% BORROWER_INFO.amountoutstanding | $Price %])
  • [% END %] + [% IF ( BORROWER_INFO.amountlessthanzero ) %]
  • Credits ([% BORROWER_INFO.amountoutstanding | $Price %])
  • [% END %] [% END %] [% IF ( RESERVES.count ) %]
  • Holds ([% RESERVES.count %])
  • [% END %] @@ -321,7 +319,7 @@ Using this account is not recommended because some parts of Koha will not functi You currently owe fines and charges amounting to: - [% BORROWER_INFO.amountoutstanding %] + [% BORROWER_INFO.amountoutstanding | $Price %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index a23a032aca..ec06d1d45d 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -122,9 +122,8 @@ if ( C4::Context->preference('OpacRenewalAllowed') $borr->{'flagged'} = 1; $canrenew = 0; $template->param( - renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), - renewal_blocked_fines_amountoutstanding => - sprintf( '%.02f', $borr->{amountoutstanding} ), + renewal_blocked_fines => $no_renewal_amt, + renewal_blocked_fines_amountoutstanding => $borr->{amountoutstanding}, ); } @@ -133,8 +132,6 @@ if ( $borr->{'amountoutstanding'} < 0 ) { $borr->{'amountoutstanding'} = -1 * ( $borr->{'amountoutstanding'} ); } -$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; - # Warningdate is the date that the warning starts appearing if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) { my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day ); -- 2.39.5