diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2023-02-22 20:22:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-22 20:22:49 -0500 |
| commit | 8cdfaf099864e76a487ce77712ee54682e4a091f (patch) | |
| tree | 6fd43b320f53d4f81a40c0097091f8e4baaa31ac /bin | |
| parent | e559af72480858c32f5df57f7f6a0d653718ebf8 (diff) | |
| parent | 92dff9f359f19c57ce63046a85cbd40746e50a32 (diff) | |
Merge pull request #1803 from inkstitch/lexelby/smoothing
Meander fill
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/inkstitch-tiles-gettext | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/inkstitch-tiles-gettext b/bin/inkstitch-tiles-gettext new file mode 100755 index 00000000..e125dabf --- /dev/null +++ b/bin/inkstitch-tiles-gettext @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +import os +import json + +# generate fake python code containing the names and descriptions of all built- +# in tiles as gettext calls so that pybabel will extract them into messages.po + +tiles_dir = os.path.join(os.path.dirname(__file__), "..", "tiles") + +for tile in sorted(os.listdir(tiles_dir)): + with open(os.path.join(tiles_dir, tile, "tile.json")) as tile_json: + tile_metadata = json.load(tile_json) + + print("# L10N name of tile in tiles/%s" % tile) + print("_(%s)" % repr(tile_metadata.get("name", ""))) + + if tile_metadata.get("description", ""): + print("# L10N description of tile in tiles/%s" % tile) + print("_(%s)" % repr(tile_metadata.get("description", ""))) + |
