oslo.i18n/oslo_i18n
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
..
locale Imported Translations from Zanata 2018-03-01 06:47:51 +00:00
tests Add Babel aliases to get_available_languages 2020-05-22 21:01:11 +00:00
__init__.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00
_factory.py add versionadded designations to newer functions 2015-12-28 15:34:11 +00:00
_gettextutils.py Add Babel aliases to get_available_languages 2020-05-22 21:01:11 +00:00
_i18n.py Update translation setup 2016-01-31 00:20:42 +09:00
_lazy.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00
_locale.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00
_message.py Deprecate Message.translate in favor of Message.translation 2019-08-29 19:10:42 +00:00
_translate.py Deprecate Message.translate in favor of Message.translation 2019-08-29 19:10:42 +00:00
fixture.py Better isolate tests and fixtures from environment 2016-03-24 11:42:53 -07:00
log.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00