summaryrefslogtreecommitdiff
path: root/bin/pystitch-gettext
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pystitch-gettext')
-rwxr-xr-xbin/pystitch-gettext10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/pystitch-gettext b/bin/pystitch-gettext
new file mode 100755
index 00000000..06871527
--- /dev/null
+++ b/bin/pystitch-gettext
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import pystitch
+
+
+# generate fake python code containing the descriptions of pystitch formats
+# as gettext calls so that pybabel will extract them into messages.po
+for format in pystitch.supported_formats():
+ print("# L10N description for pystitch file format: %s" % format['extension'])
+ print("_(%s)" % repr(format['description']))