From 285c27c2bab89ec34071ab7315f3a6bbc2078440 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. Signed-off-by: Caroline Cyr La Rose --- 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 5fc7d0fd313..15e2633ef04 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.34.1