[MERGE] turnk
[odoo/odoo.git] / npybabel.py
index f603791..93ff5bc 100755 (executable)
@@ -93,10 +93,9 @@ def extract_qweb(fileobj, keywords, comment_tags, options):
     :rtype: ``iterator``
     """
     result = []
-    def handle_text(text, lineno, name=None):
+    def handle_text(text, lineno):
         text = (text or "").strip()
-        if len(text) > 1 or name in ['accesskey']: 
-            # Avoid mono-char tokens like ':' ',' etc but keep accesskeys
+        if len(text) > 1: # Avoid mono-char tokens like ':' ',' etc.
             result.append((lineno, None, text, [TRANSLATION_FLAG_COMMENT]))
 
     # not using elementTree.iterparse because we need to skip sub-trees in case
@@ -107,10 +106,10 @@ def extract_qweb(fileobj, keywords, comment_tags, options):
             if "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"):
-                handle_text(el.text, el.sourceline, el.tag)
-                for att in ('title', 'alt', 'label', 'placeholder', 'accesskey'):
+                handle_text(el.text, el.sourceline)
+                for att in ('title', 'alt', 'label'):
                     if att in el.attrib:
-                        handle_text(el.attrib[att], el.sourceline, att)
+                        handle_text(el.attrib[att], el.sourceline)
                 iter_elements(el)
             handle_text(el.tail, el.sourceline)