kopia lustrzana https://github.com/inkstitch/inkstitch
no translations in inx (#1358)
rodzic
79ca8d36bb
commit
65b2376c07
|
@ -9,15 +9,11 @@ from os.path import dirname
|
|||
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
from ..i18n import translation as default_translation
|
||||
|
||||
_top_path = dirname(dirname(dirname(os.path.realpath(__file__))))
|
||||
inx_path = os.path.join(_top_path, "inx")
|
||||
template_path = os.path.join(_top_path, "templates")
|
||||
version_path = _top_path
|
||||
|
||||
current_translation = default_translation
|
||||
|
||||
|
||||
def build_environment():
|
||||
env = Environment(
|
||||
|
@ -26,8 +22,6 @@ def build_environment():
|
|||
extensions=['jinja2.ext.i18n']
|
||||
)
|
||||
|
||||
env.install_gettext_translations(current_translation)
|
||||
|
||||
with open(os.path.join(version_path, 'LICENSE'), 'r') as license:
|
||||
env.globals["inkstitch_license"] = "".join(license.readlines())
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<id>org.inkstitch.global_commands</id>
|
||||
<param name="description" type="description">These commands affect the entire embroidery design.</param>
|
||||
{% for command, description in global_commands %}
|
||||
<param name="{{ command }}" type="boolean" _gui-text="{{ _(description) }}">false</param>
|
||||
<param name="{{ command }}" type="boolean" gui-text="{{ description }}">false</param>
|
||||
{% endfor %}
|
||||
<param name="extension" type="string" gui-hidden="true">global_commands</param>
|
||||
<effect>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<name>Import Threadlist</name>
|
||||
<id>org.inkstitch.import_threadlist</id>
|
||||
<param name="extension" type="string" gui-hidden="true">import_threadlist</param>
|
||||
<param name="filepath" type="path" gui-text="{{ _('Choose file') }}" mode="file" filetypes="txt"/>
|
||||
<param name="filepath" type="path" gui-text="Choose file" mode="file" filetypes="txt"/>
|
||||
<param name="method" type="optiongroup" _gui-text="Choose method">
|
||||
<option value="1">Import Ink/Stitch threadlist</option>
|
||||
<option value="2">Import other threadlist*</option>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<input>
|
||||
<extension>.{{ format }}</extension>
|
||||
<mimetype>application/x-embroidery-{{ format }}</mimetype>
|
||||
<_filetypename>Ink/Stitch: {{ _(description) }} (.{{ format }})</_filetypename>
|
||||
<_filetypetooltip>{{ _("convert %(file_extension)s file to Ink/Stitch manual-stitch paths") % dict(file_extension=format.upper()) }}</_filetypetooltip>
|
||||
<filetypename>Ink/Stitch: {{ description }} (.{{ format }})</filetypename>
|
||||
<filetypetooltip>{{ "convert %(file_extension)s file to Ink/Stitch manual-stitch paths" % dict(file_extension=format.upper()) }}</filetypetooltip>
|
||||
</input>
|
||||
<param name="extension" type="string" gui-hidden="true">input</param>
|
||||
<script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<param name="extension" type="string" gui-hidden="true">install_custom_palette</param>
|
||||
<label indent="1">Choose a .gpl color palette file to install into Inkscape.</label>
|
||||
<label indent="1">Restart Inkscape to use.</label>
|
||||
<param indent="1" name="filepath" type="path" gui-text="{{ _('Choose file') }}" mode="file" filetypes="gpl"/>
|
||||
<param indent="1" name="filepath" type="path" gui-text="Choose file" mode="file" filetypes="gpl"/>
|
||||
<effect needs-live-preview="false">
|
||||
<object-type>all</object-type>
|
||||
<effects-menu>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<id>org.inkstitch.layer_commands</id>
|
||||
<param name="description" type="description">Commands will be added to the currently-selected layer.</param>
|
||||
{% for command, description in layer_commands %}
|
||||
<param name="{{ command }}" type="boolean" _gui-text="{{ _(description) }}">false</param>
|
||||
<param name="{{ command }}" type="boolean" gui-text="{{ description }}">false</param>
|
||||
{% endfor %}
|
||||
<param name="extension" type="string" gui-hidden="true">layer_commands</param>
|
||||
<effect>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<inkscape-extension translationdomain="inkstitch" xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
||||
<name>Attach Commands to Selected Objects</name>
|
||||
<id>org.inkstitch.commands</id>
|
||||
{% for command, description in object_commands %}
|
||||
<param name="{{ command }}" type="boolean" _gui-text="{{ _(description ) }}">false</param>
|
||||
{%- for command, description in object_commands -%}
|
||||
<param name="{{ command }}" type="boolean" gui-text="{{ description }}">false</param>
|
||||
{% endfor %}
|
||||
<param name="extension" type="string" gui-hidden="true">object_commands</param>
|
||||
<effect>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<output>
|
||||
<extension>.{{ format }}</extension>
|
||||
<mimetype>{{ mimetype }}</mimetype>
|
||||
<_filetypename>Ink/Stitch: {{ _(description) }} (.{{ format }})</_filetypename>
|
||||
<_filetypetooltip>{{ _("Save design in %(file_extension)s format using Ink/Stitch") % dict(file_extension=format.upper()) }}</_filetypetooltip>
|
||||
<filetypename>Ink/Stitch: {{ description }} (.{{ format }})</filetypename>
|
||||
<filetypetooltip>{{ "Save design in %(file_extension)s format using Ink/Stitch" % dict(file_extension=format.upper()) }}</filetypetooltip>
|
||||
<dataloss>true</dataloss>
|
||||
</output>
|
||||
<param name="extension" type="string" gui-hidden="true">output</param>
|
||||
|
|
|
@ -1,41 +1,39 @@
|
|||
{# these parameters are for g-code files (*.txt) #}
|
||||
<param type="notebook" name="gcode-settings">
|
||||
<page name="embroidery" gui-text="Coordinate Settings">
|
||||
<param name="flip_x" type="boolean" gui-text="{{ _("negate X coordinate values") }}" gui-description="{{ _("Negate x coordinates") }}">false</param>
|
||||
<param name="flip_y" type="boolean" gui-text="{{ _("negate Y coordinate values") }}" gui-description="{{ _("Negate y coordinates") }}">false</param>
|
||||
<param type="optiongroup" name="alternate_z" gui-text="{{ _("Z coordinate value") }}" gui-description="{{ _("Either alternate Z value between 0 and 1 or travel custom value.") }}">
|
||||
<option value="true">{{ _("alternate Z value") }}</option>
|
||||
<option value="false">{{ _("Z travel per stitch") }}</option>
|
||||
<param name="flip_x" type="boolean" gui-text="negate X coordinate values" gui-description="Negate x coordinates">false</param>
|
||||
<param name="flip_y" type="boolean" gui-text="negate Y coordinate values" gui-description="Negate y coordinates">false</param>
|
||||
<param type="optiongroup" name="alternate_z" gui-text="Z coordinate value" gui-description="Either alternate Z value between 0 and 1 or travel custom value.">
|
||||
<option value="true">alternate Z value</option>
|
||||
<option value="false">Z travel per stitch</option>
|
||||
</param>
|
||||
<param name="stitch_z_travel" type="float" gui-text="{{ _("Z travel per stitch") }}"
|
||||
gui-description="{{ _('increment z coordinate by this amount per stitch if "Z travel per stitch" is enabled') }}">5.0</param>
|
||||
<param name="stitch_z_travel" type="float" gui-text="Z travel per stitch"
|
||||
gui-description='increment z coordinate by this amount per stitch if "Z travel per stitch" is enabled'>5.0</param>
|
||||
</page>
|
||||
<page name="custom-commands" gui-text="Custom Commands">
|
||||
<param name="custom_stitch" type="string" appearance="multiline" gui-text="{{ _("STITCH") }}"
|
||||
gui-description="{{ _("Use '%X' for x-coordinate. Use '%Y' for y-coordinate and '%Z' for z-coordinate. Use '\\n' for a new line.") }}"></param>
|
||||
<param name="custom_color_change" type="string" appearance="multiline" gui-text="{{ _("COLOR CHANGE") }}"
|
||||
gui-description="{{ _("Use '\\n' for a new line. Leave empty to use default value. Use 'none' to remove.") }}"></param>
|
||||
<param name="custom_stop" type="string" appearance="multiline" gui-text="{{ _("STOP") }}"
|
||||
gui-description="{{ _("Use '\\n' for a new line. Leave empty to use default value. Use 'none' to remove.") }}"></param>
|
||||
<param name="custom_start" type="string" appearance="multiline" gui-text="{{ _("START") }}"
|
||||
gui-description="{{ _("Use '\\n' for a new line.") }}"></param>
|
||||
<param name="custom_end" type="string" appearance="multiline" gui-text="{{ _("END") }}"
|
||||
gui-description="{{ _("Use '\\n' for a new line.") }}"></param>
|
||||
<param name="custom_stitch" type="string" appearance="multiline" gui-text="STITCH"
|
||||
gui-description="Use '%X' for x-coordinate. Use '%Y' for y-coordinate and '%Z' for z-coordinate."></param>
|
||||
<param name="custom_color_change" type="string" appearance="multiline" gui-text="COLOR CHANGE"
|
||||
gui-description="Leave empty to use default value. Use 'none' to remove."></param>
|
||||
<param name="custom_stop" type="string" appearance="multiline" gui-text="STOP"
|
||||
gui-description="Leave empty to use default value. Use 'none' to remove."></param>
|
||||
<param name="custom_start" type="string" appearance="multiline" gui-text="START"></param>
|
||||
<param name="custom_end" type="string" appearance="multiline" gui-text="END"></param>
|
||||
</page>
|
||||
<page name="laser" gui-text="Laser Settings">
|
||||
<param name="laser_mode" type="boolean" gui-text="{{ _("laser mode") }}"
|
||||
gui-description="{{ _("Laser mode (generate g-code for grbl laser mode)") }}">false</param>
|
||||
<param name="dynamic_laser_power" type="boolean" gui-text="{{ _("dynamic laser power") }}"
|
||||
gui-description="{{ _("Use Grbl's M4 dynamic laser power mode. Ensures consistent laser cutting power regardless of motor speed. Only for PWM-capable lasers.") }}"
|
||||
<param name="laser_mode" type="boolean" gui-text="laser mode"
|
||||
gui-description="Laser mode (generate g-code for grbl laser mode)">false</param>
|
||||
<param name="dynamic_laser_power" type="boolean" gui-text="dynamic laser power"
|
||||
gui-description="Use Grbl's M4 dynamic laser power mode. Ensures consistent laser cutting power regardless of motor speed. Only for PWM-capable lasers."
|
||||
min="0.0" max="5.0">true</param>
|
||||
<param name="laser_warm_up_time" type="float" gui-text="{{ _("laser warm-up time") }}"
|
||||
gui-description="{{ _("When turning on the laser, wait this many seconds for laser to warm up (G4 command)") }}">0.0</param>
|
||||
<param name="spindle_speed" type="int" gui-text="{{ _("spindle speed") }}"
|
||||
gui-description="{{ _("spindle speed (laser power for laser mode, set to -1 to omit)") }}" min="-1" max="1000000000">-1</param>
|
||||
<param name="min_spindle_speed" type="int" gui-text="{{ _("min spindle speed") }}"
|
||||
gui-description="{{ _("minimum spindle speed value (grbl $31 setting)") }}" min="-1" max="1000000000">-1</param>
|
||||
<param name="max_spindle_speed" type="int" gui-text="{{ _("max spindle speed") }}"
|
||||
gui-description="{{ _("minimum spindle speed value (grbl $30 setting)") }}" min="-1" max="1000000000">-1</param>
|
||||
<param name="feed_rate" type="int" gui-text="{{ _("feed rate (in mm/min, set to -1 to omit)")}}" min="-1" max="1000000000">-1</param>
|
||||
<param name="laser_warm_up_time" type="float" gui-text="laser warm-up time"
|
||||
gui-description="When turning on the laser, wait this many seconds for laser to warm up (G4 command)">0.0</param>
|
||||
<param name="spindle_speed" type="int" gui-text="spindle speed"
|
||||
gui-description="spindle speed (laser power for laser mode, set to -1 to omit)" min="-1" max="1000000000">-1</param>
|
||||
<param name="min_spindle_speed" type="int" gui-text="min spindle speed"
|
||||
gui-description="minimum spindle speed value (grbl $31 setting)" min="-1" max="1000000000">-1</param>
|
||||
<param name="max_spindle_speed" type="int" gui-text="max spindle speed"
|
||||
gui-description="minimum spindle speed value (grbl $30 setting)" min="-1" max="1000000000">-1</param>
|
||||
<param name="feed_rate" type="int" gui-text="feed rate (in mm/min, set to -1 to omit)" min="-1" max="1000000000">-1</param>
|
||||
</page>
|
||||
</param>
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
<output>
|
||||
<extension>.zip</extension>
|
||||
<mimetype>application/zip</mimetype>
|
||||
<_filetypename>{{ _("Ink/Stitch: ZIP export multiple formats (.zip)") }}</_filetypename>
|
||||
<_filetypetooltip>{{ _("Create a ZIP with multiple embroidery file formats using Ink/Stitch") }}</_filetypetooltip>
|
||||
<filetypename>Ink/Stitch: ZIP export multiple formats (.zip)</filetypename>
|
||||
<filetypetooltip>Create a ZIP with multiple embroidery file formats using Ink/Stitch</filetypetooltip>
|
||||
<dataloss>true</dataloss>
|
||||
</output>
|
||||
{%- for format, description, mimetype, category in formats %}
|
||||
{%- if category == "embroidery" %}
|
||||
<param name="format-{{ format }}" type="boolean" _gui-text=".{{ format | upper }}: {{ _(description) }}">false</param>
|
||||
<param name="format-{{ format }}" type="boolean" _gui-text=".{{ format | upper }}: {{ description }}">false</param>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
<param name="format-svg" type="boolean" _gui-text=".SVG: {{ _("Scalable Vector Graphic") }}">false</param>
|
||||
<param name="format-threadlist" type="boolean" _gui-text=".TXT: {{ _("Threadlist") }}">false</param>
|
||||
<param name="format-svg" type="boolean" gui-text=".SVG: Scalable Vector Graphic">false</param>
|
||||
<param name="format-threadlist" type="boolean" gui-text=".TXT: Threadlist">false</param>
|
||||
<param name="extension" type="string" gui-hidden="true">zip</param>
|
||||
<script>
|
||||
{{ command_tag | safe }}
|
||||
|
|
Ładowanie…
Reference in New Issue