Bugzilla – Attachment 4373 Details for
Bug 6464
Add inconsistence check for '%s' count in tmpl_process3.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git patch: check consistency of PO messages
0001-BUG6464-check-consistency-of-PO-messages.patch (text/plain), 1.23 KB, created by
Sébastien Marie
on 2011-06-06 11:01:22 UTC
(
hide
)
Description:
git patch: check consistency of PO messages
Filename:
MIME Type:
Creator:
Sébastien Marie
Created:
2011-06-06 11:01:22 UTC
Size:
1.23 KB
patch
obsolete
>From 2f8279c0ec25bee391191f90ca96b0c43a367458 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A8re=20S=C3=A9bastien=20Marie?= <semarie-koha@latrappe.fr> >Date: Mon, 6 Jun 2011 11:27:43 +0200 >Subject: [PATCH] BUG6464: check consistency of PO messages > >At the installation level of translation, count the number of '%s' in msgid and msgstr. >A difference issue a warning. >--- > misc/translator/tmpl_process3.pl | 12 ++++++++++++ > 1 files changed, 12 insertions(+), 0 deletions(-) > >diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl >index b916cab..aaa7651 100755 >--- a/misc/translator/tmpl_process3.pl >+++ b/misc/translator/tmpl_process3.pl >@@ -273,6 +273,18 @@ if (defined $href) { > # $charset_in = $candidate; > # } > # } >+ >+ # BUG6464: check consistency of PO messages >+ # - count number of '%s' in msgid and msgstr >+ for my $msgid (keys %$href) { >+ my $msgstr = $href->{$msgid}->msgstr; >+ >+ my $id_count = scalar(split(/%s/,$msgid)) - 1; >+ my $str_count = scalar(split(/%s/,$msgstr)) - 1; >+ >+ warn_normal "unconsistent %s count: ($id_count/$str_count): msgid=$msgid | msgstr=$msgstr\n", undef >+ if ( $id_count ne $str_count ); >+ } > } > > # set our charset in to UTF-8 >-- >1.7.2.5 >
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 6464
:
4366
|
4373
|
4376
|
4378