From fbb123b12eab123e62c508944fd2b6261fb24acf Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 14 May 2024 09:29:02 +0200 Subject: [PATCH] Bug 36845: Exclude meta tag from the translations This bug originaly wants to get rid of "noindex" coming from this meta tag: But actually we have other strings from the meta tags that should not be translated. Test plan: 0. Do not apply this patch 1. cd misc/translator/po && gulp po:update --lang es-ES (or any other lang) 2. git commit -a -m"wip" 3. Apply this patch 4. Repeat 1 and git diff to show the diff Notice that strings that should not be translated are removed from the po files (actually commented) Signed-off-by: Caroline Cyr La Rose Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- misc/translator/xgettext.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl index fcb89f8cf2..ddc5bbbd87 100755 --- a/misc/translator/xgettext.pl +++ b/misc/translator/xgettext.pl @@ -135,9 +135,10 @@ sub text_extract { for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder', 'aria-label') { if ($attr->{$a}) { next if $a eq 'label' && $tag ne 'optgroup'; - next if $a eq 'content' && $tag ne 'meta'; + 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 -- 2.39.5