diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-02-23 00:12:11 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-02-23 00:12:11 +0000 |
| commit | 7913cba90bccb9501b63a0518c58abbd5a6b330d (patch) | |
| tree | 6d201d7d9e6c7bdc8dff61ca549a533eb1636c8e /i18n.py | |
| parent | c4cf2ae86bfe3369acd13212ba8df494496b4de0 (diff) | |
Try to centralise .pot building.
Diffstat (limited to 'i18n.py')
| -rw-r--r-- | i18n.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2,6 +2,17 @@ import glob import os from waflib import Logs +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)) + " " + + 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)) + + def po_to_mo(dir, name): for f in glob.glob(os.path.join(dir, 'po', '*.po')): |
