summaryrefslogtreecommitdiff
path: root/bin/pyembroidery-gettext
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-20 15:17:55 -0400
committerLex Neva <github.com@lexneva.name>2018-08-20 15:17:55 -0400
commitf7f59efd7d5117c6b9b43b100df5fe646ea46bc3 (patch)
treef1ca0fc62eced5d8f933114b1c6e7dd7261ccd10 /bin/pyembroidery-gettext
parentf99e553d989945e44f81bd56307cb9c9a049b3a2 (diff)
gettextify pyembroidery format descriptions
Diffstat (limited to 'bin/pyembroidery-gettext')
-rwxr-xr-xbin/pyembroidery-gettext10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/pyembroidery-gettext b/bin/pyembroidery-gettext
new file mode 100755
index 00000000..ac9bd1ab
--- /dev/null
+++ b/bin/pyembroidery-gettext
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import pyembroidery
+
+
+# generate fake python code containing the descriptions of pyembroidery formats
+# as gettext calls so that pybabel will extract them into messages.po
+for format in pyembroidery.supported_formats():
+ print "# L10N description for pyembroidery file format: %s" % format['extension']
+ print "_(%s)" % repr(format['description'])