Bug 5709: Add the ability to translate HTML5 placeholder text in an input field
authorkoha-preprod <koha-preprod@sys-tech.net>
Mon, 7 Feb 2011 20:59:18 +0000 (15:59 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 13 Dec 2012 15:34:57 +0000 (10:34 -0500)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
misc/translator/tmpl_process3.pl
misc/translator/xgettext.pl

index 89c993f..cd46997 100755 (executable)
@@ -59,7 +59,7 @@ sub text_replace_tag ($$) {
     # value [tag=input], meta
     my $tag = lc($1) if $t =~ /^<(\S+)/s;
     my $translated_p = 0;
-    for my $a ('alt', 'content', 'title', 'value','label') {
+    for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder') {
     if ($attr->{$a}) {
         next if $a eq 'label' && $tag ne 'optgroup';
         next if $a eq 'content' && $tag ne 'meta';
index 99a75bf..032117d 100755 (executable)
@@ -102,7 +102,7 @@ sub text_extract (*) {
         } elsif ($kind eq C4::TmplTokenType::TAG && %$attr) {
             # value [tag=input], meta
             my $tag = lc($1) if $t =~ /^<(\S+)/s;
-            for my $a ('alt', 'content', 'title', 'value','label') {
+            for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder') {
                 if ($attr->{$a}) {
                     next if $a eq 'label' && $tag ne 'optgroup';
                     next if $a eq 'content' && $tag ne 'meta';