diff --git a/bin/i18n/prop2po.py b/bin/i18n/prop2po.py index ad950353..09336cb7 100644 --- a/bin/i18n/prop2po.py +++ b/bin/i18n/prop2po.py @@ -4,6 +4,8 @@ TO DO: contribute changes back and go back to installing from pypi """ +import re + import click from datetime import datetime @@ -47,7 +49,9 @@ def to_po(source, destination, encoding, language, project, copyright): parts = line.split('=', 1) # TODO it fails on comments/lines with less than two parts after splitting try: - destination.write('#:\n' + 'msgid "' + parts[0] + '"\n' 'msgstr "' + parts[1][:-1] + '"\n\n') + # a bare " would end the .po string early; msgfmt then skips the line and the .mo keeps the wrong text + msgstr = re.sub(r'(?