Issue #2462289 by TravisCarden: Grammar error in config single import prompt

8.0.x
Alex Pott 2015-03-31 16:11:48 +01:00
parent aa197279ae
commit 2745b6127f
2 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ class ConfigSingleImportForm extends ConfirmFormBase {
$question = $this->t('Are you sure you want to update the %name @type?', $args); $question = $this->t('Are you sure you want to update the %name @type?', $args);
} }
else { else {
$question = $this->t('Are you sure you want to create new %name @type?', $args); $question = $this->t('Are you sure you want to create a new %name @type?', $args);
} }
return $question; return $question;
} }

View File

@ -50,7 +50,7 @@ EOD;
$this->assertNull($storage->load('first')); $this->assertNull($storage->load('first'));
$edit['import'] = "id: first\n" . $edit['import']; $edit['import'] = "id: first\n" . $edit['import'];
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import')); $this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
$this->assertRaw(t('Are you sure you want to create new %name @type?', array('%name' => 'first', '@type' => 'test configuration'))); $this->assertRaw(t('Are you sure you want to create a new %name @type?', array('%name' => 'first', '@type' => 'test configuration')));
$this->drupalPostForm(NULL, array(), t('Confirm')); $this->drupalPostForm(NULL, array(), t('Confirm'));
$entity = $storage->load('first'); $entity = $storage->load('first');
$this->assertIdentical($entity->label(), 'First'); $this->assertIdentical($entity->label(), 'First');
@ -70,7 +70,7 @@ EOD;
// Attempt an import with a custom ID. // Attempt an import with a custom ID.
$edit['custom_entity_id'] = 'custom_id'; $edit['custom_entity_id'] = 'custom_id';
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import')); $this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
$this->assertRaw(t('Are you sure you want to create new %name @type?', array('%name' => 'custom_id', '@type' => 'test configuration'))); $this->assertRaw(t('Are you sure you want to create a new %name @type?', array('%name' => 'custom_id', '@type' => 'test configuration')));
$this->drupalPostForm(NULL, array(), t('Confirm')); $this->drupalPostForm(NULL, array(), t('Confirm'));
$entity = $storage->load('custom_id'); $entity = $storage->load('custom_id');
$this->assertRaw(t('The @entity_type %label was imported.', array('@entity_type' => 'config_test', '%label' => $entity->label()))); $this->assertRaw(t('The @entity_type %label was imported.', array('@entity_type' => 'config_test', '%label' => $entity->label())));
@ -90,7 +90,7 @@ EOD;
$second_uuid = $uuid->generate(); $second_uuid = $uuid->generate();
$edit['import'] .= "\nuuid: " . $second_uuid; $edit['import'] .= "\nuuid: " . $second_uuid;
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import')); $this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
$this->assertRaw(t('Are you sure you want to create new %name @type?', array('%name' => 'second', '@type' => 'test configuration'))); $this->assertRaw(t('Are you sure you want to create a new %name @type?', array('%name' => 'second', '@type' => 'test configuration')));
$this->drupalPostForm(NULL, array(), t('Confirm')); $this->drupalPostForm(NULL, array(), t('Confirm'));
$entity = $storage->load('second'); $entity = $storage->load('second');
$this->assertRaw(t('The @entity_type %label was imported.', array('@entity_type' => 'config_test', '%label' => $entity->label()))); $this->assertRaw(t('The @entity_type %label was imported.', array('@entity_type' => 'config_test', '%label' => $entity->label())));