From 0630c0577b0e6555d76b23866dbdf63f69a89eb4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 5 Jun 2014 22:48:44 +0200 Subject: [PATCH] Setup for translation To start translation, we need to initially import the translation file - and place it at the proper place so that the usual CI scripts can handle it. The proper place is for all python projects $PROJECT/locale/$PROJECT.pot - see setup.cfg. Further imports will be done by the OpenStack Proposal bot. Setup also setup.cfg with the usual babel commands and add the default babel.cfg file. Change-Id: I583e98fac2f9b84cd1115640b936057ad95957e8 --- babel.cfg | 1 + oslo.messaging/locale/oslo.messaging.pot | 45 ++++++++++++++++++++++++ setup.cfg | 14 ++++++++ 3 files changed, 60 insertions(+) create mode 100644 babel.cfg create mode 100644 oslo.messaging/locale/oslo.messaging.pot diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 000000000..efceab818 --- /dev/null +++ b/babel.cfg @@ -0,0 +1 @@ +[python: **.py] diff --git a/oslo.messaging/locale/oslo.messaging.pot b/oslo.messaging/locale/oslo.messaging.pot new file mode 100644 index 000000000..492809374 --- /dev/null +++ b/oslo.messaging/locale/oslo.messaging.pot @@ -0,0 +1,45 @@ +# Translations template for oslo.messaging. +# Copyright (C) 2014 ORGANIZATION +# This file is distributed under the same license as the oslo.messaging +# project. +# FIRST AUTHOR , 2014. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: oslo.messaging 1.3.0.41.gea989b8\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2014-06-05 22:48+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/messaging/notify/_impl_routing.py:81 +#, python-format +msgid "Failed to load any notifiers for %(namespace)s" +msgstr "" + +#: oslo/messaging/notify/_impl_routing.py:117 +#, python-format +msgid "Routing '%(event)s' notification to '%(driver)s' driver" +msgstr "" + +#: oslo/messaging/openstack/common/excutils.py:62 +#, python-format +msgid "Original exception being dropped: %s" +msgstr "" + +#: oslo/messaging/openstack/common/excutils.py:91 +#, python-format +msgid "Unexpected exception occurred %d time(s)... retrying." +msgstr "" + +#: oslo/messaging/rpc/dispatcher.py:142 +#, python-format +msgid "Exception during message handling: %s" +msgstr "" + diff --git a/setup.cfg b/setup.cfg index 9cd4374fb..2e650fb0d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -60,3 +60,17 @@ all_files = 1 [upload_sphinx] upload-dir = doc/build/html + +[compile_catalog] +directory = oslo.messaging/locale +domain = oslo.messaging + +[update_catalog] +domain = oslo.messaging +output_dir = oslo.messaging/locale +input_file = oslo.messaging/locale/oslo.messaging.pot + +[extract_messages] +keywords = _ gettext ngettext l_ lazy_gettext +mapping_file = babel.cfg +output_file = oslo.messaging/locale/oslo.messaging.pot