From ebac54dfea4731eef0e5f7385aaf248d7adc0d35 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 22 Apr 2014 08:22:14 -0300 Subject: [PATCH] Bug 12062: Untranslatable "Reserve not found" This patch rewrites transfer slip code to make some strings translatable. Also simplifies some code and parameters. To test: 1) Produce a transfer slip, no changes must be noted. 2) Update PO file, new strings msgid "%s %s%s%sNo hold found%s %s %s " msgid "%s%s%sNo hold found%s " msgid "Koha › Circulation › Transfers" Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- circ/hold-transfer-slip.pl | 14 ++------------ .../prog/en/modules/circ/printslip.tt | 10 +++++----- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl index 8ae5d2a2f4..956fd14195 100755 --- a/circ/hold-transfer-slip.pl +++ b/circ/hold-transfer-slip.pl @@ -57,18 +57,8 @@ if ( my $letter = ReserveSlip ($session->param('branch') || $userenv->{branch}, $slip = $letter->{content}; $is_html = $letter->{is_html}; } -else { - $slip = "Reserve not found"; -} -$template->param( - slip => $slip, - plain => !$is_html, - title => "Koha -- Circulation: Transfers", - stylesheet => C4::Context->preference("SlipCSS"), -); +$template->param( slip => $slip ) if ($slip); +$template->param( plain => !$is_html ); output_html_with_http_headers $input, $cookie, $template->output; - - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt index 8e2b25be41..8603e16d98 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt @@ -1,11 +1,11 @@ [% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] -[% title %] +Koha › Circulation › Transfers -[% IF stylesheet %] - +[% IF ( Koha.Preference('SlipCSS') ) %] + [% END %] [% INCLUDE 'slip-print.inc' #printThenClose %] @@ -15,10 +15,10 @@ [% IF plain %]
-[% slip %]
+[% IF ( slip ) %][% slip %][% ELSE %]No hold found[% END %]
 
[% ELSE %] -[% slip %] +[% IF ( slip ) %][% slip %][% ELSE %]No hold found[% END %] [% END %] [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5