Bug 5709: Add the ability to translate HTML5 placeholder text in an input field
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>
This commit is contained in:
parent
bc10d7a056
commit
bc36e5ac5c
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in New Issue