diff options
-rw-r--r-- | websites/translated_converter.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/websites/translated_converter.py b/websites/translated_converter.py index b75b77dc..57116c29 100644 --- a/websites/translated_converter.py +++ b/websites/translated_converter.py @@ -38,7 +38,11 @@ for langfile in glob.glob(file_mask): raise #open lang file text = open(langfile,"r").read() - newtext = text.split('\n\n',1)[0] + #Remove trailing spaces from lines + spaces=' {1,}\n' + spattern=re.compile(spaces,re.DOTALL) + for emptyline in spattern.findall(text): + text = text.replace(emptyline,'\n') # Write PO file po = polib.POFile() |