From ce48510c21ed1786215d6df782fac4c647b7a215 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 20 May 2024 13:34:24 +0200 Subject: [PATCH] Bug 36845: Do not loop over the content attribute We skip it. Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer (cherry picked from commit 68e317bd0f8daf967a8af540056e8637524e5d3b) Signed-off-by: Fridolin Somers (cherry picked from commit aed7e0849634a70880fa09029d018cd053cd9fac) Signed-off-by: Lucas Gass --- misc/translator/xgettext.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl index ddc5bbbd87..bcf6601967 100755 --- a/misc/translator/xgettext.pl +++ b/misc/translator/xgettext.pl @@ -132,17 +132,16 @@ sub text_extract { # value [tag=input], meta my $tag; $tag = lc($1) if $t =~ /^<(\S+)/s; - for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder', 'aria-label') { + for my $a ('alt', 'title', 'value', 'label', 'placeholder', 'aria-label') { if ($attr->{$a}) { next if $a eq 'label' && $tag ne 'optgroup'; - next if $a eq 'content'; next if $a eq 'value' && ($tag ne 'input' || (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:hidden|radio|checkbox)$/)); # FIXME next if $tag eq 'meta'; my($key, $val, $val_orig, $order) = @{$attr->{$a}}; #FIXME $val = TmplTokenizer::trim($val); # for selected attributes replace '[%..%]' with '%s' globally - if ( $a =~ /title|value|alt|content|placeholder|aria-label/ ) { + if ( $a =~ /title|value|alt|placeholder|aria-label/ ) { $val =~ s/\[\%.*?\%\]/\%s/g; } # save attribute text for translation