From 9d692b10995f3848e375b7208fe8ca87be367ff2 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 31 Aug 2023 15:55:26 +0000 Subject: [PATCH] Bug 33766: (follow-up) Enable translation for strings In my test the strings inside a SET directive were not picked up for translation. This patch adds the t() function around the new strings in order to allow them to be translated. To test, apply the patch and test the translation process for any language, in this example fr-FR: - Run 'perl translate update fr-FR' - Open misc/translator/po/fr-FR-messages.po - Look for the affected strings: "Username", "Cardnumber", and "Cardnumber or username." - Update the po file with translations of the strings - Run 'perl translate install fr-FR' - View the OPAC in your translated language and test each setting of OPACLoginLabelTextContent to confirm that the translated strings appear. --- koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc index 2dcd70c546..4ce9794f77 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc @@ -171,11 +171,11 @@ [% BLOCK login_label %] [%- SET preference_value = Koha.Preference('OPACLoginLabelTextContent') %] - [%- SET label = "Cardnumber" %] + [%- SET label = t("Cardnumber") %] [%- IF preference_value == "username" %] - [%- SET label = "Username" %] + [%- SET label = t("Username") %] [%- ELSIF preference_value == "cardnumberorusername" %] - [%- SET label = "Cardnumber or username" %] + [%- SET label = t("Cardnumber or username") %] [%- END %] [% END %] -- 2.39.2