diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2019-07-04 10:51:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-04 10:51:22 -0400 |
| commit | 32548e8e51d13d511813ba4e2a4571bd73e440e5 (patch) | |
| tree | a5c1d8e8932048f6f4c02d55e144023fa82b2e8f /bin | |
| parent | 4db305a36dd87dc9fc21034571eaebb078054bd3 (diff) | |
| parent | c51ae9ccb7052e4015b4a3dd3e2817d8625e3ab0 (diff) | |
lettering features (#399)
lettering features
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/inkstitch-fonts-gettext | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/inkstitch-fonts-gettext b/bin/inkstitch-fonts-gettext new file mode 100755 index 00000000..8a3aa728 --- /dev/null +++ b/bin/inkstitch-fonts-gettext @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import os +import json + +# generate fake python code containing the names and descriptions of all built- +# in fonts as gettext calls so that pybabel will extract them into messages.po + +fonts_dir = os.path.join(os.path.dirname(__file__), "..", "fonts") + +for font in os.listdir(fonts_dir): + with open(os.path.join(fonts_dir, font, "font.json")) as font_json: + font_metadata = json.load(font_json) + + print "# L10N name of font in fonts/%s" % font + print "_(%s)" % repr(font_metadata.get("name", "")) + + print "# L10N description of font in fonts/%s" % font + print "_(%s)" % repr(font_metadata.get("description", ""))
\ No newline at end of file |
