Issue #2894499 by amateescu, Manuel Garcia, xjm: Rename 'Editorial workflow' to 'Editorial'

8.4.x
Lee Rowlands 2017-07-28 13:56:18 +10:00
parent e7d43505b2
commit b3aa553406
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
5 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@ dependencies:
module:
- content_moderation
id: editorial
label: 'Editorial workflow'
label: 'Editorial'
type: content_moderation
type_settings:
states:

View File

@ -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';
}

View File

@ -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);
}

View File

@ -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());
}
/**

View File

@ -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'),