Add note about stop supporting of log translation

Change-Id: I7aaae780b0a9c6f9b24e20e63e223e5772a54544
This commit is contained in:
Rui Yuan Dou 2017-06-23 10:12:03 +08:00
parent 2abc50af33
commit 57d3aa8e90

View File

@ -23,6 +23,16 @@ level of the text:
- _() - Used for any exception messages, including strings used for both - _() - Used for any exception messages, including strings used for both
logging and exceptions. logging and exceptions.
.. note::
Starting with the Pike series, OpenStack no longer supports log
translation markers like ``_Lx()``, only ``_()`` should still be used for
exceptions that could be user facing. It is not necessary to add ``_Lx()``
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.
Do not use ``locals()`` for formatting messages because: Do not use ``locals()`` for formatting messages because:
1. It is not as clear as using explicit dicts. 1. It is not as clear as using explicit dicts.