From d78717c10b0309b19e655518e9a162526b0e2156 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Thu, 1 May 2014 06:10:57 -0700 Subject: [PATCH] Add missing translation support Update a number of files to add missing translation support. The patch adds a new hacking check - N320. This ensures that all log messages, except debug ones, have translations. A '# noqa' indicates that the validation will not be done on the specific log message. This should be used in cases where the translations do not need to be done, for example, the log message is logging raw data. Change-Id: I3e1fdd04d87b09dff50950b5e85f5cacfb29afdc Closes-bug: #1314994 --- HACKING.rst | 2 +- tox.ini | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HACKING.rst b/HACKING.rst index 1246575d8..84f6f3e1c 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -8,7 +8,7 @@ Neutron Style Commandments Neutron Specific Commandments -------------------------- -None so far +- [N320] Validate that LOG messages, except debug ones, have translations Creating Unit Tests ------------------- diff --git a/tox.ini b/tox.ini index 028f8865f..297998a8c 100644 --- a/tox.ini +++ b/tox.ini @@ -46,3 +46,6 @@ ignore = E125,H404 show-source = true builtins = _ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,.ropeproject + +[hacking] +local-check-factory = neutron.hacking.checks.factory