From c8bc38a682d322378ef3a2d2e19d9aadab1d362d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 10 Jan 2014 15:46:29 -0500 Subject: [PATCH] Bug 11505: fix untranslatable table headers in Label batch manager The label batch manager script hard-codes the table header cell labels in order to pass them to an HTML-building function. This obviously isn't the best solution for internationalization, but picking the whole scheme apart would be very complicated. Instead this patch uses a SWITCH statement to check for each possible case and outputs the correct translatable string for each. To test, apply the patch and run "perl translate update" for any translation. Check the revised po file and confirm that the new strings are present. View the label batch edit page and confirm that the table headings look correct: Tools -> Labels -> Manage batches -> Edit batch. Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Works as described, passes all tests. Similar fixes are probably needed for other pages of the labels modules. Signed-off-by: Galen Charlton (cherry picked from commit e8f5ee9eef7a558ae1af8237493f8dc52e52945a) Signed-off-by: Fridolin Somers --- .../prog/en/modules/labels/label-edit-batch.tt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index bde821af2f..54ff3bd501 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -197,7 +197,20 @@ [% IF ( table_loo.header_fields ) %] [% FOREACH header_field IN table_loo.header_fields %] - [% header_field.field_label %] + [% SWITCH header_field.field_label -%] + [% CASE "Label Number" -%] + Label number + [% CASE "Summary" -%] + Summary + [% CASE "Item Type" %] + Item type + [% CASE "Barcode" %] + Barcode + [% CASE "Select" -%] + Select + [% CASE %] + [% header_field.field_label %] + [% END -%] [% END %] [% ELSE %] -- 2.39.5