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> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
dba00e28ce
commit
674ff624b3
|
|
@ -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>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
[% USE Koha %]
|
||||
[% USE KohaDates %]
|
||||
[% USE Branches %]
|
||||
[% USE I18N %]
|
||||
[% USE ItemTypes %]
|
||||
[% USE Price %]
|
||||
[% USE AuthorisedValues %]
|
||||
|
|
@ -461,7 +462,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 %]
|
||||
|
|
@ -479,7 +480,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 %]
|
||||
|
|
@ -487,7 +488,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 %]
|
||||
|
|
@ -495,7 +496,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 %]
|
||||
|
|
@ -797,7 +798,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 %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue