summaryrefslogtreecommitdiff
path: root/lib/elements
diff options
context:
space:
mode:
authorGeorge Steel <george.steel@gmail.com>2022-12-23 19:26:43 -0500
committerGeorge Steel <george.steel@gmail.com>2022-12-23 19:26:43 -0500
commit7d60b8e9d31ff8b0d98eba2bbc5ad9415c18170d (patch)
treedbdca3cc6ae29392c8a4be5cd1f91211aaf0d499 /lib/elements
parent54b0a3d6bf77b4c7b23f299ae1600399b80092df (diff)
parentaaa9daa86ccd37fd9d8f8840ce9bd9dcc95b2c92 (diff)
Merge branch 'main' of https://github.com/inkstitch/inkstitch into george-steel/random-base-satin
Diffstat (limited to 'lib/elements')
-rw-r--r--lib/elements/element.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index bf87d517..e7eb4dea 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -361,7 +361,7 @@ class EmbroideryElement(object):
@property
@param('trim_after',
- _ ('Trim After'),
+ _('Trim After'),
tooltip=_('Add a TRIM command after stitching this object.'),
type='boolean',
default=False,
@@ -371,7 +371,7 @@ class EmbroideryElement(object):
@property
@param('stop_after',
- _ ('Stop After'),
+ _('Stop After'),
tooltip=_('Add a STOP command after stitching this object.'),
type='boolean',
default=False,
@@ -398,7 +398,7 @@ class EmbroideryElement(object):
return patches
- def fatal(self, message):
+ def fatal(self, message, point_to_troubleshoot=False):
label = self.node.get(INKSCAPE_LABEL)
id = self.node.get("id")
if label:
@@ -407,8 +407,11 @@ class EmbroideryElement(object):
name = id
# L10N used when showing an error message to the user such as
- # "Some Path (path1234): error: satin column: One or more of the rungs doesn't intersect both rails."
- error_msg = "%s: %s %s" % (name, _("error:"), message)
+ # "Failed on PathLabel (path1234): Satin column: One or more of the rungs doesn't intersect both rails."
+ error_msg = "%s %s: %s" % (_("Failed on "), name, message)
+ if point_to_troubleshoot:
+ error_msg += "\n\n%s" % _("Please run Extensions > Ink/Stitch > Troubleshoot > Troubleshoot objects. "
+ "This will indicate the errorneus position.")
inkex.errormsg(error_msg)
sys.exit(1)
@@ -443,4 +446,4 @@ class EmbroideryElement(object):
for error in self.validation_errors():
# note that self.fatal() exits, so this only shows the first error
- self.fatal(error.description)
+ self.fatal(error.description, True)