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

Adrian Likins alikins at redhat.com
Tue May 22 13:19:17 UTC 2012


On 05/21/2012 08:07 PM, Sean Flanigan wrote:
> On 05/22/2012 02:33 AM, Adrian Likins wrote:
>>
>> Long story short, we noticed the pt_BR translations we had
>> were ancient, despite pulling from zanata for every
>> release. Eventually we figure out the zanata.xml
>> got when we set up the branch is no longer the current
>> one.  ie, we had one like:
>>
>> 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.
>
     Interesting. Nothing revealing in the git logs, looks like
the previous mapped to changes landed at the same time
as the change from internal zanata to external zanata.
Could have been done by hand, hard to say.

> 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.

Cool, that's what I ended up doing, so good that's the preffered
approach.

>> But... doing that changes the list of po's included, included the zh_*
>> langs.
> Included in what?
     Included in the zanata.xml (or more specifically, it was
added to the latest zanata.xml from the server at some point,
and wasn't there in the version we had in source control)

>
> You need to restore the map-from attributes for those locales, ie
>
> <locale map-from="zh_CN">zh-Hans-CN</locale>
> <locale map-from="zh_TW">zh-Hant-TW</locale>
>
>
> This will cause zh-Hans-CN to be pulled down to zh_CN.po instead of
> zh_Hans_CN.po.
>
Cool, that's what I thought but figured I'd check.
>> Should I be installing these different? What is the relation between
>> zh_CN and zh_Hans_CN?
> Obviously they really represent the same thing, but zh_Hans_CN includes
> information about the use of the Chinese simplified script.  zh_Hans is
> often better though, because it lets you use Chinese simplified script
> anywhere (eg Malaysia, Singapore), without having to tell the OS that
> you live in China.
>
> Unfortunately, locales like zh_Hans and zh_Hans_CN aren't well supported
> by runtime i18n libraries.

Seems like it. Fortunately, things seem happy installing zh_Hans_CN
and zh_Hant_TW as zh_CN and zh_TW, respectively.

One more question, is there a good doc on what the "map-from"
attributes should be?

We previously mapped:
     de_DE -> de
     es_ES -> es
     bn_IN -> in
     ta_IN -> ta
     pt_BR -> pt

It seems like at least pt_BR -> pt is somewhat frowned upon.

I've added the maps from the zh_ langs.  Should I add others?
The version I currently have up for review only maps in cases
where the zanata provided versions don't map to the supported
RHEL6 langs (ie, the zh_* cases). ie, I currently have:

<locales>
<locale>as</locale>
<locale>bn-IN</locale>
<locale>de-DE</locale>
<locale>es-ES</locale>
<locale>fr</locale>
<locale>gu</locale>
<locale>hi</locale>
<locale>it</locale>
<locale>ja</locale>
<locale>kn</locale>
<locale>ko</locale>
<locale>ml</locale>
<locale>mr</locale>
<locale>or</locale>
<locale>pa</locale>
<locale>pt-BR</locale>
<locale>ru</locale>
<locale>ta-IN</locale>
<locale>te</locale>
<locale map-from="zh_CN">zh-Hans-CN</locale>
<locale map-from="zh_TW">zh-Hant-TW</locale>
</locales>

Does this seem correct?




Thanks!




More information about the zanata-users mailing list