diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-02-28 22:20:07 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-02-28 22:20:07 +0000 |
| commit | 0d3f5aae5b99832b7c5d55f32f5bccb365caa3fd (patch) | |
| tree | 674f3fe851d2ddd619102ca60c54bc1473a56ffe /i18n.py | |
| parent | 8bb4ba8f424cac07f7730fca99d5333fcd76a84d (diff) | |
Various markup and tweaks.
Diffstat (limited to 'i18n.py')
| -rw-r--r-- | i18n.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2,15 +2,19 @@ import glob import os from waflib import Logs -def pot(dir, sources, name): +def pot(dir, sources, name, all = False): s = "" for f in sources.split('\n'): t = f.strip() if len(t) > 0: s += (os.path.join(dir, t)) + " " - Logs.info('Making %s.pot' % os.path.join('build', dir, name)) - os.system('xgettext -d %s -s --keyword=_ -p %s -o %s.pot %s' % (name, os.path.join('build', dir), name, s)) + 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)) def po_to_mo(dir, name): |
