Bugzilla – Attachment 166980 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.94 KB, created by
Marcel de Rooy
on 2024-05-21 14:55:35 UTC
(
hide
)
Description:
Bug 36845: Exclude meta tag from the translations
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-05-21 14:55:35 UTC
Size:
1.94 KB
patch
obsolete
>From 9b92bc7ee88ad2f9ad51f7d26c85b33559115530 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 >Content-Type: text/plain; charset=utf-8 > >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> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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.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