Internationalization and translation library.
Go to file
Ben Nemec 0901283923 Add Babel aliases to get_available_languages
This pulls in the alias mapping from Babel[0] that previously made
some two character locale names available. It simply appends each
alias that is found by gettext.find to the list of available languages.

This change in behavior was initially reported as a result of a
breaking Glance unit test. After looking a bit closer at the test
in question, it appears they mock out gettext.find to assume the
existence of that locale. Whether it would actually exist in a real
world deployment I have no idea. However, I don't think it hurts
anything to include these aliases in the list checked by
get_available_languages so this should be fine.

Note that I did no mapping of the aliases in our override of
gettext.find. There was no aliasing going on there for these two
letter locales before either, so if they were found before they
will be found now. The same is true if they were not found before,
so this maintains the previous behavior.

Change-Id: Ie57ed2ca0228634ed9a3def99bf606ce1832a195
0: e7e4265d9a/babel/core.py (L80)
Closes-Bug: 1877386
2020-05-22 21:01:11 +00:00
doc [ussuri][goal] Drop python 2.7 support and testing 2020-02-06 10:23:19 +01:00
oslo_i18n Add Babel aliases to get_available_languages 2020-05-22 21:01:11 +00:00
releasenotes Update master for stable/ussuri 2020-04-14 10:14:24 +00:00
.coveragerc Fix coverage configuration and execution 2015-10-08 17:18:36 -04:00
.gitignore Integrate sphinxcontrib-apidoc 2019-12-17 16:36:08 +00:00
.gitreview OpenDev Migration Patch 2019-04-19 19:34:33 +00:00
.mailmap initial export with graduate.sh 2014-04-29 11:58:57 -07:00
.stestr.conf Switch to stestr 2018-07-03 16:10:13 +07:00
.zuul.yaml Add Python3 victoria unit tests 2020-04-14 10:14:26 +00:00
babel.cfg initial export with graduate.sh 2014-04-29 11:58:57 -07:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2014-12-05 03:30:38 +00:00
HACKING.rst Update URLs in documents according to document migration 2017-07-12 15:47:32 +08:00
LICENSE initial export with graduate.sh 2014-04-29 11:58:57 -07:00
lower-constraints.txt Drop use of babel 2020-04-16 17:31:19 +01:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-04-24 19:12:27 +08:00
requirements.txt Drop use of babel 2020-04-16 17:31:19 +01:00
setup.cfg Add py38 package metadata 2020-04-24 08:23:12 -05:00
setup.py remove outdated header 2020-02-11 18:49:19 +01:00
test-requirements.txt Use unittest.mock instead of third party mock 2020-03-31 15:55:50 -05:00
tox.ini Bump default tox env from py37 to py38 2020-04-24 10:25:49 -05:00

Team and repository tags

image

oslo.i18n -- Oslo Internationalization Utilities

Latest Version

Downloads

The oslo.i18n library contain utilities for working with internationalization (i18n) features, especially translation for text strings in an application or library.