[IMP] translate: avoid loading duplicate `code`-type translations, we only care about one
authorOlivier Dony <odo@openerp.com>
Tue, 18 Sep 2012 07:30:29 +0000 (09:30 +0200)
committerOlivier Dony <odo@openerp.com>
Tue, 18 Sep 2012 07:30:29 +0000 (09:30 +0200)
bzr revid: odo@openerp.com-20120918073029-dujiwi17irt8m73t

openerp/tools/translate.py

index 0ead129..bbfbb8c 100644 (file)
@@ -351,6 +351,7 @@ class TinyPoFile(object):
             if targets and not fuzzy:
                 trans_type, name, res_id = targets.pop(0)
                 for t, n, r in targets:
+                    if t == trans_type == 'code': continue
                     self.extra_lines.append((t, n, r, source, trad, comments))
 
         self.first = False