summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2017-03-16 18:18:10 -0400
committerDoug Hellmann <doug@doughellmann.com>2017-03-17 10:41:07 -0400
commitf294b2d5054f421ccf13e110b2cc67128d4bebd8 (patch)
tree6df4182332850e85e24f039215f45edfb2c61885
parent32b4c1e10cd21ef1c461222bd716b22dcb47ef34 (diff)
downloadoslo-i18n-f294b2d5054f421ccf13e110b2cc67128d4bebd8.tar.gz
add notes about skipping log translation setup3.15.0
Now that we have decided to skip log translations, let's stop telling people to set them up. This change adds a note saying the work is not needed, but leaves the instructions so that someone trying to understand existing code can review them. The actual translation functions will be marked for deprecation in the future, when enough projects have dropped using them to warrant that change. Change-Id: Ia34ad79ca9c6d1ea862b6954669c992a898a03ff Signed-off-by: Doug Hellmann <doug@doughellmann.com>
-rw-r--r--doc/source/guidelines.rst9
-rw-r--r--doc/source/usage.rst13
2 files changed, 22 insertions, 0 deletions
diff --git a/doc/source/guidelines.rst b/doc/source/guidelines.rst
index dd82aec..9ed87fe 100644
--- a/doc/source/guidelines.rst
+++ b/doc/source/guidelines.rst
@@ -51,6 +51,15 @@ By default, the translation should use the ``_()``.
Log Translation
===============
+.. note::
+
+ Starting with the Pike series, OpenStack no longer supports log
+ translation. It is not necessary to add translation instructions to
+ new code, and the instructions can be removed from old code. Refer
+ to the email thread `understanding log domain change
+ <http://lists.openstack.org/pipermail/openstack-dev/2017-March/thread.html#113365>`_
+ on the openstack-dev mailing list for more details.
+
OpenStack supports translating some log levels using separate message
catalogs, and so has separate marker functions. These well-known names
are used by the build system jobs that extract the messages from the
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
index 1c92fdd..e80816e 100644
--- a/doc/source/usage.rst
+++ b/doc/source/usage.rst
@@ -27,6 +27,15 @@ the marker functions the factory creates.
it is a private implementation detail, and not meant to be used
outside of the library's own code.
+.. note::
+
+ Starting with the Pike series, OpenStack no longer supports log
+ translation. It is not necessary to add translation instructions to
+ new code, and the instructions can be removed from old code. Refer
+ to the email thread `understanding log domain change
+ <http://lists.openstack.org/pipermail/openstack-dev/2017-March/thread.html#113365>`_
+ on the openstack-dev mailing list for more details.
+
.. code-block:: python
# myapp/_i18n.py
@@ -50,6 +59,9 @@ the marker functions the factory creates.
# Translators for log levels.
#
+ # NOTE(dhellmann): This is not needed for new projects as of the
+ # Pike series.
+ #
# The abbreviated names are meant to reflect the usual use of a short
# name like '_'. The "L" is for "log" and the other letter comes from
# the level.
@@ -118,6 +130,7 @@ code for translatable strings looks for the marker function names.
:func:`gettextutils.install` should be replaced with the
application or library integration module described here.
+
Handling hacking Objections to Imports
======================================