summaryrefslogtreecommitdiff
path: root/lib/inx/extensions.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-23 21:36:01 -0400
committerLex Neva <github.com@lexneva.name>2018-08-23 21:36:01 -0400
commit2fd6cb4a71daa55c93a56ee4387117a10b762c6b (patch)
treed81f8c460c36edd915bdd81ec6a21f00cd9e26fc /lib/inx/extensions.py
parent8f180fb62847072aa5f8a0ae69c2816d397097f5 (diff)
parent82d7f494184a031dabc6f5318c13c477ec8052a1 (diff)
Merge branch 'lexelby/fix-inx-generation' into lexelby/pes-fixes
Diffstat (limited to 'lib/inx/extensions.py')
-rwxr-xr-xlib/inx/extensions.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/inx/extensions.py b/lib/inx/extensions.py
index 2b097440..4b4b3c13 100755
--- a/lib/inx/extensions.py
+++ b/lib/inx/extensions.py
@@ -3,6 +3,18 @@ import pyembroidery
from .utils import build_environment, write_inx_file
from .outputs import pyembroidery_output_formats
from ..extensions import extensions, Input, Output
+from ..commands import LAYER_COMMANDS, OBJECT_COMMANDS, COMMANDS
+
+
+def layer_commands():
+ # We purposefully avoid using commands.get_command_description() here. We
+ # want to call _() on the description inside the actual template so that
+ # we use the translation language selected in build_environment().
+ return [(command, COMMANDS[command]) for command in LAYER_COMMANDS]
+
+
+def object_commands():
+ return [(command, COMMANDS[command]) for command in OBJECT_COMMANDS]
def pyembroidery_debug_formats():
@@ -21,4 +33,6 @@ def generate_extension_inx_files():
name = extension.name()
template = env.get_template('%s.inx' % name)
write_inx_file(name, template.render(formats=pyembroidery_output_formats(),
- debug_formats=pyembroidery_debug_formats()))
+ debug_formats=pyembroidery_debug_formats(),
+ layer_commands=layer_commands(),
+ object_commands=object_commands()))