Bug 8392: Avoid having an untranslatable age range
authorFrédéric Demians <f.demians@tamil.fr>
Mon, 9 Jul 2012 15:45:11 +0000 (17:45 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 24 Jul 2012 15:20:46 +0000 (17:20 +0200)
Currently, error message reports an age range in English. For example '0 to
17'. With this patch, the 'to' is not in the .pl file anymore.

Ruth could you sign-off this fix?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
members/memberentry.pl

index 1f28b04..bd62f58 100644 (file)
                        [% END %]
                        [% IF ( ERROR_age_limitations ) %]
                                <li id="ERROR_age_limitations">Patron's age is incorrect for their category.  
-                                       Ages allowed are [% ERROR_age_limitations %].</li>
+                    Ages allowed are [% age_low %]-[% age_high %].</li>
                        [% END %]
                        [% IF ( ERROR_branch ) %]
                                <li id="ERROR_branch">Library is invalid.</li>
index 0cf5485..2a39110 100755 (executable)
@@ -272,7 +272,8 @@ if ($op eq 'save' || $op eq 'insert'){
         my ($low,$high) = ($borrowercategory->{'dateofbirthrequired'}, $borrowercategory->{'upperagelimit'});
         if (($high && ($age > $high)) or ($age < $low)) {
             push @errors, 'ERROR_age_limitations';
-            $template->param('ERROR_age_limitations' => "$low to $high");
+            $template->param( age_low => $low);
+            $template->param( age_high => $high);
         }
     }