Bug 34247 - Improve translation of notice character count
Summary: Improve translation of notice character count
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-10 16:19 UTC by Owen Leonard
Modified: 2023-09-19 12:19 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 34247: Improve translation of notice character count (2.74 KB, patch)
2023-07-10 16:57 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34247: Improve translation of notice character count (2.81 KB, patch)
2023-08-07 15:27 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 34247: Improve translation of notice character count (2.88 KB, patch)
2023-09-01 09:15 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-07-10 16:19:58 UTC
When entering content in an SMS message notice there is a character count to count down how many characters you have left. This looks ugly in the .po file:

#: koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:589
#, c-format
msgid "%s %s %s 0 %s/160 characters"
msgstr "%s %s %s 0 %s/160 caractères"

After my proposed change:

#: koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:591
#: koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:593
#, perl-brace-format
msgid "{content_length} / 160 characters"
msgstr "{content_length} / 160 caractères"
Comment 1 Owen Leonard 2023-07-10 16:57:34 UTC
Created attachment 153288 [details] [review]
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.
Comment 2 Caroline Cyr La Rose 2023-08-07 15:27:18 UTC
Created attachment 154307 [details] [review]
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 <caroline.cyr-la-rose@inlibro.com>
Comment 3 Jonathan Druart 2023-09-01 09:15:26 UTC
Created attachment 155075 [details] [review]
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 <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Tomás Cohen Arazi 2023-09-01 14:44:46 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-09-08 05:59:02 UTC
Not backported to 23.05.x