From ae1a755cb65170388d3aa639f09c7412f7f70bd0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 22 Jun 2023 12:35:34 +0000 Subject: [PATCH] Bug 34247: Improve translation of notice character count This patch restructures the template markup around the part of the notice edit screen where the system tracks how many characters have been entered in an SMS message. The change is intended to make translation easier. To test, apply the patch and run the translation script to update the .po files, e.g. perl misc/translator/translate update fr-FR Check the updated .po files: - In fr-FR-staff-prog.po there should not be a line with the string "160 characters" - In fr-FR-messages.po the string should have been picked up like this: msgid "{content_length} / 160 characters" msgstr "" - Add a translation to fr-FR-messages.pl and install the updated translation: perl misc/translator/translate install fr-FR - Switch to the update language in the staff interface and go to Tools -> Notices. Edit any notice and expand the "SMS" block. (you may be asked to enable SMSSendDriver). - Confirm that the "X/160 characters" text updates correctly as you enter content into the textarea. Confirm that the same is true when you switch to your updated translation. --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 7ffbee6dd5..f2e6eeca38 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -588,10 +588,11 @@ [% IF letter.message_transport_type == 'sms' %] [% IF letter.content && letter.content.length > 0 %] - [% letter.content.length | html %] + [% tx("{content_length} / 160 characters", {content_length = letter.content.length} ) %] [% ELSE %] - 0 - [% END %]/160 characters + [% tx("{content_length} / 160 characters", {content_length = 0} ) %] + [% END %] + [% END %] -- 2.30.2