Remove concatenation with translated messages
Translated messages should not be expanded by concatenation. Instead the additional text should be replacement text or part of the translated message to allow the translators as much information as possible when doing the translations. Also, when lazy translation is enabled, the object returned does not support concatenation and raises an exception. Thus this patch is needed to support blueprint: i18n-enablement. This patch includes a hacking check for concatenation with a translated message. Change-Id: I8b368d275faa14b4750735445321874ce1da37d5 Partially-Implements: blueprint i18n-enablement
This commit is contained in:
committed by
Jay S. Bryant
parent
298b0328d2
commit
4ef6c1d4ea
@@ -38,6 +38,7 @@ Nova Specific Commandments
|
||||
- [N323] Ensure that the _() function is explicitly imported to ensure proper translations.
|
||||
- [N324] Ensure that jsonutils.%(fun)s must be used instead of json.%(fun)s
|
||||
- [N325] str() cannot be used on an exception. Remove use or use six.text_type()
|
||||
- [N326] Translated messages cannot be concatenated. String should be included in translated message.
|
||||
|
||||
Creating Unit Tests
|
||||
-------------------
|
||||
|
||||
Reference in New Issue
Block a user