-
Notifications
You must be signed in to change notification settings - Fork 450
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
zh-TW, zh-HK, zh-* locales and inheritance in zh-CN #1637
Comments
On 18/03/15 09:25, Louis Tiao wrote:
We are doing all the translation work in transifex. Just request a team |
I am also 👎 for this entire idea. It does not make any sense to do all this. Do you speak one of the 5 missing languages? Then just request a team on Transifex and get translating, it’s just a few strings. And you can start with the zh_CN translations and modify them appropriately. Playing with inheritance does not make any sense, especially for a small project like Nikola. Also: your code examples completely ignore the fact that dicts are mutable. |
Thanks for the replies. I'm relatively new to the codebase and didn't realize you were using Transifex. Once @ralsina pointed this out, I understood that all of this is completely unnecessary. I'm happy for someone to go ahead and close this issue. |
Too difficult to update and maintain multiple files for each language. Better to use main language file, and only override with country specific settings where differences exist. Also - getting a 'dictionary not loaded yet' error
From
nikola/data/themes/base/messages
, it can be seen that the only supportedChinese locale is
zh-CN
, which is Simplified Chinese. The other Chinese localesare summarized below:
We see that zh-SG also uses Simplified Chinese, and all the rest use Traditional
Chinese.
It would be very easy to support all the Chinese locales by
zh-TW
zh-HK
,zh-MO
) can then simply inheritMESSAGES
from thezh-TW
locale.zh-SG
, which can just inherit fromzh-CN
.A few things to note:
"Many characters were left untouched by simplification, and are thus identical
between the traditional and simplified Chinese orthographies."
(http://en.wikipedia.org/wiki/Simplified_Chinese_characters). In fact, many of
the characters in messages_zh_cn.py are Traditional Chinese characters. So potentially, all Chinese locale
MESSAGES
can inherit from a base Traditional Chinese file and be simplified as needed.
That said, the words used to describe something can still differ between cultures
(kind of like how Americans say "trash" and Australians say "rubbish").
So for example, "source [code]" is "源代码" in Mainland China and "原始碼"
everywhere else (Singapore uses "原始码"). Note that the difference between
the words go beyond mere simplification. While "码" is a simplification of
"碼", "源" / "原" and "代" / "始" are completely different words. This example
also illustrates how characters can be identical in traditional and simplified
orthographies: Singapore uses the simplified version of "原始碼", but there is
no simplification for the words "原" and "始", so it the same as the traditional version.
For right now, I propose that we simply do the 3 steps above and refine later
on as needed, since "special cases aren't special enough to break the rules."
To illustrate,
messages_zh_sg.py
would look something like this:and the future refinements would look something like this:
Please let me know if the logic is sound and I can work on this and submit a PR.
The text was updated successfully, but these errors were encountered: