Bug 23445: Make loan period unit translatable fixing editing issue

In the circulation rules, the loan period displayed in the table
of circulation rules is not translatable, always displaying in English.
This causes an issue when editing a circ rule with unit hours in any
other language than English.
When editing these rules, instead of hours, days will be preselected.

To test:
- Before applying the patch:
- Install a translation
- Activate and switch to the tranlation
- Create a circulation rule using 'hours' as the unit
- Edit the circulation rule
- Verify that instead of 'hours' 'days' will be selected in the pull-down
- Apply patch
- Update po files (kshell, cd misc/translator, perl translate update <langcode>)
- Edit po file <langcode-staff..., search for Hours and translate line,
  make sure to also remove fuzzy, and that your translation matches the
  pull down values for your language
- Reinstall translation
- Repeat circ rule edit test
- Verify the unit now shows up with your translation and editing works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 16789351ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Katrin Fischer 2019-08-09 15:49:34 +00:00 committed by Fridolin Somers
parent 04595c2150
commit 0aecd404f6
1 changed files with 7 additions and 1 deletions

View File

@ -154,7 +154,13 @@
</td>
<td>[% rule.issuelength | html %]</td>
<td>
[% rule.lengthunit | html %]
[% IF ( rule.lengthunit == 'days' ) %]
Days
[% ELSIF ( rule.lengthunit == 'hours') %]
Hours
[% ELSE %]
Undefined
[% END %]
</td>
<td>
[% IF ( rule.hardduedate ) %]