| Summary: | Improve translatability of remaining renewals counters | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Angelic <angelic> |
| Component: | I18N/L10N | Assignee: | Jonathan Druart <jonathan.druart> |
| Status: | Pushed to stable --- | QA Contact: | Katrin Fischer <katrin.fischer> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | david, f.demians, jonathan.druart |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This fixes the translation strings for renewals - they now use named placeholders so that the correct order can be translated.
Example:
- In English: "4 of 5 renewals remaining"
- In Turkish:
. was incorrectly translated as "4 uzatma hakkınızdan 5 tane kaldı"
. is now correctly translated as (5 uzatma hakkınızdan 4 tane kaldı"
|
Version(s) released in: |
25.05.00,24.11.04
|
| Circulation function: | |||
| Attachments: |
Bug 38377: Improve translatability of "%s/%s renewals remaining"
Bug 38377: Improve translatability of "%s/%s renewals remaining" |
||
|
Description
Angelic
2024-11-06 12:29:59 UTC
Created attachment 174075 [details] [review] Bug 38377: Improve translatability of "%s/%s renewals remaining" See comment 0 The sentence in English: "2 of 3 renewals remaining" is translated as "2 uzatma hakkınızdan 3 tane kaldı" in Turkish. This is wrong. Right Turkish translation must be like this : "3 uzatma hakkınızdan 2 tane kaldı" We cannot use %s/%s as the order will be preserved, we need to use named placeholders. Test plan: Apply this patch % gulp po:update --lang LANG Go to misc/translator/po % git grep 'renewals remaining' Translate the occurrences, remove fuzzy sudo koha-translate --update LANG --dev kohadev restart_all Enable LANG for both staff and OPAC Have a look at the checkouts table and notice that the strings have been correctly translated Created attachment 175938 [details] [review] Bug 38377: Improve translatability of "%s/%s renewals remaining" See comment 0 The sentence in English: "2 of 3 renewals remaining" is translated as "2 uzatma hakkınızdan 3 tane kaldı" in Turkish. This is wrong. Right Turkish translation must be like this : "3 uzatma hakkınızdan 2 tane kaldı" We cannot use %s/%s as the order will be preserved, we need to use named placeholders. Test plan: Apply this patch % gulp po:update --lang LANG Go to misc/translator/po % git grep 'renewals remaining' Translate the occurrences, remove fuzzy sudo koha-translate --update LANG --dev kohadev restart_all Enable LANG for both staff and OPAC Have a look at the checkouts table and notice that the strings have been correctly translated Signed-off-by: David Nind <david@davidnind.com> I've signed off, and I think I get the expected results.
I had a lot of trouble following the test plan.
Testing notes (using KTD):
1. To identify files to change, I used: git grep 'renewals remaining' tr-TR-*
2. I made changes to the po files as set out in [1].
3. The update command didn't work for me (I started with no additional languages installed, so I guess that explains this?):
koha-translate --update tr-TR --dev kohadev
Error: the selected language is not currently installed. Try --install.
4. I got the same result if I ran the command from a root shell (ktd --root --shell).
5. Instead, I did an install: koha-translate --install tr-TR --dev kohadev
6. Results for the OPAC, I get this in the renewals column:
Turkish:
Süresi uzatıldı!
[] Süresini uzat ( 5 uzatma hakkınızdan 4 tane kaldı )
English:
Renewed!
[] Renew ( 4 of 5 renewals remaining )
7. Results for the staff interface: I get this in the renewals column:
Turkish:
1 []
(5 uzatma hakkınızdan 4 tane kaldı)
English:
1 []
(4 of 5 renewals remaining)
[1] Changes made to po files
============================
tr-TR-messages-js.po
--------------------
724 #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:366
725 #, fuzzy
726 msgid "{renewals_left} of {renewals_allowed} renewals remaining"
727 msgstr "%s uzatma hakkınızdan %s tane kaldı"
728
729 #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:368
730 #, fuzzy
731 msgid " and {renewals_left} of {renewals_allowed} unseen renewals remaining"
732 msgstr "%s uzatma hakkınızdan %s tane kaldı"
Changes:
- Changed 727 and 732 to: msgstr "{renewals_allowed} uzatma hakkınızdan {renewals_left} tane kaldı"
- Removed #, fuzzy lines x2
tr-TR-messages.po
-----------------
9372 #, perl-brace-format
9373 msgid "{renewals_left} of {renewals_allowed} renewals remaining"
9374 msgstr ""
Changes:
- Changed 9374 to: msgstr "{renewals_allowed} uzatma hakkınızdan {renewals_left} tane kaldı"
tr-TR-opac-bootstrap.po
-----------------------
12940 #. For the first occurrence,
12941 #. %1$s: I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = ISSUE.renewsleft, renewa ls_allowed = ISSUE.renewsallowed })
12942 #. %2$s: IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed
12943 #. %3$s: ISSUE.unseenleft | html
12944 #. %4$s: ISSUE.unseenallowed | html
12945 #. %5$s: END
12946 #: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt:469
12947 #: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt:487
12948 #: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt:495
12949 #: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt:503
12950 #: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt:809
12951 #, fuzzy, c-format
12952 msgid "( %s %s / %s of %s renewals left before the item must be seen by the library %s )"
12953 msgstr "( %s izin verilenden %s tane kalan uzatma hakkı %s / %s izin verilenden %s materyal kütüphane tarafından görülme lidir %s )"
12970 #. %1$s: ISSUE.renewsleft | html
12971 #: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt:480
12972 #, c-format
12973 msgid "Item must be renewed at the library. %s renewals remaining"
12974 msgstr "Materyalin süresi kütüphanede uzatılmalıdır. %s Kalan uzatma hakkı"
Didn't make any changes.
tr-TR-staff-prog.po
-------------------
No occurrences, didn't make any changes.
Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.04 |