Bug 27398: Made values in number patterns subscription length translatable
authorava li <rubyli208@gmail.com>
Wed, 20 Jan 2021 22:37:36 +0000 (22:37 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 8 Feb 2021 13:56:00 +0000 (14:56 +0100)
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt
serials/subscription-numberpatterns.pl

index 2d58cef..4480f47 100644 (file)
                 <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>
                   </select>
                   <input type="text" id="sublength" size="3" />
                 </li>
index 99969b1..a84c304 100755 (executable)
@@ -102,9 +102,6 @@ if($op && ($op eq 'new' || $op eq 'modify')) {
         }
     }
     my @frequencies = GetSubscriptionFrequencies();
-    my @subtypes;
-    push @subtypes, { value => $_ } for (qw/ issues weeks months /);
-
     my $languages = [ map {
         {
             language => $_->{iso639_2_code},
@@ -115,7 +112,6 @@ if($op && ($op eq 'new' || $op eq 'modify')) {
     $template->param(
         $op => 1,
         frequencies_loop => \@frequencies,
-        subtypes_loop => \@subtypes,
         locales => $languages,
     );
     output_html_with_http_headers $input, $cookie, $template->output;