From 8974b0ff1cfbd97dc69d0ad20b8a578b2197c616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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) 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 --- .../opac-tmpl/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 af02508..a1910f3 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
@@ -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 a23a032..ec06d1d 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 ); -- 1.7.10.4