summaryrefslogtreecommitdiff
path: root/bin/pyembroidery-gettext
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-08-21 16:45:13 -0400
committerGitHub <noreply@github.com>2018-08-21 16:45:13 -0400
commitafb886cbe04d19c6b7d1886dfc2c6052646a2dbf (patch)
tree2d0a6fe95a26d5b934fe893f3d2b3e94b2aadcc8 /bin/pyembroidery-gettext
parent8116f32068a4fe55e7f30ca2a369b2443d89b560 (diff)
parent8f700007fc7d3b7866d4e4a3dac6a36bb3e1be2a (diff)
Merge pull request #286 from inkstitch/lexelby/i18n-revamp
localize INX files
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'])