X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=i18n.py;h=fa91783b6993d397936352173a9fe9c86f4a1941;hb=c8d0fedf1b85fbec9cd6569429e3d6cc59a7c3a4;hp=807aedda6b6d92444df48dabe63498a2cef1e4d4;hpb=f9b4461bd1ca77a2b22ede5cb8d90d8e7b83a1e4;p=dcpomatic.git diff --git a/i18n.py b/i18n.py index 807aedda6..fa91783b6 100644 --- a/i18n.py +++ b/i18n.py @@ -3,12 +3,12 @@ import os from waflib import Logs def command(c): - print c + print(c) os.system(c) def pot(dir, sources, name): s = "" - for f in sources.split('\n'): + for f in sources.split(): t = f.strip() if len(t) > 0: s += (os.path.join(dir, t)) + " " @@ -20,7 +20,7 @@ def pot(dir, sources, name): except: pass - command('xgettext -d %s -s --keyword=_ --add-comments=/ -p %s -o %s.pot %s' % (name, d, name, s)) + command('xgettext -d %s -s --keyword=_ --keyword=S_ --add-comments=/ -p %s -o %s.pot %s' % (name, d, name, s)) def pot_merge(dir, name): for f in glob.glob(os.path.join(os.getcwd(), dir, 'po', '*.po')):