From 57d3aa8e903fd15962f0cf43694a3f9b82bacae0 Mon Sep 17 00:00:00 2001 From: Rui Yuan Dou Date: Fri, 23 Jun 2017 10:12:03 +0800 Subject: [PATCH] Add note about stop supporting of log translation Change-Id: I7aaae780b0a9c6f9b24e20e63e223e5772a54544 --- doc/source/devref/i18n.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/source/devref/i18n.rst b/doc/source/devref/i18n.rst index e9f6a4ead52..d23ec0400c1 100644 --- a/doc/source/devref/i18n.rst +++ b/doc/source/devref/i18n.rst @@ -23,6 +23,16 @@ level of the text: - _() - Used for any exception messages, including strings used for both 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 + `_ + on the openstack-dev mailing list for more details. + Do not use ``locals()`` for formatting messages because: 1. It is not as clear as using explicit dicts.