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.policy/locale/oslo.policy.pot to
oslo_policy/locale/oslo_policy.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: I9ca723834b1634a9ed965a92724d72fefc15e0d2
This commit is contained in:
Andreas Jaeger 2016-01-29 11:47:44 +01:00
parent d587463d3a
commit b97a12c059
7 changed files with 7 additions and 144 deletions

View File

@ -1,20 +0,0 @@
# Translations template for oslo.policy.
# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the oslo.policy
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: oslo.policy 0.9.1.dev1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-08-09 07:14+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"

View File

@ -1,30 +0,0 @@
# Translations template for oslo.policy.
# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the oslo.policy
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: oslo.policy 0.9.1.dev1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-08-09 07:14+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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_policy/_parser.py:202 oslo_policy/_parser.py:328
#, python-format
msgid "Failed to understand rule %s"
msgstr ""
#: oslo_policy/_parser.py:212
#, python-format
msgid "No handler for matches of kind %s"
msgstr ""

View File

@ -1,20 +0,0 @@
# Translations template for oslo.policy.
# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the oslo.policy
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: oslo.policy 0.9.1.dev1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-08-09 07:13+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"

View File

@ -1,20 +0,0 @@
# Translations template for oslo.policy.
# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the oslo.policy
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: oslo.policy 0.9.1.dev1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-08-09 07:14+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"

View File

@ -1,47 +0,0 @@
# Translations template for oslo.policy.
# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the oslo.policy
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: oslo.policy 0.9.1.dev1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-08-09 07:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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_policy/opts.py:30
msgid "The JSON file that defines policies."
msgstr ""
#: oslo_policy/opts.py:34
msgid "Default rule. Enforced when a requested rule is not found."
msgstr ""
#: oslo_policy/opts.py:40
msgid ""
"Directories where policy configuration files are stored. They can be "
"relative to any directory in the search path defined by the config_dir "
"option, or absolute paths. The file defined by policy_file must exist for"
" these directories to be searched. Missing or empty directories are "
"ignored."
msgstr ""
#: oslo_policy/policy.py:242
#, python-format
msgid "%(rule)s on %(target)s by %(creds)s disallowed by policy"
msgstr ""
#: oslo_policy/policy.py:358
#, python-format
msgid "Rules must be an instance of dict or Rules, got %s instead"
msgstr ""

View File

@ -19,7 +19,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html .
import oslo_i18n
_translators = oslo_i18n.TranslatorFactory(domain='oslo.policy')
_translators = oslo_i18n.TranslatorFactory(domain='oslo_policy')
# The primary translation function using the well-known name "_"
_ = _translators.primary

View File

@ -44,18 +44,18 @@ all_files = 1
upload-dir = doc/build/html
[compile_catalog]
directory = oslo.policy/locale
domain = oslo.policy
directory = oslo_policy/locale
domain = oslo_policy
[update_catalog]
domain = oslo.policy
output_dir = oslo.policy/locale
input_file = oslo.policy/locale/oslo.policy.pot
domain = oslo_policy
output_dir = oslo_policy/locale
input_file = oslo_policy/locale/oslo_policy.pot
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = oslo.policy/locale/oslo.policy.pot
output_file = oslo_policy/locale/oslo_policy.pot
[wheel]
universal = true