From 0fbcb0b102c5a0b7c83f3a07d392d967a75d4c75 Mon Sep 17 00:00:00 2001 From: koha-preprod Date: Mon, 7 Feb 2011 15:59:18 -0500 Subject: [PATCH] Adding the ability to translate HTML5 placeholder text in an input field http://bugs.koha-community.org/show_bug.cgi?id=5709 Signed-off-by: Kyle M Hall Signed-off-by: Paul Poulain --- misc/translator/tmpl_process3.pl | 2 +- misc/translator/xgettext.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl index 89c993f..cd46997 100755 --- a/misc/translator/tmpl_process3.pl +++ b/misc/translator/tmpl_process3.pl @@ -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'; diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl index 99a75bf..032117d 100755 --- a/misc/translator/xgettext.pl +++ b/misc/translator/xgettext.pl @@ -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'; -- 1.7.9.5