From 3a087918655b2ebc7076a14386a5092a3496ee9f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 22 Feb 2014 19:17:58 +0530 Subject: [PATCH] Workaround for bug in xgettext https://savannah.gnu.org/bugs/index.php?41668 --- setup/translations.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup/translations.py b/setup/translations.py index ad20242c6d..e095acc6f5 100644 --- a/setup/translations.py +++ b/setup/translations.py @@ -125,6 +125,10 @@ class POT(Command): # {{{ src = pot_header + '\n' + src src += '\n\n' + self.get_tweaks_docs() pot = os.path.join(self.LP_PATH, __appname__+'.pot') + # Workaround for bug in xgettext: + # https://savannah.gnu.org/bugs/index.php?41668 + src = re.sub(r'#, python-brace-format\s+msgid ""\s+.*{0:', + lambda m: m.group().replace('python-brace', 'no-python-brace'), src) with open(pot, 'wb') as f: f.write(src) self.info('Translations template:', os.path.abspath(pot))