--- a/src/pyams_content/shared/imagemap/paragraph.py Fri Feb 09 16:53:00 2018 +0100
+++ b/src/pyams_content/shared/imagemap/paragraph.py Fri Feb 09 17:48:14 2018 +0100
@@ -79,20 +79,22 @@
output.append(translate(MISSING_LANG_VALUE).format(field=field_title, lang=lang))
field_title = translate(IImageMapParagraph['reference'].title)
if not self.context.reference:
- output.append(translate(ERROR_VALUE).format(field=field_title,
- message=translate(_("internal reference is not defined"))))
+ output.append(translate(ERROR_VALUE).format(
+ field=field_title,
+ message=translate(_("no selected image map"))))
else:
target = self.context.get_target()
if target is None:
- output.append(translate(ERROR_VALUE).format(field=field_title,
- message=translate(_("internal reference target can't be "
- "found"))))
+ output.append(translate(ERROR_VALUE).format(
+ field=field_title,
+ message=translate(_("image map '{0}' can't be found")).reference(self.context.reference)))
else:
workflow = IWorkflow(target, None)
if workflow is not None:
workflow_state = IWorkflowState(target)
if workflow_state.state not in workflow.published_states:
- output.append(translate(ERROR_VALUE).format(field=field_title,
- message=translate(_("internal reference target "
- "is not published"))))
+ output.append(translate(ERROR_VALUE).format(
+ field=field_title,
+ message=translate(_("image map '{0}' is not published")).format(
+ II18n(target).query_attribute('title', request=request))))
return output