From 1bd7aa110a1b30a6c44f4d792b3c817e10234c07 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 23 Jul 2018 20:22:53 -0400 Subject: change '# stops' in block to be 'stop after?' --- lib/stitch_plan/stitch_plan.py | 8 +------ messages.po | 37 ++++++++++++++++++++---------- print/templates/color_swatch.html | 4 ++-- print/templates/operator_detailedview.html | 12 ++++------ print/templates/operator_overview.html | 4 ++-- 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): @@ -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.""" 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 \n" "Language-Team: LANGUAGE \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 %} - {{ _('# stops') }}: {{ color_block.num_stops }} {{ _('# trims') }}: {{ color_block.num_trims }} + {{ _('stop after?') }}: {{ _("yes") if color_block.stop_after else _("no") }} {% endif %} @@ -41,8 +41,8 @@

{{ _('rgb') }}:{{ color_block.color.rgb }}

{{ _('thread') }}:{{ color_block.color.manufacturer }} {{ "#" + color_block.color.number if color_block.color.number }}

{{ _('# stitches') }}:{{ color_block.num_stitches }}

-

{{ _('# stops') }}:{{ color_block.num_stops }}

{{ _('# trims') }}:{{ color_block.num_trims }}

+

{{ _('stop after?') }}:{{ _("yes") if color_block.stop_after else _("no") }}

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 @@ {{ _('Total stitch count') }}: {{job.num_stitches }}

- {{ _('Total nr stops') }}: {{ job.num_stops }} - {{ _('Total nr trims') }}: {{ job.num_trims }} + {{ _('Total stops') }}: {{ job.num_stops }} + {{ _('Total trims') }}: {{ job.num_trims }}

- {% for color_block in color_blocks %} -

@@ -64,13 +62,11 @@ {{ _('# stitches') }}: {{ color_block.num_stitches }}

- {{ _('# stops') }}: {{ color_block.num_stops }} - {{ _('# trims') }}: {{ color_block.num_trims }} + {{ _('trims') }}: {{ color_block.num_trims }} + {{ _('stop after?') }}: {{ _("yes") if color_block.stop_after else _("no") }}

{% 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 @@

{{ _('Unique Colors') }}:{{ job.num_colors }}

{{ _('Color Blocks') }}:{{ job.num_color_blocks }}

-

{{ _('Total nr stops') }}:{{ job.num_stops }}

-

{{ _('Total nr trims') }}:{{ job.num_trims }}

+

{{ _('Total stops') }}:{{ job.num_stops }}

+

{{ _('Total trims') }}:{{ job.num_trims }}

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

{{ _('Unique Colors') }}:{{ job.num_colors }}

{{ _('Color Blocks') }}:{{ job.num_color_blocks }}

-

{{ _('Total nr stops') }}:{{ job.num_stops }}

-

{{ _('Total nr trims') }}:{{ job.num_trims }}

+

{{ _('Total stops') }}:{{ job.num_stops }}

+

{{ _('Total trims') }}:{{ job.num_trims }}

-- cgit v1.2.3