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 <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
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.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Bernardo Gonzalez Kriegel 2014-08-14 19:46:57 -03:00 committed by Tomas Cohen Arazi
parent 4c2467d4c5
commit 279afe660e
2 changed files with 3 additions and 7 deletions

View File

@ -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;

View File

@ -70,7 +70,7 @@
</form>
<p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
<fieldset>For <strong>all</strong> [% limit_phrase %]s: <a id="CheckAll" href="#">Check all</a> | <a id="UncheckAll" href="#">Uncheck all</a></fieldset>
<fieldset>For <strong>all</strong> [% IF ( limitType == 'ccode' ) %]collection codes[% ELSE %]item types[% END %]: <a id="CheckAll" href="#">Check all</a> | <a id="UncheckAll" href="#">Uncheck all</a></fieldset>
<div id="transferlimit_tabs" class="toptabs">