From 18de292603335a56e51de77cdca2858c501f612c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 28 Jan 2016 14:25:46 +0100 Subject: [PATCH] Update translation setup 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.cache/locale/oslo.cache.pot to oslo_cache/locale/oslo_cache.pot. For this we need to update setup.cfg. Update also domain name in i18n.py. The project has no translations currently, let's remove the outdated pot file, the updated scripts work without them. So, we can just delete the file and once there are translations, an updated pot file together with translations can be imported automatically. Change-Id: I854c82dc99578c5171352cdada13615c6fd22202 --- oslo.cache/locale/oslo.cache-log-critical.pot | 19 ------ oslo.cache/locale/oslo.cache-log-error.pot | 26 -------- oslo.cache/locale/oslo.cache-log-info.pot | 19 ------ oslo.cache/locale/oslo.cache-log-warning.pot | 27 -------- oslo.cache/locale/oslo.cache.pot | 63 ------------------- oslo_cache/_i18n.py | 2 +- setup.cfg | 12 ++-- 7 files changed, 7 insertions(+), 161 deletions(-) delete mode 100644 oslo.cache/locale/oslo.cache-log-critical.pot delete mode 100644 oslo.cache/locale/oslo.cache-log-error.pot delete mode 100644 oslo.cache/locale/oslo.cache-log-info.pot delete mode 100644 oslo.cache/locale/oslo.cache-log-warning.pot delete mode 100644 oslo.cache/locale/oslo.cache.pot diff --git a/oslo.cache/locale/oslo.cache-log-critical.pot b/oslo.cache/locale/oslo.cache-log-critical.pot deleted file mode 100644 index eea14c89..00000000 --- a/oslo.cache/locale/oslo.cache-log-critical.pot +++ /dev/null @@ -1,19 +0,0 @@ -# Translations template for oslo.cache. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.cache project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.cache 0.5.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 06:59+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - diff --git a/oslo.cache/locale/oslo.cache-log-error.pot b/oslo.cache/locale/oslo.cache-log-error.pot deleted file mode 100644 index 8eb5d8ae..00000000 --- a/oslo.cache/locale/oslo.cache-log-error.pot +++ /dev/null @@ -1,26 +0,0 @@ -# Translations template for oslo.cache. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.cache project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.cache 0.5.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 06:59+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - -#: oslo_cache/core.py:123 -#, python-format -msgid "" -"Unable to build cache config-key. Expected format \":\". " -"Skipping unknown format: %s" -msgstr "" - diff --git a/oslo.cache/locale/oslo.cache-log-info.pot b/oslo.cache/locale/oslo.cache-log-info.pot deleted file mode 100644 index eea14c89..00000000 --- a/oslo.cache/locale/oslo.cache-log-info.pot +++ /dev/null @@ -1,19 +0,0 @@ -# Translations template for oslo.cache. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.cache project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.cache 0.5.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 06:59+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - diff --git a/oslo.cache/locale/oslo.cache-log-warning.pot b/oslo.cache/locale/oslo.cache-log-warning.pot deleted file mode 100644 index 7441d0ff..00000000 --- a/oslo.cache/locale/oslo.cache-log-warning.pot +++ /dev/null @@ -1,27 +0,0 @@ -# Translations template for oslo.cache. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.cache project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.cache 0.5.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 06:59+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - -#: oslo_cache/backends/mongo.py:424 -#, python-format -msgid "" -"TTL index already exists on db collection <%(c_name)s>, remove index " -"<%(indx_name)s> first to make updated mongo_ttl_seconds value to be " -"effective" -msgstr "" - diff --git a/oslo.cache/locale/oslo.cache.pot b/oslo.cache/locale/oslo.cache.pot deleted file mode 100644 index a90b9d48..00000000 --- a/oslo.cache/locale/oslo.cache.pot +++ /dev/null @@ -1,63 +0,0 @@ -# Translations template for oslo.cache. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.cache project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.cache 0.5.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 06:59+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - -#: oslo_cache/_memcache_pool.py:124 -#, python-format -msgid "Unable to get a connection from pool id %(id)s after %(seconds)s seconds." -msgstr "" - -#: oslo_cache/core.py:196 -msgid "region not type dogpile.cache.CacheRegion" -msgstr "" - -#: oslo_cache/backends/mongo.py:248 -msgid "db_hosts value is required" -msgstr "" - -#: oslo_cache/backends/mongo.py:253 -msgid "database db_name is required" -msgstr "" - -#: oslo_cache/backends/mongo.py:258 -msgid "cache_collection name is required" -msgstr "" - -#: oslo_cache/backends/mongo.py:269 -msgid "integer value expected for w (write concern attribute)" -msgstr "" - -#: oslo_cache/backends/mongo.py:277 -msgid "replicaset_name required when use_replica is True" -msgstr "" - -#: oslo_cache/backends/mongo.py:292 -msgid "integer value expected for mongo_ttl_seconds" -msgstr "" - -#: oslo_cache/backends/mongo.py:318 -msgid "no ssl support available" -msgstr "" - -#: oslo_cache/backends/mongo.py:327 -#, python-format -msgid "" -"Invalid ssl_cert_reqs value of %s, must be one of \"NONE\", \"OPTIONAL\"," -" \"REQUIRED\"" -msgstr "" - diff --git a/oslo_cache/_i18n.py b/oslo_cache/_i18n.py index 1a5edf3d..03cbb3d9 100644 --- a/oslo_cache/_i18n.py +++ b/oslo_cache/_i18n.py @@ -19,7 +19,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html import oslo_i18n -_translators = oslo_i18n.TranslatorFactory(domain='oslo.cache') +_translators = oslo_i18n.TranslatorFactory(domain='oslo_cache') # The primary translation function using the well-known name "_" _ = _translators.primary diff --git a/setup.cfg b/setup.cfg index e2b20be9..f6ec0d8b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,18 +46,18 @@ all_files = 1 upload-dir = doc/build/html [compile_catalog] -directory = oslo.cache/locale -domain = oslo.cache +directory = oslo_cache/locale +domain = oslo_cache [update_catalog] -domain = oslo.cache -output_dir = oslo.cache/locale -input_file = oslo.cache/locale/oslo.cache.pot +domain = oslo_cache +output_dir = oslo_cache/locale +input_file = oslo_cache/locale/oslo_cache.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg -output_file = oslo.cache/locale/oslo.cache.pot +output_file = oslo_cache/locale/oslo_cache.pot [wheel] universal = true