[FIX] Translation: Error parsing .po files when application puts comments in a single line

lp bug: https://launchpad.net/bugs/491365 fixed

bzr revid: mra@tinyerp.com-20091203120914-cx2kv7gk7zg65248
This commit is contained in:
mra (Open ERP) 2009-12-03 17:39:14 +05:30
parent 8d26b4be3e
commit 160b545067
1 changed files with 6 additions and 1 deletions

View File

@ -188,7 +188,12 @@ class TinyPoFile(object):
raise StopIteration()
line = self.lines.pop(0).strip()
if line.startswith('#:'):
tmp_tnrs.append( line[2:].strip().split(':') )
for item in line[2:].strip().split(' '):
value = item.split(':')
if len(value) == 3:
if value[2].endswith(','):
value[2] = value[2][:-1]
tmp_tnrs.append( value )
if line.startswith('#'):
line = None