Bugzilla – Attachment 174075 Details for
Bug 38377
Wrong Turkish translation in renewal part
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38377: Improve translatability of "%s/%s renewals remaining"
Bug-38377-Improve-translatability-of-ss-renewals-r.patch (text/plain), 8.48 KB, created by
Jonathan Druart
on 2024-11-06 13:22:57 UTC
(
hide
)
Description:
Bug 38377: Improve translatability of "%s/%s renewals remaining"
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-11-06 13:22:57 UTC
Size:
8.48 KB
patch
obsolete
>From a26eb3fdfaa3811f45a48f9fd51118225d768a8f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 6 Nov 2024 14:19:26 +0100 >Subject: [PATCH] Bug 38377: Improve translatability of "%s/%s renewals > remaining" >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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 >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 11 ++++++----- > 2 files changed, 8 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 0802d15bb43..58b5bd01278 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -363,9 +363,9 @@ function LoadIssuesTable() { > content += msg; > if ( can_renew || can_force_renew ) { > content += "<span class='renewals-info'>("; >- content += __("%s of %s renewals remaining").format(oObj.renewals_remaining, oObj.renewals_allowed); >+ content += __x("{renewals_left} of {renewals_allowed} renewals remaining", {renewals_left: oObj.renewals_remaining, renewals_allowed: oObj.renewals_allowed}); > if (UnseenRenewals && oObj.unseen_allowed) { >- content += __(" and %s of %s unseen renewals remaining").format(oObj.unseen_remaining, oObj.unseen_allowed); >+ content += __x(" and {renewals_left} of {renewals_allowed} unseen renewals remaining", {renewals_left: oObj.unseen_remaining, renewals_allowed: oObj.unseen_allowed}); > } > content += ")</span>"; > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index b6780c18f56..c37b8b1578a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -3,6 +3,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >+[% USE I18N %] > [% USE ItemTypes %] > [% USE Price %] > [% USE AuthorisedValues %] >@@ -465,7 +466,7 @@ > <span class="renewalfee badge text-bg-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span> > [% END %] > <span class="renewals">( >- [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining >+ [% I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = ISSUE.renewsleft, renewals_allowed = ISSUE.renewsallowed }) %] > [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] > / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library > [% END %] >@@ -483,7 +484,7 @@ > [% ELSIF ISSUE.auto_too_much_oweing %] > <span class="usr-msg auto-renew-fines">Automatic renewal failed, you have unpaid fines.</span> > <span class="renewals">( >- [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining >+ [% I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = ISSUE.renewsleft, renewals_allowed = ISSUE.renewsallowed }) %] > [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] > / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library > [% END %] >@@ -491,7 +492,7 @@ > [% ELSIF ISSUE.auto_account_expired %] > <span class="usr-msg auto-renew-expired">Automatic renewal failed, your account is expired.</span> > <span class="renewals">( >- [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining >+ [% I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = ISSUE.renewsleft, renewals_allowed = ISSUE.renewsallowed }) %] > [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] > / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library > [% END %] >@@ -499,7 +500,7 @@ > [% ELSIF ( ISSUE.too_soon ) %] > <span class="usr-msg no-renewal-before">No renewal before [% ISSUE.soonestrenewdate | $KohaDates as_due_date => 1 %]</span> > <span class="renewals">( >- [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining >+ [% I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = ISSUE.renewsleft, renewals_allowed = ISSUE.renewsallowed }) %] > [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] > / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library > [% END %] >@@ -805,7 +806,7 @@ > <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% OVERDUE.itemnumber | uri %]&bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a> > [% END %] > <span class="renewals">( >- [% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining >+ [% I18N.tx("{renewals_left} of {renewals_allowed} renewals remaining", { renewals_left = OVERDUE.renewsleft, renewals_allowed = OVERDUE.renewsallowed }) %] > [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] > / [% OVERDUE.unseenleft | html %] of [% OVERDUE.unseenallowed | html %] renewals left before the item must be seen by the library > [% END %] >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38377
: 174075