Some strings (in zh_CN at least) resist translation

Yuan

Joined: 2003-12-03
Posts: 144
Posted: Sun, 2004-09-05 06:29

Simplified Chinese (zh_CN) translation has not been updated for quite some time, many strings remain untranslated, and some strings are wrong (e.g., "row" and "column" are misplaced). So I decided to give it a boost. The following are some difficulties I encountered. I'm using Gallery 1.4.4 pl2 on Linux, Apache 2.0.50, PHP 4.3.8. (Upgraded from 1.4.4 RC3.)

1. I edited the .po file, ran make_mo_files.sh. The first problem I encountered was a fatal error:

    /locale/zh_CN/zh_CN-gallery_core.po:1839: message catalog has plural form translations...
    ../locale/zh_CN/zh_CN-gallery_core.po:26: ...but header entry lacks a "plural=EXPRESSION" attribute
    ../locale/zh_CN/zh_CN-gallery_core.po:1839: message catalog has plural form translations...
    ../locale/zh_CN/zh_CN-gallery_core.po:26: ...but header entry lacks a "nplurals=INTEGER" attribute
    failed

So I placed "Plural-Forms: nplurals=2; plural=n != 1;\n" in .po (verified against latest CVS and confirmed that this line is not in, though practically Chinese translation does not need any plural form).

2. This problem is particularly difficult: I have been able to modify any existing translated string, also able to replace a few more untranslated strings, but quite there are still quite a lot strings that refuse translation, however I try.

Can someone explain how can I complete a translation? I actually reviewed en_GB "translation" and found many misplaced strings; e.g.,

    #: ../albums.php:147
    #, fuzzy, php-format
    msgid "1 album"
    msgid_plural "%d albums"
    msgstr[0] "Border colour"
    msgstr[1] "Border colour"

So apparently "%d albums" cannot work in en_GB (and does not work for zh_CN). How to understand this?

Also, if I can do away without plural forms, it's all the way better. Is there some document explaining these things?[/]

[/]

AttachmentSize
zh_CN-gallery_core.po.gz25.37 KB
 
Yuan

Joined: 2003-12-03
Posts: 144
Posted: Mon, 2006-03-06 07:30

It seems that fuzzy doesn't work and must be removed. I read this from another post. Problem solved.

 
stephenju
stephenju's picture

Joined: 2005-07-05
Posts: 172
Posted: Mon, 2006-03-06 14:50

Yuan,

Glad to see someone picked up zh_CN translation. One way you can get a headstart is use any of the Traditional-to-Simplified Chinese converter and convert all the zh_TW .po files in the G2 package. That will give you a near 100% coverage and something to start from. Then you can work on the minute difference on terms and grammar between the two.

Some of the newer converters do a very good job on converting the characters. Give it a try.

-
東方之朱

 
Yuan

Joined: 2003-12-03
Posts: 144
Posted: Mon, 2006-03-06 21:02

Good suggestion. I almost finished 1.4.4 but just upgraded to 1.5.2 and realize that the two are incompatible. It'll only make sense to start with 1.5.2, I guess.

 
stephenju
stephenju's picture

Joined: 2005-07-05
Posts: 172
Posted: Mon, 2006-03-06 22:19

Oops. I didn't notice you are talking about Gallery1. My suggestion is geared toward G2. Have no idea how G1 works. Sorry.

-
東方之朱

 
Yuan

Joined: 2003-12-03
Posts: 144
Posted: Wed, 2006-03-08 07:19

I see. The same principle should work for G2, but I'm hesitating to upgrade in prod due to a show stopper listed in this thread. Interestingly, Simplified Chinese is at least half done in 2.0.0 but non-existant in 1.5.2. (Simplified Chinese was half done in 1.4.4.) Don't quite understand how an incremental release affects translation. No one would have the energy if every incremental requires a complete overhaul.

BTW, this thread suggests that someone has picked up Simplified Chinese translation. Any follow-up there?