Summary: | Better translatability of smart-rules.tt | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | I18N/L10N | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | f.demians, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19690 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 20085: Better translatability of smart-rules.tt
Bug 20085: Better translatability of smart-rules.tt Bug 20085: Better translatability of smart-rules.tt Bug 20085: Better translatability of smart-rules.tt |
Description
Fridolin Somers
2018-01-24 13:23:09 UTC
Created attachment 70877 [details] [review] 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" This patch adds span to translatable strings. Also adds <em> on "Unlimited" and "None defined" so that there are more visible and that there translation is more simple. 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 (In reply to Fridolin SOMERS from comment #1) > Also adds <em> on "Unlimited" and "None defined" so that there are more > visible > and that there translation is more simple. Why do you want to make them more visible? I do not think it should be done in this patch. (In reply to Jonathan Druart from comment #2) > (In reply to Fridolin SOMERS from comment #1) > > Also adds <em> on "Unlimited" and "None defined" so that there are more > > visible > > and that there translation is more simple. > > Why do you want to make them more visible? I do not think it should be done > in this patch. Its because there are a special case, like All for Patron category or Item type. Otherwise we can use a simple span. Created attachment 72455 [details] [review] 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 (In reply to Fridolin SOMERS from comment #3) > (In reply to Jonathan Druart from comment #2) > > (In reply to Fridolin SOMERS from comment #1) > > > Also adds <em> on "Unlimited" and "None defined" so that there are more > > > visible > > > and that there translation is more simple. > > > > Why do you want to make them more visible? I do not think it should be done > > in this patch. > > Its because there are a special case, like All for Patron category or Item > type. > > Otherwise we can use a simple span. Ok corrected, one step at the time indeed ;) Created attachment 73081 [details] [review] 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 Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 73184 [details] [review] 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 Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 18.05, thanks to everybody involved! |