Bugzilla – Attachment 166981 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.81 KB, created by
Marcel de Rooy
on 2024-05-21 14:55:37 UTC
(
hide
)
Description:
Bug 36845: Do not loop over the content attribute
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-05-21 14:55:37 UTC
Size:
1.81 KB
patch
obsolete
>From 90099e2b81171bb3bf89560ed28dbd4eb377c49d 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 >Content-Type: text/plain; charset=utf-8 > >We skip it. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 >-- >2.30.2
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