Bugzilla – Attachment 166936 Details for
Bug 36845
Exclude meta tag from the translations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36845: Do not loop over the content attribute
Bug-36845-Do-not-loop-over-the-content-attribute.patch (text/plain), 1.72 KB, created by
Jonathan Druart
on 2024-05-20 11:35:43 UTC
(
hide
)
Description:
Bug 36845: Do not loop over the content attribute
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-05-20 11:35:43 UTC
Size:
1.72 KB
patch
obsolete
>From 9d0dc5a89da0246777c7e7c4a074cc0e99685eea Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 20 May 2024 13:34:24 +0200 >Subject: [PATCH] Bug 36845: Do not loop over the content attribute > >We skip it. >--- > 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 ddc5bbbd874..bcf66019672 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 >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36845
:
166674
|
166737
|
166936
|
166980
|
166981