mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround for bug in xgettext
https://savannah.gnu.org/bugs/index.php?41668
This commit is contained in:
parent
225a7e0723
commit
3a08791865
@ -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+.*<code>{0:</code>',
|
||||
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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user