From 41f2f4f07105242ea641008e3e66aa710085fa7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 19 Jun 2017 09:43:15 +0200 Subject: [PATCH] general: rename "Variable Name" to "Identifier" (#15125) This also adds specific hints on the place it is used. --- wcs/fields.py | 5 +++-- wcs/wf/attachment.py | 3 ++- wcs/wf/export_to_model.py | 3 ++- wcs/wf/form.py | 3 ++- wcs/wf/wscall.py | 3 ++- wcs/workflows.py | 4 ++-- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/wcs/fields.py b/wcs/fields.py index c3670e8c..f69c0bd5 100644 --- a/wcs/fields.py +++ b/wcs/fields.py @@ -394,8 +394,9 @@ class WidgetField(Field): required = True, size = 50) form.add(CheckboxWidget, 'required', title = _('Required'), value = self.required) - form.add(VarnameWidget, 'varname', title=_('Variable Name'), - value=self.varname, size=30, advanced=(not self.varname)) + form.add(VarnameWidget, 'varname', title=_('Identifier'), + value=self.varname, size=30, advanced=(not self.varname), + hint=_('This is used as suffix for variable names.')) form.add(TextWidget, 'hint', title = _('Hint'), value = self.hint, cols=60, rows=3) form.add(CheckboxWidget, 'in_listing', title = _('Display in listings'), diff --git a/wcs/wf/attachment.py b/wcs/wf/attachment.py index ab55c443..4bb71518 100644 --- a/wcs/wf/attachment.py +++ b/wcs/wf/attachment.py @@ -153,7 +153,8 @@ class AddAttachmentWorkflowStatusItem(WorkflowStatusItem): value=self.backoffice_info_text) if 'varname' in parameters: form.add(VarnameWidget, '%svarname' % prefix, - title=_('Variable Name'), value=self.varname) + title=_('Identifier'), value=self.varname, + hint=_('This is used to get attachment in expressions.')) if 'push_to_portfolio' in parameters: form.add(CheckboxWidget, '%spush_to_portfolio' % prefix, title=_('Push generated file to portfolio'), diff --git a/wcs/wf/export_to_model.py b/wcs/wf/export_to_model.py index 2f504339..a9d11145 100644 --- a/wcs/wf/export_to_model.py +++ b/wcs/wf/export_to_model.py @@ -322,7 +322,8 @@ class ExportToModel(WorkflowStatusItem): value=self.push_to_portfolio) if 'varname' in parameters: form.add(VarnameWidget, '%svarname' % prefix, - title=_('Variable Name'), value=self.varname) + title=_('Identifier'), value=self.varname, + hint=_('This is used to get generated document in expressions.')) if 'method' in parameters: form.add(RadiobuttonsWidget, '%smethod' % prefix, diff --git a/wcs/wf/form.py b/wcs/wf/form.py index 6ac0620c..6b2da10d 100644 --- a/wcs/wf/form.py +++ b/wcs/wf/form.py @@ -105,7 +105,8 @@ class FormWorkflowStatusItem(WorkflowStatusItem): value=self.backoffice_info_text) if 'varname' in parameters: form.add(VarnameWidget, '%svarname' % prefix, required=True, - title=_('Variable Name'), value=self.varname) + title=_('Identifier'), value=self.varname, + hint=_('This is used as prefix for form fields variable names.')) form.widgets.append(HtmlWidget(htmltext('

%s

') % _('Edit Fields'))) diff --git a/wcs/wf/wscall.py b/wcs/wf/wscall.py index 9adc1514..d801243a 100644 --- a/wcs/wf/wscall.py +++ b/wcs/wf/wscall.py @@ -202,7 +202,8 @@ class WebserviceCallStatusItem(WorkflowStatusItem): attrs={'data-dynamic-display-parent': 'true'}) if 'varname' in parameters: form.add(VarnameWidget, '%svarname' % prefix, - title=_('Variable Name'), value=self.varname) + title=_('Identifier'), value=self.varname, + hint=_('This is used as prefix for webservice result variable names.')) form.widgets.append(HtmlWidget(htmltext('

%s

') % _('Error Handling'))) error_actions = [(':stop', _('Stop')), (':pass', _('Ignore'))] diff --git a/wcs/workflows.py b/wcs/workflows.py index 457da326..4484406f 100644 --- a/wcs/workflows.py +++ b/wcs/workflows.py @@ -1853,8 +1853,8 @@ class CommentableWorkflowStatusItem(WorkflowStatusItem): 'options': [(None, '---', None)] + self.get_list_of_roles()}) if 'varname' in parameters: form.add(VarnameWidget, '%svarname' % prefix, - title=_('Variable Name'), value=self.varname, - hint=_('This will make the comment available in a variable named comment_varname.')) + title=_('Identifier'), value=self.varname, + hint=_('This will make the comment available in a variable named comment_ + identifier.')) if 'backoffice_info_text' in parameters: form.add(WysiwygTextWidget, '%sbackoffice_info_text' % prefix, title=_('Information Text for Backoffice'), -- 2.11.0