[Gpg4win-devel] zh_CN/TW translations for GpgEx, GpgOL and Gpg4win installer

Mingye Wang (Arthur2e5) arthur2e5 at aosc.xyz
Sat Nov 14 07:30:30 CET 2015


On my computer (default non-unicode cp = 936 (zh_CN), Windows 10 10240),
I didn't even see a popup. Is it remembering my choice somewhere?

Anyway, I can only find some oddity regarding those `SUBLANG_CHINESE`
things. In the NSIS source, although Contrib/MakeLangId uses this
`correct' (i.e. defined in MSDN) pairs in sub[] and even iterates
through it, their
[Example/languages.nsi](http://sourceforge.net/p/nsis/code/HEAD/tree/NSIS/trunk/Examples/languages.nsi)
uses `LANG_SIMPCHINESE` and `LANG_TRADCHINESE`. These two strings can be
found nowhere else according to my `grep`, but some extra search on the
web shows that almost nobody use `${SUBLANG_CHINESE_SIMPLIFIED}`.

So here is a possible patch (I am only changing your commit diff found
on webgit):


diff a/po/nsis-msgfmt.c b/po/nsis-msgfmt.c
--- a/po/nsis-msgfmt.c
+++ b/po/nsis-msgfmt.c
@@ -80,8 +80,8 @@ iso639_to_nsis
       { "bg", "LANG_BULGARIAN", "Bulgarian" },
       { "ca", "LANG_CATALAN", "Catalan" },
       { "zh", "LANG_CHINESE", NULL },
-      { "zh_CN", "SUBLANG_CHINESE_SIMPLIFIED", "SimpChinese" },
-      { "zh_TW", "SUBLANG_CHINESE_TRADITIONAL", "TradChinese" },
+      { "zh_CN", "LANG_SIMPCHINESE", "SimpChinese" },
+      { "zh_TW", "LANG_TRADCHINESE", "TradChinese" },
       { "zh_HK", "SUBLANG_CHINESE_HONGKONG", NULL },
       { "zh_SG", "SUBLANG_CHINESE_SINGAPORE", NULL },
       { "zh_MO", "SUBLANG_CHINESE_MACAU", NULL },

I hope this works. As some kind of precaution, I actually doubt if those
`SUBLANGs` will ever work -- they never include them in their examples.
(I am too lazy to open up an IDE and look at how the thing works)

On 2015/11/13 12:33, Andre Heinecke wrote:
> Hi Mingye,
> 
> On Sunday 20 September 2015 16:49:01 Mingye Wang wrote:
>> Here are the gzipped patches for zh_CN/TW translation for GpgEx, GpgOL
>> and Gpg4win inst. Note that all TW translations may be fuzzy.
> 
> I've applied the GpgOL and Gpg4win patch. GpgEX needs to be done by werner.
> 
>> P.S. I have some doubt about Gpg4win Installer's translation encoding
>> policy. It's true that the current NSIS gettext implementation has to
>> use the native codepage, but why not convert it with `msgconv` during
>> build and store the UTF-8 versions in the repo (which is easier to
>> manipulate)?
> 
> I think I've applied your patch wrongly. I had to add zh_CN and zh_TW to nsis-
> msgformat and they get included through catalogs.nsi and no warnings are shown 
> but they don't show up in the language selection dialog. Is it because they 
> use an incompatible 8bit codepage from my western european codepage or did I 
> just miss a step in adding these?
> 
> Can you confirm that:
> https://files.gpg4win.org/Beta/gpg4win-2.3.0-beta17.exe
> 
> does not offer these languages?
> 
> Have you tested the translations somehow or have any advice what I'm missing?
> 
> Sadly the Guy who set this NSIS / Gettext stuff up is no longer available to 
> ask.
> 
> Regards,
> Andre
> 

-- 
Regards,

Arthur2e5 (0x222D7BDA)



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-devel/attachments/20151114/546a0127/attachment.sig>


More information about the Gpg4win-devel mailing list