From 1c0dcbf4d715e39e140baee6b8a5a09021be9b43 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. Signed-off-by: Lucas Gass --- 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 3d5cdbaaa20..16dd2888a0e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc @@ -179,11 +179,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