Bugzilla – Attachment 72455 Details for
Bug 20085
Better translatability of smart-rules.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20085: Better translatability of smart-rules.tt
Bug-20085-Better-translatability-of-smart-rulestt.patch (text/plain), 10.64 KB, created by
Fridolin Somers
on 2018-03-06 05:42:02 UTC
(
hide
)
Description:
Bug 20085: Better translatability of smart-rules.tt
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2018-03-06 05:42:02 UTC
Size:
10.64 KB
patch
obsolete
>From 7701ef2066f116b6c765c564a5923da65af76a90 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 24 Jan 2018 14:23:30 +0100 >Subject: [PATCH] Bug 20085: Better translatability of smart-rules.tt > >Template smart-rules.tt in administration contains some if/elsif/else with translatable strings. >For example : >[% IF rule.onshelfholds == 1 %] > Yes >[% ELSIF rule.onshelfholds == 2 %] > If all unavailable >[% ELSE %] > If any unavailable >[% END %] > >Adding span to translatable strings will allow to have the same translation than : > ><select name="onshelfholds" id="onshelfholds"> > <option value="1">Yes</option> > <option value="0">If any unavailable</option> > <option value="2">If all unavailable</option> ></select> > >This is important to allow editing an existing circulation and fine rule. > >Actually for example in french some strings are translated differently : >msgid "%s Yes %s If all unavailable %s If any unavailable %s" >msgstr "%s Oui %s Si tous indisponibles %s Si aucun indisponible %s" > >msgid "If any unavailable" >msgstr "Si au moins un exemplaire est indisponible" > >Test plan : >1) Look at PO files, for example fr-FR and see there is : >msgid "%s Yes %s If all unavailable %s If any unavailable %s" >msgid "If any unavailable" >2) Apply patch >3) update PO files >4) Look at PO files, for example fr-FR and see there is now only : >msgid "If any unavailable" >5) Install translation >6) Go to Administration > Circulation and fine rule >7) Check that when editing an existing rule, edition comboboxes are set on the correct value >8) Create a default holds policy by item type and check that correct values are displayed in table >--- > .../prog/en/modules/admin/smart-rules.tt | 69 +++++++++++++--------- > 1 file changed, 42 insertions(+), 27 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index e1a5839..ffa8776 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -114,13 +114,13 @@ > </td> > > <td>[% IF ( rule.unlimited_maxissueqty ) %] >- Unlimited >+ <span>Unlimited</span> > [% ELSE %] > [% rule.maxissueqty %] > [% END %] > </td> > <td>[% IF rule.unlimited_maxonsiteissueqty %] >- Unlimited >+ <span>Unlimited</span> > [% ELSE %] > [% rule.maxonsiteissueqty %] > [% END %] >@@ -142,12 +142,18 @@ > <input type="hidden" name="hardduedatecomparebackup" value="1" /> > [% END %] > [% ELSE %] >- None defined >+ <span>None defined</span> > [% END %] > </td> > <td>[% rule.fine %]</td> > <td>[% rule.chargeperiod %]</td> >- <td>[% IF rule.chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> >+ <td> >+ [% IF rule.chargeperiod_charge_at %] >+ <span>Start of interval</span> >+ [% ELSE %] >+ <span>End of interval</span> >+ [% END %] >+ </td> > <td>[% rule.firstremind %]</td> > <td>[% rule.overduefinescap FILTER format("%.2f") %]</td> > <td> >@@ -164,9 +170,9 @@ > <td>[% rule.norenewalbefore %]</td> > <td> > [% IF ( rule.auto_renew ) %] >- Yes >+ <span>Yes</span> > [% ELSE %] >- No >+ <span>No</span> > [% END %] > </td> > <td>[% rule.no_auto_renewal_after %]</td> >@@ -175,22 +181,31 @@ > <td>[% rule.holds_per_record %]</td> > <td> > [% IF rule.onshelfholds == 1 %] >- Yes >+ <span>Yes</span> > [% ELSIF rule.onshelfholds == 2 %] >- If all unavailable >+ <span>If all unavailable</span> >+ [% ELSE %] >+ <span>If any unavailable</span> >+ [% END %] >+ </td> >+ <td> >+ [% IF rule.opacitemholds == 'F'%] >+ <span>Force</span> >+ [% ELSIF rule.opacitemholds == 'Y'%] >+ <span>Allow</span> > [% ELSE %] >- If any unavailable >- [% END %]</td> >- <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td> >+ <span>Don't allow</span> >+ [% END %] >+ </td> > <td> > [% IF rule.article_requests == 'no' %] >- No >+ <span>No</span> > [% ELSIF rule.article_requests == 'yes' %] >- Yes >+ <span>Yes</span> > [% ELSIF rule.article_requests == 'bib_only' %] >- Record only >+ <span>Record only</span> > [% ELSIF rule.article_requests == 'item_only' %] >- Item only >+ <span>Item only</span> > [% END %] > </td> > <td>[% rule.rentaldiscount %]</td> >@@ -479,13 +494,13 @@ > [% END %] > </td> > <td>[% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %] >- Unlimited >+ <span>Unlimited</span> > [% ELSE %] > [% branch_cat_rule_loo.maxissueqty %] > [% END %] > </td> > <td>[% IF ( branch_cat_rule_loo.unlimited_maxonsiteissueqty ) %] >- Unlimited >+ <span>Unlimited</span> > [% ELSE %] > [% branch_cat_rule_loo.maxonsiteissueqty %] > [% END %] >@@ -635,29 +650,29 @@ > [% END %] > </td> > <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %] >- From any library >+ <span>From any library</span> > [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %] >- From home library >+ <span>From home library</span> > [% ELSE %] >- No holds allowed >+ <span>No holds allowed</span> > [% END %] > </td> > <td>[% IF ( branch_item_rule_loo.hold_fulfillment_policy == 'any' ) %] >- any library >+ <span>any library</span> > [% ELSIF ( branch_item_rule_loo.hold_fulfillment_policy == 'homebranch' ) %] >- item's home library >+ <span>item's home library</span> > [% ELSIF ( branch_item_rule_loo.hold_fulfillment_policy == 'holdingbranch' ) %] >- item's holding library >+ <span>item's holding library</span> > [% END %] > </td> > <td>[% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %] >- Item returns home >+ <span>Item returns home</span> > [% ELSIF ( branch_item_rule_loo.returnbranch == 'holdingbranch' ) %] >- Item returns to issuing branch >+ <span>Item returns to issuing branch</span> > [% ELSIF ( branch_item_rule_loo.returnbranch == 'noreturn' ) %] >- Item floats >+ <span>Item floats</span> > [% ELSE %] >- Error - unknown option >+ <span>Error - unknown option</span> > [% END %] > </td> > <td class="actions"> >-- >2.7.4
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 20085
:
70877
|
72455
|
73081
|
73184