[zanata-users] zh_Hans_CN zh_CN, zanata.xml, etc

Ding Yi Chen dchen at redhat.com
Tue May 22 01:16:33 UTC 2012


> > The latest one from
> > https://translate.zanata.org/zanata/project/view/subscription-manager/iter/0.99.X/config
> > is different. Amongst other things, it get's weird of the weird
> > pt-BR
> > entry above, and now
> > just includes a pt_BR (which is nice and 100%), and a pt_PT which
> > is not
> > as much (which
> > is fine, since it's not a supported lang).
> > 
> > So updating the zanata.xml, and doing a zanata pull fixes the pt_BR
> > issues.
> > 
> > Question 1: how often do the zanata.xml's change, and what's the
> > best
> > way to insure
> > I have the latest one?
> 
> Zanata will generate zanata.xml whenever you click that button.  You
> can
> ignore it if you like, it's just there to help with creating
> zanata.xml
> initially.  But basically, the contents will change when the chosen
> locales on the server change.  NB: The zanata.xml generated by Zanata
> never includes any map-from attributes, like <locale
> map-from="pt">pt-BR</locale>.  I don't know where that came from,
> you'd
> have to look at your source control history.
> 
> If someone changes the locales associated with the project, they
> should
> update zanata.xml (probably by hand) and commit it to source control
> if
> they want to push/pull those locales.


> > Question 2: Our supported languages include zh_CN and zh_TW, and
> > this is how
> > we have tested (LANG=zh_CN.UTF8, etc). The latest zanata.xml and
> > zanata tool
> > however creates zh_Hans_CN.po and zh_Hant_TW.po. Installing these
> > breaks LANG=zh_CN.UTF8. LANG=zh_Hans_CN.UTF8 also breaks
> > subscription-manager
> > client code in a way that suggest it's not setting the text
> > encoding
> > correctly for
> > that case.
> 

I have written a small utility named: zanata-util.
It has a script, zanata_zanata_xml_make, address these kinds of problems by
firstly download zanata.xml from server to retrieve the server supported locales,
then provide the nessary map-from attribute by look up the existing .po files
or output of locale -a

> > Should I be installing these different? What is the relation
> > between
> > zh_CN and zh_Hans_CN?

zh_CN: Chinese used in China
zh_Hans: Simplified Chinese
zh_Hans_CN: Simplified Chinese used in China

Usually these 3 are exchangeable, unless you have some use cases such as
zh_Hans_SG: Simplified Chinese used in Singapore.
Wikipedia actually adopts this style of locale.

-- 
Ding-Yi Chen
Software Engineer
Internationalization Group
DID: +61 7 3514 8239
Email: dchen at redhat.com

Red Hat, Asia-Pacific Pty Ltd
Level 1, 193 North Quay
Brisbane 4000
Office: +61 7 3514 8100
Fax: +61 7 3514 8199
Website: www.redhat.com

Red Hat, Inc.
Facebook: Red Hat APAC | Red Hat Japan | Red Hat Korea | JBoss APAC
Twitter: Red Hat APAC | Red Hat ANZ
LinkedIn: Red Hat APAC | JBoss APAC




More information about the zanata-users mailing list