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

Babel 1.0+ doesn't support `zh_CN` #37

Closed
jun66j5 opened this issue Jul 28, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@jun66j5
Copy link
Contributor

commented Jul 28, 2013

Babel 1.0+ currently doesn't accept zh_CN. But Trac requires the locale. Probably, the other applications require it. See http://trac.edgewall.org/ticket/11258.

Also, Trac expects str(Locale.parse('zh_TW')) is 'zh_TW'. However, Babel 1.0+ automatically expands to 'zh_Hant_TW'.

@mitsuhiko

This comment has been minimized.

Copy link
Member

commented Jul 28, 2013

zh_TW is not a locale that the CLDR has. The canonical name of that locale is zh_Hant_TW. There is a ticket open on adding support for fuzzy locales that dynamically find the most appropriate data file.

With regards to why zh_CN does not resolve: the likely subtag expansion in Babel is currently very buggy and limited. Also related to not having fuzzy locales. There is already #30 that tracks this.

@mitsuhiko mitsuhiko closed this Jul 28, 2013

mitsuhiko added a commit that referenced this issue Jul 28, 2013

Fixed #37 (likely subtag resolving)
This fixes some locales not loading correctly (like zh_CN) that
are defined through simplified rules in the likely-subtag mapping.

openstack-gerrit pushed a commit to openstack/oslo-incubator that referenced this issue Jan 20, 2014

Luis A. Garcia
Add support for locales missing from babel
Babel>=1.0,<1.3 has a bug where some OpenStack supported
locales like 'zh_CN' and 'zh_TW', aren't supported, see:
python-babel/babel#37

In Babel 1.3 they fixed the bug and they support these locales, but
they are still not explicitly "listed" by locale_identifiers(). That's
why we add the locales if necessary so they are listed as supported
otherwise when validating supported locales for the transalated log, we
would fail to allow them even if there are .mo files for
them.

Change-Id: Ie61539a709808dfea690a59602be94347fcfbbb9

washort added a commit to mozilla/zamboni that referenced this issue Mar 17, 2015

Revert "upgrade to babel 1.3 (bug 898528)"
This reverts commit 3e9ea46.

Babel 1.0+ doesn't support locale names we use such as 'zh_CN'.
See python-babel/babel#37

ccwang002 added a commit to python-doc-tw/cpython-tw that referenced this issue Feb 15, 2016

Remap zh-Hant to zh_Hant due to Babel
Babel parses locale 'zh_Hant' as 'zh_Hant_TW', which accepts solely
underscores and rejects any dashes. Though I don't know if this follows
the standard ISO lang code format, it is the status quo. And all the
settings can be easily switched.

Ref: python-babel/babel#37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.