[IMP] translations: simplify condition in qweb terms extraction
authorXavier Morel <xmo@openerp.com>
Fri, 10 Oct 2014 12:23:56 +0000 (14:23 +0200)
committerRaphael Collet <rco@openerp.com>
Tue, 2 Dec 2014 08:40:59 +0000 (09:40 +0100)
openerp/tools/translate.py

index 37e6492..0528ba2 100644 (file)
@@ -608,8 +608,7 @@ def _extract_translatable_qweb_terms(element, callback):
         if (el.tag.lower() not in SKIPPED_ELEMENTS
                 and "t-js" not in el.attrib
                 and not ("t-jquery" in el.attrib and "t-operation" not in el.attrib)
-                and not ("t-translation" in el.attrib and
-                         el.attrib["t-translation"].strip() == "off")):
+                and el.get("t-translation", '').strip() != "off"):
             _push(callback, el.text, el.sourceline)
             for att in ('title', 'alt', 'label', 'placeholder'):
                 if att in el.attrib: