summaryrefslogtreecommitdiff
path: root/i18n.py
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-23 00:12:11 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-23 00:12:11 +0000
commit7913cba90bccb9501b63a0518c58abbd5a6b330d (patch)
tree6d201d7d9e6c7bdc8dff61ca549a533eb1636c8e /i18n.py
parentc4cf2ae86bfe3369acd13212ba8df494496b4de0 (diff)
Try to centralise .pot building.
Diffstat (limited to 'i18n.py')
-rw-r--r--i18n.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/i18n.py b/i18n.py
index d5531834b..10eaa38e9 100644
--- a/i18n.py
+++ b/i18n.py
@@ -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')):