Bugzilla – Attachment 38713 Details for
Bug 12192
Template toolkit code in HTML attributes is picked up into po-files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12192: Template toolkit code in HTML attributes is picked up into po-files
Bug-12192-Template-toolkit-code-in-HTML-attributes.patch (text/plain), 1.76 KB, created by
Katrin Fischer
on 2015-04-30 06:09:49 UTC
(
hide
)
Description:
Bug 12192: Template toolkit code in HTML attributes is picked up into po-files
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-04-30 06:09:49 UTC
Size:
1.76 KB
patch
obsolete
>From 8b498f5f1c513f05daf0744eb954142de8324cb9 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Tue, 28 Apr 2015 18:24:27 -0300 >Subject: [PATCH] Bug 12192: Template toolkit code in HTML attributes is picked > up into po-files > >This patch gives a partial solution for this problem. >It ignores strings like "[% something %]", but not >"[% IF ( value ) %][% value %][% END %]" > >We get 100+ strings less to translate > >To test: >1) Update translation files for your preferred language >2) Apply the patch >3) Update again >4) Compare, you must find 100+ strings removed from >translation files > >eg. >-msgid "[% SEARCH_RESULT.biblionumber |url %]" >-msgid "[% accepteddate | $KohaDates %]" >-msgid "[% amountoutstanding | format('%.2f') %]" >-msgid "[% authtypetext |html %]" >-msgid "[% barcode_llx |html %]" >-msgid "[% barcode_lly |html %]" >-msgid "[% biblio.quantity.length ? biblio.quantity : 1 %]" >-msgid "[% billingdate | $KohaDates %]" >-msgid "[% borname |html %]" >... > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Verified all strings removed from the po files were >pure TT. >--- > misc/translator/xgettext.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl >index 976ab47..504dc9f 100755 >--- a/misc/translator/xgettext.pl >+++ b/misc/translator/xgettext.pl >@@ -40,6 +40,7 @@ sub string_negligible_p { > || $t =~ /^[-\+\.,:;!\?'"%\(\)\[\]\|]+$/ # punctuation w/o context > || $t =~ /^[A-Za-z]$/ # single letters > || $t =~ /^(&[a-z]+;|&#\d+;|&#x[0-9a-fA-F]+;|%%|%s|\s|[[:punct:]])*$/ # html entities,placeholder,punct, ... >+ || ( $t =~ /^\[\%.*\%\]$/ and $t !~ /\%\].*\[\%/ ) # pure TT entities > ) > } > >-- >1.9.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 12192
:
38618
|
38646
| 38713