[PATCH] Do not translate empty strings, gettext translates them into system information (basically PO file header)

Vojtech Trefny vtrefny at redhat.com
Wed Nov 12 13:06:17 UTC 2014


---
 blivet/i18n.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/blivet/i18n.py b/blivet/i18n.py
index 1f07266..2f033bf 100644
--- a/blivet/i18n.py
+++ b/blivet/i18n.py
@@ -45,8 +45,8 @@ N_ = lambda x: x
 # evaluated on every call.
 # pylint: disable=unnecessary-lambda
 if six.PY2:
-    _ = lambda x: _get_translations().ugettext(x)
+    _ = lambda x: _get_translations().ugettext(x) if x else ""
     P_ = lambda x, y, z: _get_translations().ungettext(x, y, z)
 else:
-    _ = lambda x: _get_translations().gettext(x)
+    _ = lambda x: _get_translations().gettext(x) if x else ""
     P_ = lambda x, y, z: _get_translations().ngettext(x, y, z)
-- 
2.1.0



More information about the anaconda-patches mailing list