summaryrefslogtreecommitdiff
path: root/i18n.py
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-28 22:20:07 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-28 22:20:07 +0000
commit0d3f5aae5b99832b7c5d55f32f5bccb365caa3fd (patch)
tree674f3fe851d2ddd619102ca60c54bc1473a56ffe /i18n.py
parent8bb4ba8f424cac07f7730fca99d5333fcd76a84d (diff)
Various markup and tweaks.
Diffstat (limited to 'i18n.py')
-rw-r--r--i18n.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/i18n.py b/i18n.py
index 10eaa38e9..c22cbdb95 100644
--- a/i18n.py
+++ b/i18n.py
@@ -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):