-
Notifications
You must be signed in to change notification settings - Fork 22
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
國語 - RangeError: Invalid language tag: zh_CN #250
Comments
Hey @1u :) Did @sbalmer already start on this? I can only see zh_TW on the language list. There also seems to be a weird loop when changing languages (any language). In any event, with zh_TW, I see from your own debugging code:
and on reload:
(which is part of packages/msgfmt_core/upstream/intl-messageformat/dist/intl-messageformat-with-locales.js) It looks like the case isn't the problem but how the language tag is done. I traditionally went with the POSIX / ISO 15897 locale standard which uses an underscore ("_") to separate the region (e.g. zh_TW), but I don't recall offhand what steps I took to decode the language, or if we do at all. I think your simplest thing to try first would be to back everything up and rename all region instances to use dashes instead of underscores, and see if that solves the issue. It seems like I'm a bit baffled though why de_ZH still works though 🤔 I guess because of |
hey. thanks for the reply. @sbalmer will be back next week. Let's see.. as there is no Chinese/Taiwanese regions it's not urgent. |
@gadicc thanks for your input! I didn't realize NumberFormat was the complaining party here. I think changing the language ID to use BCP 47 will be the sensible thing to do, thanks for your suggestion. Presumably, the reason de_ZH does not trigger this error is because it has no translations involving This issue can be closed. What meteor-messageformat could do here is tracking these errors and giving feed back in the sense of "hey one of your translation strings tries to format a number but your language code is invalid." I think there is a similar problem with malformed translation strings. |
We run into a problem when selecting Chinese Languages:
Openki/Openki#667
I couldn't figure where the problem lies. @sbalmer will check on it in two weeks.
@gadicc If you'd directly see what the problem might be, this would save us some work. :)
cheers
(ex. on dev and staging - switch to 國語 (zh_TW) or 中文 (zh_CN) and reload page)
User is
greg
and its pwd as well. Tanslations under /translate.Zurich-German (de_ZH) is not a problem
The text was updated successfully, but these errors were encountered: