change '# stops' in block to be 'stop after?'

pull/234/head
Lex Neva 2018-07-23 20:22:53 -04:00
rodzic e0cecd6fa4
commit 1bd7aa110a
6 zmienionych plików z 36 dodań i 33 usunięć

Wyświetl plik

@ -97,7 +97,7 @@ class StitchPlan(object):
@property
def num_stops(self):
return sum(block.num_stops for block in self)
return sum(1 for block in self if block.stop_after)
@property
def num_trims(self):
@ -185,12 +185,6 @@ class ColorBlock(object):
"""Number of stitches in this color block."""
return len(self.stitches)
@property
def num_stops(self):
"""Number of pauses in this color block."""
return sum(1 for stitch in self if stitch.stop)
@property
def num_trims(self):
"""Number of trims in this color block."""

Wyświetl plik

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2018-07-24 20:19-0400\n"
"POT-Creation-Date: 2018-07-25 21:18-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -418,7 +418,7 @@ msgstr ""
msgid "Embroidery Simulation"
msgstr ""
#: lib/extensions/zip.py:66
#: lib/extensions/zip.py:52
msgid "No embroidery file formats selected."
msgstr ""
@ -434,7 +434,7 @@ msgid ""
"file to lexelby@github."
msgstr ""
#: lib/svg/svg.py:87
#: lib/svg/svg.py:90
msgid "Stitch Plan"
msgstr ""
@ -462,18 +462,27 @@ msgid "thread"
msgstr ""
#: print/templates/color_swatch.html:19 print/templates/color_swatch.html:43
#: print/templates/operator_detailedview.html:64
#: print/templates/operator_detailedview.html:62
msgid "# stitches"
msgstr ""
#: print/templates/color_swatch.html:23 print/templates/color_swatch.html:44
#: print/templates/operator_detailedview.html:67
msgid "# stops"
msgid "# trims"
msgstr ""
#: print/templates/color_swatch.html:24 print/templates/color_swatch.html:45
#: print/templates/operator_detailedview.html:68
msgid "# trims"
#: print/templates/operator_detailedview.html:66
msgid "stop after?"
msgstr ""
#: print/templates/color_swatch.html:24 print/templates/color_swatch.html:45
#: print/templates/operator_detailedview.html:66
msgid "yes"
msgstr ""
#: print/templates/color_swatch.html:24 print/templates/color_swatch.html:45
#: print/templates/operator_detailedview.html:66
msgid "no"
msgstr ""
#: print/templates/footer.html:2
@ -554,20 +563,24 @@ msgstr ""
#: print/templates/operator_detailedview.html:33
#: print/templates/operator_overview.html:8
#: print/templates/print_overview.html:8
msgid "Total nr stops"
msgid "Total stops"
msgstr ""
#: print/templates/operator_detailedview.html:34
#: print/templates/operator_overview.html:9
#: print/templates/print_overview.html:9
msgid "Total nr trims"
msgid "Total trims"
msgstr ""
#: print/templates/operator_detailedview.html:63
#: print/templates/operator_detailedview.html:61
msgid "thread used"
msgstr ""
#: print/templates/operator_detailedview.html:71
#: print/templates/operator_detailedview.html:65
msgid "trims"
msgstr ""
#: print/templates/operator_detailedview.html:69
msgid "Enter operator notes..."
msgstr ""

Wyświetl plik

