From 2f01d5d635f47a6b450f332bed5e9a2d6620caf3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 29 Jan 2016 11:41:35 +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.reports/locale/oslo.reports.pot to oslo_reports/locale/oslo_reports.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: Id9b9865ee17375290357887077d3230a3e4ff949 --- .../locale/oslo.reports-log-critical.pot | 20 ------------------- .../locale/oslo.reports-log-error.pot | 20 ------------------- oslo.reports/locale/oslo.reports-log-info.pot | 20 ------------------- .../locale/oslo.reports-log-warning.pot | 20 ------------------- oslo.reports/locale/oslo.reports.pot | 20 ------------------- oslo_reports/_i18n.py | 2 +- setup.cfg | 12 +++++------ 7 files changed, 7 insertions(+), 107 deletions(-) delete mode 100644 oslo.reports/locale/oslo.reports-log-critical.pot delete mode 100644 oslo.reports/locale/oslo.reports-log-error.pot delete mode 100644 oslo.reports/locale/oslo.reports-log-info.pot delete mode 100644 oslo.reports/locale/oslo.reports-log-warning.pot delete mode 100644 oslo.reports/locale/oslo.reports.pot diff --git a/oslo.reports/locale/oslo.reports-log-critical.pot b/oslo.reports/locale/oslo.reports-log-critical.pot deleted file mode 100644 index b07ada2..0000000 --- a/oslo.reports/locale/oslo.reports-log-critical.pot +++ /dev/null @@ -1,20 +0,0 @@ -# Translations template for oslo.reports. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.reports -# project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.reports 0.4.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 07:26+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.reports/locale/oslo.reports-log-error.pot b/oslo.reports/locale/oslo.reports-log-error.pot deleted file mode 100644 index b07ada2..0000000 --- a/oslo.reports/locale/oslo.reports-log-error.pot +++ /dev/null @@ -1,20 +0,0 @@ -# Translations template for oslo.reports. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.reports -# project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.reports 0.4.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 07:26+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.reports/locale/oslo.reports-log-info.pot b/oslo.reports/locale/oslo.reports-log-info.pot deleted file mode 100644 index b07ada2..0000000 --- a/oslo.reports/locale/oslo.reports-log-info.pot +++ /dev/null @@ -1,20 +0,0 @@ -# Translations template for oslo.reports. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.reports -# project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.reports 0.4.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 07:26+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.reports/locale/oslo.reports-log-warning.pot b/oslo.reports/locale/oslo.reports-log-warning.pot deleted file mode 100644 index b07ada2..0000000 --- a/oslo.reports/locale/oslo.reports-log-warning.pot +++ /dev/null @@ -1,20 +0,0 @@ -# Translations template for oslo.reports. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.reports -# project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.reports 0.4.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 07:26+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.reports/locale/oslo.reports.pot b/oslo.reports/locale/oslo.reports.pot deleted file mode 100644 index b07ada2..0000000 --- a/oslo.reports/locale/oslo.reports.pot +++ /dev/null @@ -1,20 +0,0 @@ -# Translations template for oslo.reports. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the oslo.reports -# project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: oslo.reports 0.4.1.dev1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-09 07:26+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_reports/_i18n.py b/oslo_reports/_i18n.py index 2fa94a0..8db1970 100644 --- a/oslo_reports/_i18n.py +++ b/oslo_reports/_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.reports') +_translators = oslo_i18n.TranslatorFactory(domain='oslo_reports') # The primary translation function using the well-known name "_" _ = _translators.primary diff --git a/setup.cfg b/setup.cfg index 997ce4d..890dde0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -44,18 +44,18 @@ all_files = 1 upload-dir = doc/build/html [compile_catalog] -directory = oslo.reports/locale -domain = oslo.reports +directory = oslo_reports/locale +domain = oslo_reports [update_catalog] -domain = oslo.reports -output_dir = oslo.reports/locale -input_file = oslo.reports/locale/oslo.reports.pot +domain = oslo_reports +output_dir = oslo_reports/locale +input_file = oslo_reports/locale/oslo_reports.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg -output_file = oslo.reports/locale/oslo.reports.pot +output_file = oslo_reports/locale/oslo_reports.pot [wheel] universal = true