From b37ad5ef069c830438e6cb32069bbc0f90ae054f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 10 Jan 2014 15:46:29 -0500 Subject: [PATCH] Bug 11505 - 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 --- .../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 bde821a..54ff3bd 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 %] -- 1.8.5.2