[FIX] removed unwanted parsing of transalte() blocks in rml python code
authorChris Biersbach <cbi@openerp.com>
Mon, 1 Oct 2012 08:59:48 +0000 (10:59 +0200)
committerChris Biersbach <cbi@openerp.com>
Mon, 1 Oct 2012 08:59:48 +0000 (10:59 +0200)
bzr revid: cbi@openerp.com-20121001085948-bgixbde1y3a8ka1a

openerp/tools/translate.py

index 31221dc..fa3b023 100644 (file)
@@ -520,14 +520,10 @@ def trans_parse_rml(de):
             if isinstance(m, SKIPPED_ELEMENT_TYPES) or not m.text:
                 continue
             string_list = [s.replace('\n', ' ').strip() for s in re.split('\[\[.+?\]\]', m.text)]
-            string_list2 = [s.replace('\n', ' ').replace('translate(', '')[:-1].strip('"\'') for s in re.findall('translate\(.+?\)', m.text)]
             for s in string_list:
                 if s:
                     res.append(s.encode("utf8"))
-            for s in string_list2:
-                if s:
-                    res.append(s.encode("utf8"))
-        res.extend(trans_parse_rml(n))
+            res.extend(trans_parse_rml(n))
     return res
 
 def trans_parse_view(de):