mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix i18n: message catalogs were reset on each initialization
This commit is contained in:
@@ -41,9 +41,8 @@ def test_init(rootdir):
|
||||
assert _('Hello sphinx') == 'Hello sphinx' # nothing changed here
|
||||
assert _('Hello reST') == 'Hello reST'
|
||||
|
||||
# load both locale1 and locale2
|
||||
locale.init([rootdir / 'test-locale' / 'locale1',
|
||||
rootdir / 'test-locale' / 'locale2'], 'en', 'myext')
|
||||
# load locale2 in addition
|
||||
locale.init([rootdir / 'test-locale' / 'locale2'], 'en', 'myext')
|
||||
_ = locale.get_translation('myext')
|
||||
assert _('Hello world') == 'HELLO WORLD'
|
||||
assert _('Hello sphinx') == 'HELLO SPHINX'
|
||||
|
||||
Reference in New Issue
Block a user