fix missing layer and object commands

pull/290/head
Lex Neva 2018-08-22 22:54:15 -04:00
rodzic 4e15a2ead2
commit 082e1664bb
1 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -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()))