Bugzilla – Attachment 24859 Details for
Bug 11631
Make translation toolchain ignore useless translatable strings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make i18n toolchain ignore useless strings
0002-Make-translation-toolchain-ignore-useless-translatab.patch (text/plain), 1019 bytes, created by
paxed
on 2014-01-29 11:26:26 UTC
(
hide
)
Description:
Make i18n toolchain ignore useless strings
Filename:
MIME Type:
Creator:
paxed
Created:
2014-01-29 11:26:26 UTC
Size:
1019 bytes
patch
obsolete
>From cf0b4aa1d50a2b7328ba4c03ad77d6400eb7e190 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@pttk.fi> >Date: Wed, 29 Jan 2014 13:16:48 +0200 >Subject: [PATCH 2/2] Make translation toolchain ignore useless "translatable" > strings that contain nothing but spaces and/or placeholders. > >--- > misc/translator/xgettext.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl >index 032117d..bd1706d 100755 >--- a/misc/translator/xgettext.pl >+++ b/misc/translator/xgettext.pl >@@ -91,6 +91,11 @@ sub text_extract (*) { > my $s = TmplTokenizer::next_token $h; > last unless defined $s; > my($kind, $t, $attr) = ($s->type, $s->string, $s->attributes); >+ my $tmpt = $t; >+ # If msgid contains only placeholders and/or spaces, ignore it >+ $tmpt =~ s/(%s|\s)//g; >+ next if ($tmpt eq ""); >+ > if ($kind eq C4::TmplTokenType::TEXT) { > if ($t =~ /\S/s && $t !~ /<!/){ > remember( $s, $t ); >-- >1.8.3.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 11631
:
24859
|
26478
|
26492
|
26512
|
26522
|
26834
|
27522
|
27527
|
27659
|
27660