X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=i18n.py;h=8e2fd6404e5d4d031c92fc31f72727b1ba95fad0;hb=4de9464d7547954bcc74d4c1337c202dc50f588a;hp=ab7f6843bea1bfefea357b598c1c4eadbee03cc8;hpb=3940c9ceea90f99d18792bb9ea6074ca65d7fed9;p=dcpomatic.git diff --git a/i18n.py b/i18n.py index ab7f6843b..8e2fd6404 100644 --- a/i18n.py +++ b/i18n.py @@ -2,19 +2,21 @@ import glob import os from waflib import Logs -def pot(dir, sources, name, all = False): +def pot(dir, sources, name): s = "" for f in sources.split('\n'): t = f.strip() if len(t) > 0: s += (os.path.join(dir, t)) + " " - if all: - Logs.info('Making %s.pot (extracting all)' % os.path.join('build', dir, name)) - os.system('xgettext -d %s -s --extract-all -p %s -o %s.pot %s' % (name, os.path.join('build', dir), name, s)) - else: - Logs.info('Making %s.pot' % os.path.join('build', dir, name)) - os.system('xgettext -d %s -s --keyword=_ --add-comments=/ -p %s -o %s.pot %s' % (name, os.path.join('build', dir), name, s)) + Logs.info('Making %s.pot' % os.path.join('build', dir, name)) + d = os.path.join('build', dir) + try: + os.makedirs(d) + except: + pass + + os.system('xgettext -d %s -s --keyword=_ --add-comments=/ -p %s -o %s.pot %s' % (name, d, name, s)) def po_to_mo(dir, name, bld):