[FIX] po file parser: database creation crashes if res_id is an empty string
authorolt@tinyerp.com <>
Fri, 26 Nov 2010 08:20:48 +0000 (09:20 +0100)
committerolt@tinyerp.com <>
Fri, 26 Nov 2010 08:20:48 +0000 (09:20 +0100)
bzr revid: olt@tinyerp.com-20101126082048-ndc55bsf4vo3cu2c

bin/tools/translate.py

index e81a375..e0379a7 100644 (file)
@@ -253,6 +253,8 @@ class TinyPoFile(object):
 
         if self.tnrs:
             type, name, res_id, source, trad = self.tnrs.pop(0)
+            if not res_id:
+                res_id = '0'
         else:
             tmp_tnrs = []
             line = None