diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-07-23 20:22:53 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-07-25 21:18:13 -0400 |
| commit | 1bd7aa110a1b30a6c44f4d792b3c817e10234c07 (patch) | |
| tree | 4e652bde1122f44f360e140b696cb0eb81a7e9e1 | |
| parent | e0cecd6fa444e3b7ea2391ce4f2953ae9fd5f3fa (diff) | |
change '# stops' in block to be 'stop after?'
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 8 | ||||
| -rw-r--r-- | messages.po | 37 | ||||
| -rw-r--r-- | print/templates/color_swatch.html | 4 | ||||
| -rw-r--r-- | print/templates/operator_detailedview.html | 12 | ||||
| -rw-r--r-- | print/templates/operator_overview.html | 4 | ||||
| -rw-r--r-- | print/templates/print_overview.html | 4 |
6 files changed, 36 insertions, 33 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index a7cd60e8..682ea09f 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -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): @@ -186,12 +186,6 @@ class ColorBlock(object): 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.""" diff --git a/messages.po b/messages.po index 41a04cb3..19400443 100644 --- a/messages.po +++ b/messages.po @@ -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 "" diff --git a/print/templates/color_swatch.html b/print/templates/color_swatch.html index 6785b080..71022f6f 100644 --- a/print/templates/color_swatch.html +++ b/print/templates/color_swatch.html @@ -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> diff --git a/print/templates/operator_detailedview.html b/print/templates/operator_detailedview.html index e1899db4..e3c0d441 100644 --- a/print/templates/operator_detailedview.html +++ b/print/templates/operator_detailedview.html @@ -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 %} - - diff --git a/print/templates/operator_overview.html b/print/templates/operator_overview.html index 0c379316..048fd58e 100644 --- a/print/templates/operator_overview.html +++ b/print/templates/operator_overview.html @@ -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> diff --git a/print/templates/print_overview.html b/print/templates/print_overview.html index ca8638ff..cfbb81d1 100644 --- a/print/templates/print_overview.html +++ b/print/templates/print_overview.html @@ -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> |
