Bug 27398

Summary: Serials: Values in subscription length pull down are not translatable when defining numbering patterns
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Ava <liav>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: andrew, caroline.cyr-la-rose, frederic, fridolin.somers, jamespfk, jonathan.druart, liav, martin.renvoize, victor
Version: masterKeywords: Academy
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14022
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03,20.05.09
Attachments: Bug 27398: Made values in number patterns subscription length translatable
Bug 27398: Made values in number patterns subscription length translatable
Bug 27398: Made values in number patterns subscription length translatable

Description Katrin Fischer 2021-01-11 21:39:41 UTC
When editing or adding a numbering pattern in the serials module the pull down for subscription length shows issues, weeks, months. These always appear in English and seem to be untranslatable.

Looking at the same pull down on the second page of the "new subscription" form, the values properly translate there. 

Figuring out the difference in the templates that makes one translatable but not the other would be good.

For installing translations:
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client

For updating the po files to test a fix, see test plan of bug 25067.
Comment 1 Jonathan Druart 2021-01-15 10:43:27 UTC
The following change should work

@ koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt:182 @
                 <li>
                   <label for="sublength">Subscription length:</label>
                   <select id="subtype">
-                    [% FOREACH subtype IN subtypes_loop %]
-                      <option value="[% subtype.value | html %]">[% subtype.value | html %]</option>
-                    [% END %]
+                    <option value="issues">issues</option>
+                    <option value="weeks">weeks</option>
+                    <option value="months">months</option>

(I missed the Academy keyword!)
Comment 2 Ava 2021-01-20 22:42:29 UTC
Created attachment 115475 [details] [review]
Bug 27398: Made values in number patterns subscription length translatable

TEST PLAN:
Check that the subscription length options when editing or adding a
numbering pattern in the serials module are translatable. check that
the hard coded values are gone.
Comment 3 Katrin Fischer 2021-01-21 22:46:26 UTC
Created attachment 115631 [details] [review]
Bug 27398: Made values in number patterns subscription length translatable

TEST PLAN:
Check that the subscription length options when editing or adding a
numbering pattern in the serials module are translatable. check that
the hard coded values are gone.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2021-01-21 22:47:05 UTC
Thx, fixing issues with translations always makes me happy!
Comment 6 Katrin Fischer 2021-01-21 22:54:05 UTC
Previous comment was for another bug!
Comment 7 Martin Renvoize 2021-02-02 10:42:46 UTC
Created attachment 116196 [details] [review]
Bug 27398: Made values in number patterns subscription length translatable

TEST PLAN:
Check that the subscription length options when editing or adding a
numbering pattern in the serials module are translatable. check that
the hard coded values are gone.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2021-02-02 10:43:29 UTC
Nice work, this is a great little improvement.

Passing QA
Comment 9 Jonathan Druart 2021-02-08 13:57:40 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 10 Fridolin Somers 2021-02-12 13:40:17 UTC
Pushed to 20.11.x for 20.11.03
Comment 11 Andrew Fuerste-Henry 2021-02-18 14:58:16 UTC
Pushed to 20.05.x for 20.05.09
Comment 12 Victor Grousset/tuxayo 2021-02-21 03:01:07 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.