@ -20,8 +20,8 @@
{% endif %}
{# We don't want to see stops and trims if we have more than 13 colorSwatches to show #}
{% if color_blocks|length < 13 %}
<tspan dy="1.2em" x="2mm" class="swatch-stops">{{ _('# stops') }}: {{ color_block.num_stops }}</tspan>
<tspan dy="1.2em" x="2mm" class="swatch-trims">{{ _('# trims') }}: {{ color_block.num_trims }}</tspan>
<tspan dy="1.2em" x="2mm" class="swatch-stops">{{ _('stop after?') }}: {{ _("yes") if color_block.stop_after else _("no") }}</tspan>
{% endif %}
</text>
</svg>
@ -41,8 +41,8 @@
<p><span class="color-rgb">{{ _('rgb') }}:</span><span>{{ color_block.color.rgb }}</span></p>
<p><span class="swatch-thread">{{ _('thread') }}:</span><span data-field-name="thread-{{ color_block.color.hex_digits }}" contenteditable="true">{{ color_block.color.manufacturer }} {{ "#" + color_block.color.number if color_block.color.number }}</span></p>
<p><span class="swatch-stitches">{{ _('# stitches') }}:</span><span>{{ color_block.num_stitches }}</span></p>
<p><span class="swatch-stops">{{ _('# stops') }}:</span><span>{{ color_block.num_stops }}</span></p>
<p><span class="swatch-trims">{{ _('# trims') }}:</span><span>{{ color_block.num_trims }}</span></p>
<p><span class="swatch-stops">{{ _('stop after?') }}:</span><span>{{ _("yes") if color_block.stop_after else _("no") }}</span></p>
</div>
</div>
</div>

Wyświetl plik

@ -30,18 +30,16 @@
<span>{{ _('Total stitch count') }}: {{job.num_stitches }}</span>
</p>
<p>
<span>{{ _('Total nr stops') }}: {{ job.num_stops }}</span>
<span>{{ _('Total nr trims') }}: {{ job.num_trims }}</span>
<span>{{ _('Total stops') }}: {{ job.num_stops }}</span>
<span>{{ _('Total trims') }}: {{ job.num_trims }}</span>
</p>
<p>
<span></span>
</p>
</div>
{% for color_block in color_blocks %}
<div class="opd-color-block">
<p class="operator-svg operator-colorswatch">
<svg xmlns="http://www.w3.org/2000/svg">
@ -64,13 +62,11 @@
<span>{{ _('# stitches') }}: {{ color_block.num_stitches }}</span>
</p>
<p>
<span>{{ _('# stops') }}: {{ color_block.num_stops }}</span>
<span>{{ _('# trims') }}: {{ color_block.num_trims }}</span>
<span>{{ _('trims') }}: {{ color_block.num_trims }}</span>
<span>{{ _('stop after?') }}: {{ _("yes") if color_block.stop_after else _("no") }}</span>
</p>
<p>
<span class="notes" contenteditable="true" data-field-name="operator-notes-block{{ loop.index }}" data-placeholder="{{ _("Enter operator notes...") }}"></span>
</p>
</div>
{% endfor %}

Wyświetl plik

@ -5,8 +5,8 @@
<div class="table">
<p><span>{{ _('Unique Colors') }}:</span><span>{{ job.num_colors }}</span></p>
<p><span>{{ _('Color Blocks') }}:</span><span>{{ job.num_color_blocks }}</span></p>
<p><span>{{ _('Total nr stops') }}:</span><span>{{ job.num_stops }}</span></p>
<p><span>{{ _('Total nr trims') }}:</span><span>{{ job.num_trims }}</span></p>
<p><span>{{ _('Total stops') }}:</span><span>{{ job.num_stops }}</span></p>
<p><span>{{ _('Total trims') }}:</span><span>{{ job.num_trims }}</span></p>
</div>
</div>
<div>

Wyświetl plik

@ -5,8 +5,8 @@
<div class="table">
<p><span>{{ _('Unique Colors') }}:</span><span>{{ job.num_colors }}</span></p>
<p><span>{{ _('Color Blocks') }}:</span><span>{{ job.num_color_blocks }}</span></p>
<p><span>{{ _('Total nr stops') }}:</span><span>{{ job.num_stops }}</span></p>
<p><span>{{ _('Total nr trims') }}:</span><span>{{ job.num_trims }}</span></p>
<p><span>{{ _('Total stops') }}:</span><span>{{ job.num_stops }}</span></p>
<p><span>{{ _('Total trims') }}:</span><span>{{ job.num_trims }}</span></p>
</div>
</div>
<div>