Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Using non-standard locale name for Chinese (zh_Hans, zh_Hant) #294

Closed
hosiet opened this issue Mar 16, 2018 · 5 comments
Closed

[bug] Using non-standard locale name for Chinese (zh_Hans, zh_Hant) #294

hosiet opened this issue Mar 16, 2018 · 5 comments
Labels

Comments

@hosiet
Copy link
Contributor

hosiet commented Mar 16, 2018

While examining the default installation of peek into system, I found the following files:

[...]
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/locale/uk_UA/
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/locale/uk_UA/LC_MESSAGES/
-rw-r--r-- root/root      7070 2018-03-16 10:07 ./usr/share/locale/uk_UA/LC_MESSAGES/peek.mo
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/locale/zh_Hans/
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/locale/zh_Hans/LC_MESSAGES/
-rw-r--r-- root/root      8580 2018-03-16 10:07 ./usr/share/locale/zh_Hans/LC_MESSAGES/peek.mo
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/locale/zh_Hant/
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/locale/zh_Hant/LC_MESSAGES/
-rw-r--r-- root/root      7161 2018-03-16 10:07 ./usr/share/locale/zh_Hant/LC_MESSAGES/peek.mo
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/man/
drwxr-xr-x root/root         0 2018-03-16 10:07 ./usr/share/man/man1/
-rw-r--r-- root/root       927 2018-03-16 10:07 ./usr/share/man/man1/peek.1.gz
[...]

Using zh_Hans and zh_Hant in /usr/share/locale/ directory is weird. Almost all other applications on Linux install them into directories named zh_CN and zh_TW (which somehow represents the simplified variant of Chinese and the traditional variant of Chinese).

@phw phw added the bug label Mar 16, 2018
@phw
Copy link
Owner

phw commented Mar 16, 2018

Thanks for the bug report. The directory naming is a direct result of the translation tool used for Peek, I have to figure out how to best deal with this.

@nijel Any thoughts on this?

@nijel
Copy link

nijel commented Mar 16, 2018

This is actually standard name (see RFC 4646 and RFC 4647). You can find reasoning in several places (eg. https://code.djangoproject.com/ticket/18419) - it doesn't make sense to bind traditional/simplified variants with country as they are used in more countries. Still if you prefer to use zh_CN and zh_TW for some reason, just rename the files and Weblate will work just fine.

@hosiet
Copy link
Contributor Author

hosiet commented Mar 16, 2018

While I understand that zh_CN and zh_TWcannot fully represent Simplified Chinese and Traditional Chinese, binding country/region with translation is reasonable since each region has different standards in character and words. For example,

  • zh_CN is for Chinese in China mainland, a simplified Chinese variant
  • zh_SG is for Chinese in Singapore, a simplified Chinese variant
  • zh_HK is for Chinese in Hong Kong SAR, a traditional Chinese variant
  • zh_TW is for Chinese in Taiwan, a traditional Chinese variant

The ideal situation is that we organize translations for all those variants (which happens in some large projects like KDE). With smaller projects, zh_CN is used to represent Simplified Chinese and zh_TW is used to represent Traditional Chinese.


Well those above is not the most important reason. The most important thing is that current installation will make Chinese translations invalid because the system only recognize .mo files inside zh_CN dir if locale is set to zh_CN. Files under /usr/share/locale/zh_Hans/ simply won't work and that is a bug.

@nijel
Copy link

nijel commented Mar 16, 2018

The problem with country based names is that you want to use same translation for zh_CN and zh_SG, similarly for zh_HK and zh_TW.

As written before, Weblate will work with any naming, feel free to rename the files to whatever you find appropriate. It defaults to follow standards when creating new translations, but it's flexible in accepting other naming.

@phw phw closed this as completed in 03076d3 Mar 16, 2018
@phw
Copy link
Owner

phw commented Mar 16, 2018

@nijel Thanks for the input. I have renamed the files now, glad to hear weblate can deal with this naming.

For desktop use it completely makes sense to follow this naming. Peek was literally the only software installed on my system which used the zh_Hans and zh_Hant naming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants