summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Rowlands2017-07-28 03:56:18 (GMT)
committerLee Rowlands2017-07-28 03:56:18 (GMT)
commitb3aa55340689ba5b264a4dcdf4af31bb8b092c17 (patch)
tree33d604d9be11fa8ddc2122a66bc55947d34fc045
parente7d43505b22b8a9067bbadc4bd249c75db5bf827 (diff)
Issue #2894499 by amateescu, Manuel Garcia, xjm: Rename 'Editorial workflow' to 'Editorial'
-rw-r--r--core/modules/content_moderation/config/install/workflows.workflow.editorial.yml2
-rw-r--r--core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php2
-rw-r--r--core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php2
-rw-r--r--core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php2
-rw-r--r--core/modules/workflows/src/Form/WorkflowEditForm.php2
5 files changed, 6 insertions, 4 deletions
diff --git a/core/modules/content_moderation/config/install/workflows.workflow.editorial.yml b/core/modules/content_moderation/config/install/workflows.workflow.editorial.yml
index 8ebd827..455d3fc 100644
--- a/core/modules/content_moderation/config/install/workflows.workflow.editorial.yml
+++ b/core/modules/content_moderation/config/install/workflows.workflow.editorial.yml
@@ -4,7 +4,7 @@ dependencies:
module:
- content_moderation
id: editorial
-label: 'Editorial workflow'
+label: 'Editorial'
type: content_moderation
type_settings:
states:
diff --git a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php
index eebb066..7f7c756 100644
--- a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php
+++ b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php
@@ -15,6 +15,6 @@ use Symfony\Component\Validator\Constraint;
class ModerationStateConstraint extends Constraint {
public $message = 'Invalid state transition from %from to %to';
- public $invalidStateMessage = 'State %state does not exist on %workflow';
+ public $invalidStateMessage = 'State %state does not exist on %workflow workflow';
}
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
index 90ecfcf..7e2d972 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php
@@ -123,7 +123,7 @@ class ContentModerationWorkflowConfigTest extends KernelTestBase {
$error_log = $this->configImporter->getErrors();
$expected = [
'The moderation state Test two is being used, but is not in the source storage.',
- 'The workflow Editorial workflow is being used, and cannot be deleted.',
+ 'The workflow Editorial is being used, and cannot be deleted.',
];
$this->assertEqual($expected, $error_log);
}
diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
index c8ce61b..b10f1e5 100644
--- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php
@@ -116,7 +116,7 @@ class EntityStateChangeValidationTest extends KernelTestBase {
$violations = $node->validate();
$this->assertCount(1, $violations);
- $this->assertEquals('State <em class="placeholder">invalid_state</em> does not exist on <em class="placeholder">Editorial workflow</em>', $violations->get(0)->getMessage());
+ $this->assertEquals('State <em class="placeholder">invalid_state</em> does not exist on <em class="placeholder">Editorial</em> workflow', $violations->get(0)->getMessage());
}
/**
diff --git a/core/modules/workflows/src/Form/WorkflowEditForm.php b/core/modules/workflows/src/Form/WorkflowEditForm.php
index 764c0c9..9a224eb 100644
--- a/core/modules/workflows/src/Form/WorkflowEditForm.php
+++ b/core/modules/workflows/src/Form/WorkflowEditForm.php
@@ -24,6 +24,8 @@ class WorkflowEditForm extends EntityForm {
/* @var \Drupal\workflows\WorkflowInterface $workflow */
$workflow = $this->entity;
+ $form['#title'] = $this->t('Edit %label workflow', ['%label' => $workflow->label()]);
+
$form['label'] = [
'#type' => 'textfield',
'#title' => $this->t('Label'),