-
Notifications
You must be signed in to change notification settings - Fork 14
simplifiedChinese #27
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
Conversation
|
Whoops, I used the wrong label for Traditional Chinese? Well, I feel silly xD So, I have not tested it yet, but everything is looking good so far. One thing I notice is that we are missing the |
|
I'll add them now! |
|
Done it! you can check it again. |
|
Looks great! I'll test it as soon as I'm able to find some time |
|
Thanks! I should sleep now as it is 1am in China... I understand your busyness.. so no worries! |
|
Ah, yea, while testing this I remembered why I only supported Traditional Chinese, instead of both. The short version is that in order to support both "correctly", I'd need to overhaul how internationalization works within the framework- even though it works for literally every other language. Supporting both like this presents two issues. The first issue is with the polyfill for older browsers; unless a special check is added specifically for Traditional vs Simplified "bad things" will happen. Not really a deal breaker to be honest, people using out dated software should be used to it by now. . . The second is with how the framework integrates into the native Intl. An annoying error (which is more of a warning) is produced and the default language will always become Traditional. A short snippet as an example: let languageNames = new Intl.DisplayNames(['en'], {type: 'language'});
console.log(languageNames.of('zh')); // Returns "Chinese"
console.log(languageNames.of('cn')); // Returns "cn", IE unknown
console.log(languageNames.of('zh-TW')); // Returns "Chinese (Taiwan)"
console.log(languageNames.of('zh-CN')); // Returns "Chinese (China)"Now, the pretend-warning can be suppressed easily enough, everything will work great, but users with a Chinese language preference will be presented with Traditional, as default, when they first load the application (even if their language preference is Simplified). They can fix this by manually changing over to Simplified in the language menu. So, here is an ignorant question: which one should be default? Traditional or Simplified? I admit this should be a non-question which is only relevant due to my rampant laziness- I should rewrite everything properly instead. |
|
As someone from China Mainland I would say Simplified Chinese should be the default as there are definitely more people using it. However, wikipedia used Traditional Chinese for a reason: the CCP bans a whole bunch of websites, and hackchat, as it somehow promotes complete freedom whilst allowing users to publish politically incorrect contents without being able to be supervised by the government (no database), I would actually, from this perspective, suggest you to use Traditional Chinese. (but the current hack.chat is not banned) Moreover, online chat are kinda monopolised in Mainland China by tech giants. The decision is on you. Plus, reading the |
|
in your code snippet, you wrote: let languageNames = new Intl.DisplayNames(['en'], {type: 'language'});what exactly is |
|
Ah! Found something on MDN..
but how do I use it without naming the |
Oh, now that's interesting. . .
That's part of it for sure. It gets even more complicated though. . . However, I think we can merge this as it is for now. After getting the error suppression in place, the only real issue with be the lack of respect for a user's default language preference. I will also open up an issue for this. Thank you very much! |
|
This update has been built and pushed to https://beta.hack.chat/ You may need to clear your browser cache and refresh. |
|
wonderful! this day is long waited. Can I publicise this link to some of my friends now? |
|
Of course :D |
|
as you may see.. some of my friends wherewith I did the 'propaganda' starred the project but most of them would not. |
new version of simplified Chinese