Bugzilla – Attachment 166737 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: Exclude meta tag from the translations
Bug-36845-Exclude-meta-tag-from-the-translations.patch (text/plain), 1.85 KB, created by
Caroline Cyr La Rose
on 2024-05-14 20:24:36 UTC
(
hide
)
Description:
Bug 36845: Exclude meta tag from the translations
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2024-05-14 20:24:36 UTC
Size:
1.85 KB
patch
obsolete
>From ba69458be9d79b7dfc8870555ca763e55b688a0f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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: > <meta name="robots" content="noindex"> > >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 <caroline.cyr-la-rose@inlibro.com> >--- > 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.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