diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2008-11-23 12:11:28 +0100 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2008-11-23 12:11:28 +0100 |
| commit | a2fddb8b40a66f5155eece653bb5eee568d627dc (patch) | |
| tree | c4137c9aa37c38ec616a56b2dfe7de8667ba0693 /bin | |
| parent | 21a9b9e064bcf30bbdb3392728e7abcf4dafbc76 (diff) | |
bugfix
bzr revid: fp@tinyerp.com-20081123111128-a2vqz7wf6w89popv
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/tools/translate.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bin/tools/translate.py b/bin/tools/translate.py index b222daed5ac..b22d12a136e 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -100,18 +100,15 @@ class TinyPoFile(object): else: tmp_tnrs = [] line = None - while not line: + while (not line): if 0 == len(self.lines): raise StopIteration() line = self.lines.pop(0).strip() - - while line.startswith('#'): - if line.startswith('#:'): + if line.startswith('#:'): tmp_tnrs.append( line[2:].strip().split(':') ) - line = self.lines.pop(0).strip() - while (not line) and self.lines: - # allow empty lines between comments and msgid - line = self.lines.pop(0).strip() + if line.startswith('#'): + line = None + if not line.startswith('msgid'): raise Exception("malformed file: bad line: %s" % line) source = unquote(line[6:]) |
