oslo.i18n/oslo_i18n/tests
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
..
__init__.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00
fakes.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00
test_factory.py Use unittest.mock instead of third party mock 2020-03-31 15:55:50 -05:00
test_fixture.py Fix parameters of assertEqual are misplaced 2016-07-23 19:54:15 +08:00
test_gettextutils.py Add Babel aliases to get_available_languages 2020-05-22 21:01:11 +00:00
test_handler.py Use unittest.mock instead of third party mock 2020-03-31 15:55:50 -05:00
test_lazy.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00
test_locale_dir_variable.py Move out of the oslo namespace package 2014-12-18 16:35:03 -05:00
test_logging.py Use unittest.mock instead of third party mock 2020-03-31 15:55:50 -05:00
test_message.py Use unittest.mock instead of third party mock 2020-03-31 15:55:50 -05:00
test_public_api.py Use unittest.mock instead of third party mock 2020-03-31 15:55:50 -05:00
test_translate.py Use unittest.mock instead of third party mock 2020-03-31 15:55:50 -05:00
utils.py set default python to python3 2018-04-16 13:04:03 -04:00