From 2bfc42dd95b04da954ac2b1d007c8b39320da68b 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 dc96b3a678..3c1e12050a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc @@ -106,11 +106,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.30.2