From 4f31dfb80857dd72a20f7307e52f83b305fffc8e Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Thu, 29 Jan 2009 09:37:17 +0200 Subject: [PATCH] Fix .po loader for multiple source references Some .po files appeared to have space-separated source references. bzr revid: p_christ@hol.gr-20090129073717-nquq8i09u9bhppfi --- bin/tools/translate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 8238180df49..24f606f3550 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -118,7 +118,11 @@ class TinyPoFile(object): while line.startswith('#'): if line.startswith('#:'): - tmp_tnrs.append( line[2:].strip().split(':') ) + if ' ' in line[2:].strip(): + for lpart in line[2:].strip().split(' '): + tmp_tnrs.append(lpart.strip().split(':',2)) + else: + tmp_tnrs.append( line[2:].strip().split(':',2) ) elif line.startswith('#,') and (line[2:].strip() == 'fuzzy'): fuzzy = True line = self.lines.pop(0).strip()