From ad76e51cf0ada5539f148baae9822ae4927037db Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Thu, 14 Aug 2014 19:46:57 -0300 Subject: [PATCH] [PASSED QA] Bug 11504: Untranslatable "Item Type" or "Collection Code" in branch transfer limits This patch makes reported strings translatable. To test: 1. Go to Administration > Library transfer limits 2. Depending on the value of BranchTransferLimitsType your may see in a box: a) For *all* Collection codes: b) For *all* Item types: change system preference to show both values 3. Update translation files for your preferred language check new entry msgid "%sCollection codes%sItem types%s: " Not pretty but can be translated. Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer I have to confess that I lower cased the collections and item types as they appear in a sentence. No other changes made and this works nicely. --- admin/branch_transfer_limits.pl | 8 ++------ .../intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/admin/branch_transfer_limits.pl b/admin/branch_transfer_limits.pl index 4aa41dd..f94f666 100755 --- a/admin/branch_transfer_limits.pl +++ b/admin/branch_transfer_limits.pl @@ -64,12 +64,8 @@ for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{b } -# Set the template language for the correct limit type -my $limit_phrase = 'Collection Code'; +# Set the template language for the correct limit type using $limitType my $limitType = C4::Context->preference("BranchTransferLimitsType") || "ccode"; -if ( $limitType eq 'itemtype' ) { - $limit_phrase = 'Item Type'; -} my @codes; my @branchcodes; @@ -143,7 +139,7 @@ $template->param( branchcode_loop => \@branchcode_loop, branchcode => $branchcode, branchname => $branchname, - limit_phrase => $limit_phrase, + limitType => $limitType, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 5c10b0d..7e8165f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -70,7 +70,7 @@

Check the boxes for the libraries you accept to checkin items from.

-
For all [% limit_phrase %]s: Check all | Uncheck all
+
For all [% IF ( limitType == 'ccode' ) %]collection codes[% ELSE %]item types[% END %]: Check all | Uncheck all
-- 1.9.1