From 24fe6203aa8da135e744428856cc97fb35e6037e Mon Sep 17 00:00:00 2001
From: Pasi Kallinen <pasi.kallinen@pttk.fi>
Date: Tue, 6 May 2014 11:20:59 +0300
Subject: [PATCH] Bug 11364: Label layout types and text justification types
are not translatable
To test:
1) cd misc/translator
2) perl translate update xx-YY
3) check that there's no msgids that contain the layout types or
text justification types in po/xx-YY-i-staff-t-prog-v-3006000.po
4) apply patch
5) perl translate update xx-YY
6) check po/xx-YY-i-staff-t-prog-v-3006000.po that it contains the
msgid for the frequencies. (search for "BLOCK translate_label_types"
and "BLOCK translate_justification_types")
---
.../prog/en/modules/labels/label-edit-layout.tt | 24 ++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt
index 583f6f0..b5d82c5 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt
@@ -1,3 +1,12 @@
+[% BLOCK translate_label_types %]
+[% SWITCH type %]
+[% CASE 'BIB' %]Biblio
+[% CASE 'BARBIB' %]Barcode/Biblio
+[% CASE 'BIBBAR' %]Biblio/Barcode
+[% CASE 'ALT' %]Alternating
+[% CASE 'BAR' %]Barcode
+[% END %]
+[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Labels</title>
[% INCLUDE 'doc-head-close.inc' %]
@@ -19,6 +28,13 @@
//]]>
</script>
</head>
+[% BLOCK translate_justification_types %]
+[% SWITCH type %]
+[% CASE 'L' %]Left
+[% CASE 'C' %]Center
+[% CASE 'R' %]Right
+[% END %]
+[% END %]
<body id="labels_label-edit-layout" class="tools labels">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
@@ -58,9 +74,9 @@
<select name="printing_type" id="printing_type">
[% FOREACH label_type IN label_types %]
[% IF ( label_type.selected ) %]
- <option value="[% label_type.type %]" selected="selected">[% label_type.name %]</option>
+ <option value="[% label_type.type %]" selected="selected">[% PROCESS translate_label_types type=label_type.type %]</option>
[% ELSE %]
- <option value="[% label_type.type %]">[% label_type.name %]</option>
+ <option value="[% label_type.type %]">[% PROCESS translate_label_types type=label_type.type %]</option>
[% END %]
[% END %]
</select>
@@ -132,9 +148,9 @@
<select name="text_justify" id="text_justify">
[% FOREACH text_justification_type IN text_justification_types %]
[% IF ( text_justification_type.selected ) %]
- <option value="[% text_justification_type.type %]" selected="selected">[% text_justification_type.name %]</option>
+ <option value="[% text_justification_type.type %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
[% ELSE %]
- <option value="[% text_justification_type.type %]">[% text_justification_type.name %]</option>
+ <option value="[% text_justification_type.type %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
[% END %]
[% END %]
</select>
--
1.8.3.2