Bugzilla – Attachment 61977 Details for
Bug 15395
Internationalization: plural forms, context, and more
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15395: Fix output of msgcat
Bug-15395-Fix-output-of-msgcat.patch (text/plain), 1.64 KB, created by
Julian Maurice
on 2017-04-07 16:56:16 UTC
(
hide
)
Description:
Bug 15395: Fix output of msgcat
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-04-07 16:56:16 UTC
Size:
1.64 KB
patch
obsolete
>From ef8df4099b4eb05cfd267a76bca9bf2e29629b96 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 7 Apr 2017 18:46:56 +0200 >Subject: [PATCH] Bug 15395: Fix output of msgcat > >By default, msgcat tries to merge translations when two or more files have the >same msgid, even for the header (msgid ""). This resulted in an invalid PO file >("#-#-#-#-#" markers in header). >This patch tells msgcat to use the first available translation instead. > >Also, this patch set correctly the Project-Id-Version field >--- > misc/translator/LangInstaller.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm >index 55e477b185..8f38c7de72 100644 >--- a/misc/translator/LangInstaller.pm >+++ b/misc/translator/LangInstaller.pm >@@ -609,6 +609,7 @@ sub extract_messages { > push @files_to_scan, @tt_files; > > my $xgettext_common_args = "--force-po --from-code=UTF-8 " >+ . "--package-name=Koha --package-version='' " > . "-k -k__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 " > . "-k__p:1c,2 -k__px:1c,2 -k__np:1c,2,3 -k__npx:1c,2,3 " > . "-kN__ -kN__n:1,2 -kN__p:1c,2 -kN__np:1c,2,3"; >@@ -637,7 +638,7 @@ sub extract_messages { > die "system call failed: $xgettext_cmd"; > } > >- my $msgcat_cmd = "$self->{msgcat} -o $Bin/$self->{domain}.pot $Bin/$self->{domain}-perl.pot $Bin/$self->{domain}-js.pot"; >+ my $msgcat_cmd = "$self->{msgcat} --use-first -o $Bin/$self->{domain}.pot $Bin/$self->{domain}-perl.pot $Bin/$self->{domain}-js.pot"; > if (system($msgcat_cmd) != 0) { > die "system call failed: $msgcat_cmd"; > } >-- >2.11.0
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 15395
:
45797
|
45798
|
45799
|
46337
|
50023
|
50024
|
50025
|
50026
|
61873
|
61874
|
61875
|
61876
|
61934
|
61935
|
61977
|
62008
|
62041
|
62326
|
62327
|
62328
|
62329
|
62330
|
62331
|
62332
|
62333
|
62335
|
62709
|
65894
|
70974
|
70975
|
70976
|
71940
|
71941
|
71942
|
71943
|
71944
|
71945
|
71946
|
71947
|
71948
|
71949
|
71950
|
71951
|
71952
|
73901
|
73902
|
73903
|
73904
|
73905
|
73906
|
73907
|
73908
|
73909
|
73910
|
73911
|
73912
|
73913
|
76328
|
76329
|
76330
|
77475
|
77476
|
81152
|
81153
|
81154
|
81155
|
81156
|
81157
|
81158
|
81159
|
81167
|
81734
|
81735
|
81736
|
81737
|
81738
|
81739
|
81741
|
81742
|
81743