summaryrefslogtreecommitdiff
path: root/HACKING.rst
diff options
context:
space:
mode:
authorZhao Chao <zhaochao1984@gmail.com>2018-01-22 13:55:36 +0800
committerManoj Kumar <kumarmn@us.ibm.com>2018-01-24 17:21:26 +0000
commit2fd8c66f64b086104a9b00334f0eab71d4f49a9a (patch)
tree84834a950a0e850ac83f92fce75943f3ccd69f9f /HACKING.rst
parenta70d6b9cbebb8cce380ec387798e3e86fcde075f (diff)
downloadtrove-2fd8c66f64b086104a9b00334f0eab71d4f49a9a.tar.gz
Remove log translations
According to discussions on the ML, log messages should not be translated any more. This patch also: * removes all usage of _LI, _LW, _LE, _LC; * updates log translation hacking rule. ML discussions: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html The original commit messages are kept as following to make a historic note: remove unwanted log translations recent discussions on the ML have led to the decision to eliminate all translations for messages that are destined for log files but retain them for messages that are going to be returned as exceptions and potentially shown to end users via an API. see [1], [2]. This change does that as follows. 1. If a string is being used to generate an exception, it will still be translated. Still Trove used both _LE and _ for these translations, there are some cases where _LE has been simply changed to _, and not removed. 2. If a string is used for a logging message, remove the use of _, _LE, _LW, _LI. Also, I have long felt that we have had a creep of checks in the pep8 tests that apparently make the code easier to read. I strongly believe that these kinds of "easier to read" things make sense if they are followed across all projects and not just gratuitously added one project at a time. I've taken this opportunity to reduce the merge mess caused by this change, to sync up our ignore flags with a long list of ignores from Nova. When they made the change for removing log translation, they could do it in an automated-way like I have because they didn't have to deal with under and overindented lines for visual edit (E127). Same for Cinder. Changes 448443 [3] and 447839 [4] were inadequate because they only addressed a little part of the problem, namely removing the use of _LE, _LI, and _LW, and I think this is a change we don't need to dribble in a few files at a time. The changes are straightforward and should be taken in a single lump to make it easy to deal with the merges coming. [1] http://lists.openstack.org/pipermail/openstack-operators/2017-March/012887.html [2] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html [3] https://review.openstack.org/448443 [4] https://review.openstack.org/447839 Co-Authored-By: Amrith Kumar <amrith@amrith.org> Co-Authored-By: Valencia Serrao <vserrao@us.ibm.com> Change-Id: I5f86c982469e625997fc8bd15c6fae0fc77a8c64
Diffstat (limited to 'HACKING.rst')
-rw-r--r--HACKING.rst3
1 files changed, 1 insertions, 2 deletions
diff --git a/HACKING.rst b/HACKING.rst
index 8aa52182..c5773879 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -1,8 +1,7 @@
Trove Library Specific Commandments
-------------------------------------
-- [T101] Validate that LOG messages, except debug ones, are translated
-- [T102] Validate that debug level logs are not translated
- [T103] Exception messages should be translated
- [T104] Python 3 is not support basestring,replace basestring with
six.string_types
+- [T105] Validate no LOG translations