diff options
author | Akihiro Motoki <motoki@da.jp.nec.com> | 2016-01-29 08:44:40 +0900 |
---|---|---|
committer | Akihiro Motoki <motoki@da.jp.nec.com> | 2016-01-31 00:20:42 +0900 |
commit | cbb120449884b8a3c5e8127f11369516b65670e1 (patch) | |
tree | 4fe3b705795bba966c49c6acfc0ce6ad061b1baa | |
parent | 5af6d87ebad010229a6cafc93f63e93c2323ebf9 (diff) | |
download | oslo-i18n-cbb120449884b8a3c5e8127f11369516b65670e1.tar.gz |
Update translation setup3.3.0
Follow new infra setup for translations, see spec
http://specs.openstack.org/openstack-infra/infra-specs/specs/translation_setup.html
for full details.
This basically renames oslo.i18n/locale/oslo.i18n.pot to
oslo_i18n/locale/oslo_i18n.pot.
For this we need to update setup.cfg.
Update also domain name in _i18n.py.
Update unit test to adapt to domain name change.
Change-Id: Ie016591a38dc0a83aadde501f882ee7849fa0c4f
-rw-r--r-- | oslo_i18n/_i18n.py | 2 | ||||
-rw-r--r-- | oslo_i18n/locale/de/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/de/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/en_GB/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/en_GB/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/es/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/es/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/fr/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/fr/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/it/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/it/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/ko_KR/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/ko_KR/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/oslo_i18n.pot (renamed from oslo.i18n/locale/oslo.i18n.pot) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/pl_PL/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/pl_PL/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/pt/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/pt/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/locale/zh_CN/LC_MESSAGES/oslo_i18n.po (renamed from oslo.i18n/locale/zh_CN/LC_MESSAGES/oslo.i18n.po) | 0 | ||||
-rw-r--r-- | oslo_i18n/tests/test_fixture.py | 14 | ||||
-rw-r--r-- | setup.cfg | 12 |
13 files changed, 14 insertions, 14 deletions
diff --git a/oslo_i18n/_i18n.py b/oslo_i18n/_i18n.py index 72cdb3c..7755571 100644 --- a/oslo_i18n/_i18n.py +++ b/oslo_i18n/_i18n.py @@ -19,7 +19,7 @@ from oslo_i18n import _factory # Create the global translation functions. -_translators = _factory.TranslatorFactory('oslo.i18n') +_translators = _factory.TranslatorFactory('oslo_i18n') # The primary translation function using the well-known name "_" _ = _translators.primary diff --git a/oslo.i18n/locale/de/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/de/LC_MESSAGES/oslo_i18n.po index 0c4189d..0c4189d 100644 --- a/oslo.i18n/locale/de/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/de/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/en_GB/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/en_GB/LC_MESSAGES/oslo_i18n.po index 9c09da1..9c09da1 100644 --- a/oslo.i18n/locale/en_GB/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/en_GB/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/es/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/es/LC_MESSAGES/oslo_i18n.po index a8d5ede..a8d5ede 100644 --- a/oslo.i18n/locale/es/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/es/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/fr/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/fr/LC_MESSAGES/oslo_i18n.po index 4bb6685..4bb6685 100644 --- a/oslo.i18n/locale/fr/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/fr/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/it/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/it/LC_MESSAGES/oslo_i18n.po index 8ef84e2..8ef84e2 100644 --- a/oslo.i18n/locale/it/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/it/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/ko_KR/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/ko_KR/LC_MESSAGES/oslo_i18n.po index 3b5143e..3b5143e 100644 --- a/oslo.i18n/locale/ko_KR/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/ko_KR/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/oslo.i18n.pot b/oslo_i18n/locale/oslo_i18n.pot index 85da569..85da569 100644 --- a/oslo.i18n/locale/oslo.i18n.pot +++ b/oslo_i18n/locale/oslo_i18n.pot diff --git a/oslo.i18n/locale/pl_PL/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/pl_PL/LC_MESSAGES/oslo_i18n.po index 0db0ef5..0db0ef5 100644 --- a/oslo.i18n/locale/pl_PL/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/pl_PL/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/pt/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/pt/LC_MESSAGES/oslo_i18n.po index 2c0f41e..2c0f41e 100644 --- a/oslo.i18n/locale/pt/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/pt/LC_MESSAGES/oslo_i18n.po diff --git a/oslo.i18n/locale/zh_CN/LC_MESSAGES/oslo.i18n.po b/oslo_i18n/locale/zh_CN/LC_MESSAGES/oslo_i18n.po index 409d8d4..409d8d4 100644 --- a/oslo.i18n/locale/zh_CN/LC_MESSAGES/oslo.i18n.po +++ b/oslo_i18n/locale/zh_CN/LC_MESSAGES/oslo_i18n.po diff --git a/oslo_i18n/tests/test_fixture.py b/oslo_i18n/tests/test_fixture.py index 8ea9a1c..171feb0 100644 --- a/oslo_i18n/tests/test_fixture.py +++ b/oslo_i18n/tests/test_fixture.py @@ -90,12 +90,12 @@ class PrefixLazyTranslationTest(test_base.BaseTestCase): self.assertTrue(_lazy.USE_LAZY) default_lang = fixture.PrefixLazyTranslation._DEFAULT_LANG raw_id1 = 'fake msg1' - expected_msg = 'oslo.i18n/' + default_lang + ': ' + raw_id1 + expected_msg = 'oslo_i18n/' + default_lang + ': ' + raw_id1 msg1 = _(raw_id1) # noqa self.assertEqual([default_lang], - _gettextutils.get_available_languages('oslo.i18n')) + _gettextutils.get_available_languages('oslo_i18n')) self.assertEqual([default_lang], - oslo_i18n.get_available_languages('oslo.i18n')) + oslo_i18n.get_available_languages('oslo_i18n')) self.assertEqual(expected_msg, _translate.translate(msg1)) def test_extra_lang(self): @@ -103,15 +103,15 @@ class PrefixLazyTranslationTest(test_base.BaseTestCase): languages.append(_FAKE_LANG) self.useFixture(fixture.PrefixLazyTranslation(languages=languages)) raw_id1 = 'fake msg1' - expected_msg_en_US = ('oslo.i18n/' + + expected_msg_en_US = ('oslo_i18n/' + fixture.PrefixLazyTranslation._DEFAULT_LANG + ': ' + raw_id1) - expected_msg_en_ZZ = 'oslo.i18n/' + _FAKE_LANG + ': ' + raw_id1 + expected_msg_en_ZZ = 'oslo_i18n/' + _FAKE_LANG + ': ' + raw_id1 msg1 = _(raw_id1) # noqa self.assertEqual(languages, - _gettextutils.get_available_languages('oslo.i18n')) + _gettextutils.get_available_languages('oslo_i18n')) self.assertEqual(languages, - oslo_i18n.get_available_languages('oslo.i18n')) + oslo_i18n.get_available_languages('oslo_i18n')) self.assertEqual(expected_msg_en_US, _translate.translate(msg1)) self.assertEqual(expected_msg_en_ZZ, _translate.translate(msg1, @@ -31,18 +31,18 @@ all_files = 1 upload-dir = doc/build/html [compile_catalog] -directory = oslo.i18n/locale -domain = oslo.i18n +directory = oslo_i18n/locale +domain = oslo_i18n [update_catalog] -domain = oslo.i18n -output_dir = oslo.i18n/locale -input_file = oslo.i18n/locale/oslo.i18n.pot +domain = oslo_i18n +output_dir = oslo_i18n/locale +input_file = oslo_i18n/locale/oslo_i18n.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext _C:1c,2 _P:1,2 mapping_file = babel.cfg -output_file = oslo.i18n/locale/oslo.i18n.pot +output_file = oslo_i18n/locale/oslo_i18n.pot [pbr] warnerrors = True |