Bug 13794: Text input field values not translated
authormxbeaulieu <maxime.beaulieu@inlibro.com>
Thu, 5 Mar 2015 21:56:26 +0000 (16:56 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Sun, 15 Mar 2015 12:22:05 +0000 (09:22 -0300)
I left the code logic intact, and simply removed "text" from the regex.
Text input field values are now translated, no other logical changes are introduced.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test:
1) Update, install and enable es-ES language
2) Go to Reports > Acquisition wizard
3) On page bottom, there is a text field with the word 'Export'
4) Switch language, the word is not translated
5) Apply the patch
6) Update and install again es-ES language
7) Reload page, text now reads 'Exportar'

No koha-qa errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
misc/translator/tmpl_process3.pl

index cb671ae..4ded16f 100755 (executable)
@@ -64,7 +64,7 @@ sub text_replace_tag ($$) {
     if ($attr->{$a}) {
         next if $a eq 'label' && $tag ne 'optgroup';
         next if $a eq 'content' && $tag ne 'meta';
-        next if $a eq 'value' && ($tag ne 'input' || (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:checkbox|hidden|radio|text)$/)); # FIXME
+        next if $a eq 'value' && ($tag ne 'input' || (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:checkbox|hidden|radio)$/)); # FIXME
 
         my($key, $val, $val_orig, $order) = @{$attr->{$a}}; #FIXME
         if ($val =~ /\S/s) {