Unverified Commit 4272c218 authored by alexpott's avatar alexpott

Issue #3156266 by longwave, jungle, siddhant.bhosale, alexpott: Fix 70 spelling mistakes

parent 63bb3cbb
......@@ -294,7 +294,7 @@ via:
description: "Identifies a resource that is the source of the information in the link's context."
reference: '[RFC4287]'
webmention:
description: "Identifies a target URI that supports the Webmention protcol. This allows clients that mention a resource in some form of publishing process to contact that endpoint and inform it that this resource has been mentioned."
description: "Identifies a target URI that supports the Webmention protocol. This allows clients that mention a resource in some form of publishing process to contact that endpoint and inform it that this resource has been mentioned."
reference: '[http://www.w3.org/TR/webmention/]'
notes: "This is a similar \"Linkback\" mechanism to the ones of Refback, Trackback, and Pingback. It uses a different protocol, though, and thus should be discoverable through its own link relation type."
working-copy:
......
......@@ -74,7 +74,7 @@ function _drupal_error_handler_real($error_level, $message, $filename, $line, $c
_drupal_log_error([
'%type' => isset($types[$error_level]) ? $severity_msg : 'Unknown error',
// The standard PHP error handler considers that the error messages
// are HTML. We mimick this behavior here.
// are HTML. We mimic this behavior here.
'@message' => Markup::create(Xss::filterAdmin($message)),
'%function' => $caller['function'],
'%file' => $caller['file'],
......
......@@ -251,7 +251,7 @@ function install_state_defaults() {
// required translation file.
'server_pattern' => 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po',
// Installation tasks can set this to TRUE to force the page request to
// end (even if there is no themable output), in the case of an interactive
// end (even if there is no themeable output), in the case of an interactive
// installation. This is needed only rarely; for example, it would be used
// by an installation task that prints JSON output rather than returning a
// themed page. The most common example of this is during batch processing,
......
......@@ -39,10 +39,9 @@ function drupal_get_schema_versions($module) {
// Narrow this down to functions ending with an integer, since all
// hook_update_N() functions end this way, and there are other
// possible functions which match '_update_'. We use preg_grep() here
// instead of foreaching through all defined functions, since the loop
// through all PHP functions can take significant page execution time
// and this function is called on every administrative page via
// system_requirements().
// since looping through all PHP functions can take significant page
// execution time and this function is called on every administrative page
// via system_requirements().
foreach (preg_grep('/_\d+$/', $functions['user']) as $function) {
// If this function is a module update function, add it to the list of
// module updates.
......
......@@ -9,7 +9,7 @@
*
* Developers should be extra careful if this command and
* \Drupal\Core\Ajax\MessageCommand are included in the same response. By
* default, MessageCommmand will also call Drupal.announce() and announce the
* default, MessageCommand will also call Drupal.announce() and announce the
* message to the screen reader (unless the option to suppress announcements is
* passed to the constructor). Manual testing with a screen reader is strongly
* recommended.
......
......@@ -1424,7 +1424,7 @@ public function hasTranslationChanges() {
$translation = $original->getTranslation($this->activeLangcode);
$langcode = $this->language()->getId();
// The list of fields to skip from the comparision.
// The list of fields to skip from the comparison.
$skip_fields = $this->getFieldsToSkipFromTranslationChangesCheck();
// We also check untranslatable fields, so that a change to those will mark
......
......@@ -368,7 +368,7 @@ protected function getRevisionTranslationMergeSkippedFieldNames() {
$entity_type = $this->getEntityType();
// A list of known revision metadata fields which should be skipped from
// the comparision.
// the comparison.
$field_names = [
$entity_type->getKey('revision'),
$entity_type->getKey('revision_translation_affected'),
......
......@@ -23,7 +23,7 @@ protected function getFieldsToSkipFromTranslationChangesCheck(ContentEntityInter
$entity_type = $entity->getEntityType();
// A list of known revision metadata fields which should be skipped from
// the comparision.
// the comparison.
$fields = [
$entity_type->getKey('revision'),
$entity_type->getKey('revision_translation_affected'),
......
......@@ -139,7 +139,7 @@ public static function createFromString($dependency) {
* Prevents unnecessary serialization of constraint objects.
*
* @return array
* The properties to seriailize.
* The properties to serialize.
*/
public function __sleep() {
return ['name', 'project', 'constraintString'];
......
......@@ -1225,7 +1225,7 @@
let $newContent = $($.parseHTML(response.data, document, true));
// For backward compatibility, in some cases a wrapper will be added. This
// behavior will be removed before Drupal 9.0.0. If different behavior is
// needed, the theme functions can be overriden.
// needed, the theme functions can be overridden.
// @see https://www.drupal.org/node/2940704
$newContent = Drupal.theme(
'ajaxWrapperNewContent',
......
......@@ -80,7 +80,7 @@
* Message type, can be either 'status', 'error' or 'warning'.
* @param {string} [options.announce]
* Screen-reader version of the message if necessary. To prevent a message
* being sent to Drupal.announce() this should be an emptry string.
* being sent to Drupal.announce() this should be an empty string.
* @param {string} [options.priority]
* Priority of the message for Drupal.announce().
*
......
......@@ -203,7 +203,7 @@ public function testOffCanvasStyles() {
$assert_session->assertWaitOnAjaxRequest();
// Check the background color of two CKEditor elements to confirm they are
// not overriden by the off-canvas css reset.
// not overridden by the off-canvas css reset.
$assert_session->elementExists('css', '.cke_top');
$ckeditor_top_bg_color = $this->getSession()->evaluateScript('window.getComputedStyle(document.getElementsByClassName(\'cke_top\')[0]).backgroundColor');
$this->assertEqual($ckeditor_top_bg_color, 'rgb(248, 248, 248)');
......
......@@ -66,7 +66,7 @@ public function setUp(): void {
* Tests the moderated content page.
*/
public function testModeratedContentPage() {
$assert_sesison = $this->assertSession();
$assert_session = $this->assertSession();
$this->drupalLogin($this->adminUser);
// Use an explicit changed time to ensure the expected order in the content
......@@ -103,15 +103,15 @@ public function testModeratedContentPage() {
// Verify view, edit, and delete links for any content.
$this->drupalGet('admin/content/moderated');
$assert_sesison->statusCodeEquals(200);
$assert_session->statusCodeEquals(200);
// Check that nodes with pending revisions appear in the view.
$node_type_labels = $this->xpath('//td[contains(@class, "views-field-type")]');
$delta = 0;
foreach ($nodes as $node) {
$assert_sesison->linkByHrefExists('node/' . $node->id());
$assert_sesison->linkByHrefExists('node/' . $node->id() . '/edit');
$assert_sesison->linkByHrefExists('node/' . $node->id() . '/delete');
$assert_session->linkByHrefExists('node/' . $node->id());
$assert_session->linkByHrefExists('node/' . $node->id() . '/edit');
$assert_session->linkByHrefExists('node/' . $node->id() . '/delete');
// Verify that we can see the content type label.
$this->assertEquals($node->type->entity->label(), trim($node_type_labels[$delta]->getText()));
$delta++;
......@@ -120,30 +120,30 @@ public function testModeratedContentPage() {
// Check that nodes that are not moderated or do not have a pending revision
// do not appear in the view.
foreach ($excluded_nodes as $node) {
$assert_sesison->linkByHrefNotExists('node/' . $node->id());
$assert_session->linkByHrefNotExists('node/' . $node->id());
}
// Check that the latest revision is displayed.
$assert_sesison->pageTextContains('first article - draft');
$assert_sesison->pageTextNotContains('first article - published');
$assert_session->pageTextContains('first article - draft');
$assert_session->pageTextNotContains('first article - published');
// Verify filtering by moderation state.
$this->drupalGet('admin/content/moderated', ['query' => ['moderation_state' => 'editorial-draft']]);
$assert_sesison->linkByHrefExists('node/' . $nodes['published_then_draft_article']->id() . '/edit');
$assert_sesison->linkByHrefExists('node/' . $nodes['draft_article']->id() . '/edit');
$assert_sesison->linkByHrefExists('node/' . $nodes['draft_page_1']->id() . '/edit');
$assert_sesison->linkByHrefExists('node/' . $nodes['draft_page_1']->id() . '/edit');
$assert_sesison->linkByHrefNotExists('node/' . $nodes['published_then_archived_article']->id() . '/edit');
$assert_session->linkByHrefExists('node/' . $nodes['published_then_draft_article']->id() . '/edit');
$assert_session->linkByHrefExists('node/' . $nodes['draft_article']->id() . '/edit');
$assert_session->linkByHrefExists('node/' . $nodes['draft_page_1']->id() . '/edit');
$assert_session->linkByHrefExists('node/' . $nodes['draft_page_1']->id() . '/edit');
$assert_session->linkByHrefNotExists('node/' . $nodes['published_then_archived_article']->id() . '/edit');
// Verify filtering by moderation state and content type.
$this->drupalGet('admin/content/moderated', ['query' => ['moderation_state' => 'editorial-draft', 'type' => 'page']]);
$assert_sesison->linkByHrefExists('node/' . $nodes['draft_page_1']->id() . '/edit');
$assert_sesison->linkByHrefExists('node/' . $nodes['draft_page_2']->id() . '/edit');
$assert_sesison->linkByHrefNotExists('node/' . $nodes['published_then_draft_article']->id() . '/edit');
$assert_sesison->linkByHrefNotExists('node/' . $nodes['published_then_archived_article']->id() . '/edit');
$assert_sesison->linkByHrefNotExists('node/' . $nodes['draft_article']->id() . '/edit');
$assert_session->linkByHrefExists('node/' . $nodes['draft_page_1']->id() . '/edit');
$assert_session->linkByHrefExists('node/' . $nodes['draft_page_2']->id() . '/edit');
$assert_session->linkByHrefNotExists('node/' . $nodes['published_then_draft_article']->id() . '/edit');
$assert_session->linkByHrefNotExists('node/' . $nodes['published_then_archived_article']->id() . '/edit');
$assert_session->linkByHrefNotExists('node/' . $nodes['draft_article']->id() . '/edit');
}
/**
......
......@@ -224,7 +224,7 @@ public function testWorkflowChanges($view_id) {
}
/**
* Execute a view and asssert the expected results.
* Execute a view and assert the expected results.
*
* @param \Drupal\views\ViewEntityInterface $view_entity
* A view configuration entity.
......
......@@ -6,7 +6,7 @@
use Drupal\workflows\WorkflowInterface;
/**
* Trait ContentModerationTestTraint.
* Trait ContentModerationTestTrait.
*/
trait ContentModerationTestTrait {
......
......@@ -98,7 +98,7 @@ public function testFieldSynchronizationWithDisabledBundle() {
}
/**
* Tests that bundle translation settings are propegated on creation.
* Tests that bundle translation settings are propagated on creation.
*
* @throws \Drupal\Core\Entity\EntityStorageException
*/
......@@ -110,7 +110,7 @@ public function testBundleClearOnLanguageContentSettingInsert() {
}
/**
* Tests that bundle translation setting changes are propegated.
* Tests that bundle translation setting changes are propagated.
*
* @throws \Drupal\Core\Entity\EntityStorageException
* @throws \Exception
......
......@@ -110,7 +110,7 @@ public function testFormatterUI() {
$field_test_settings = $page->find('css', 'input[name="field_test_settings_edit"]');
$weight_toggle = $page->find('css', '.tabledrag-toggle-weight');
// Assert the format typr field is visible and contains the expected
// Assert the format type field is visible and contains the expected
// formatter.
$this->assertTrue($field_test_format_type->isVisible());
$this->assertEquals($format, $field_test_format_type->getValue());
......
......@@ -2,7 +2,7 @@
filter_settings.filter_test_restrict_tags_and_attributes:
type: filter
label: 'Filter to restirct HTML tags and attributes'
label: 'Filter to restrict HTML tags and attributes'
mapping:
restrictions:
type: mapping
......
......@@ -97,7 +97,7 @@ public function testTransform($value, $expected_value, $invalid_id = NULL, $skip
* Provides filter ids for testing transformations.
*
* @return array
* Formatted as $source_id, $tranformed_id, $invalid_id.
* Formatted as $source_id, $transformed_id, $invalid_id.
* When $invalid_id is provided the transformation should fail with the
* supplied id.
*/
......
......@@ -48,7 +48,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#options' => array_combine($options, $options),
'#description' => $this->t('Default number of forum topics displayed per page.'),
];
$forder = [
$order = [
1 => $this->t('Date - newest first'),
2 => $this->t('Date - oldest first'),
3 => $this->t('Posts - most active first'),
......@@ -58,7 +58,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#type' => 'radios',
'#title' => $this->t('Default order'),
'#default_value' => $config->get('topics.order'),
'#options' => $forder,
'#options' => $order,
'#description' => $this->t('Default display order for topics.'),
];
......
......@@ -134,7 +134,7 @@ public static function getReservedQueryParameters() {
* A custom query parameter name to validate.
*
* @return bool
* Whether the given query parameter is in compliane with the JSON:API
* Whether the given query parameter is in compliance with the JSON:API
* specification.
*
* @see http://jsonapi.org/format/#query-parameters
......
......@@ -35,7 +35,7 @@ class EntryPointTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
/**
* Test GETing the entry point.
* Test GET to the entry point.
*/
public function testEntryPoint() {
$request_options = [];
......
......@@ -1279,7 +1279,7 @@ protected function getExpectedCollectionResponse(array $collection, $self_link,
}
/**
* Tests GETing related resource of an individual resource.
* Tests GET of the related resource of an individual resource.
*
* Expected responses are built by making requests to 'relationship' routes.
* Using the fetched resource identifiers, if any, all targeted resources are
......@@ -2135,7 +2135,7 @@ public function testPatchIndividual() {
// DX: 415 when no Content-Type request header.
$response = $this->request('PATCH', $url, $request_options);
$this->assertsame(415, $response->getStatusCode());
$this->assertSame(415, $response->getStatusCode());
$request_options[RequestOptions::HEADERS]['Content-Type'] = 'application/vnd.api+json';
......
......@@ -45,7 +45,7 @@ public function testCreateFromQueryParameter($input, $expected) {
}
/**
* Provides a suite of shortcut sort paramaters and their expected expansions.
* Provides a suite of shortcut sort parameters and their expected expansions.
*/
public function parameterProvider() {
return [
......
......@@ -88,7 +88,7 @@ display:
exclude: false
alter:
alter_text: true
text: "Formated: {{ field_link }}<br />\nRaw uri: {{ field_link__uri }}<br />\nRaw title: {{ field_link__title }}<br />\nRaw options: {{ field_link__options }}."
text: "Formatted: {{ field_link }}<br />\nRaw uri: {{ field_link__uri }}<br />\nRaw title: {{ field_link__title }}<br />\nRaw options: {{ field_link__options }}."
make_link: false
path: '{{ field_link__uri }}'
absolute: false
......
......@@ -86,7 +86,7 @@ public function testLinkViewsTokens() {
foreach ($uris as $uri => $title) {
// Formatted link: {{ field_link }}<br />
$this->assertRaw("Formated: <a href=\"$uri\" class=\"test-link-class\">$title</a>");
$this->assertRaw("Formatted: <a href=\"$uri\" class=\"test-link-class\">$title</a>");
// Raw uri: {{ field_link__uri }}<br />
$this->assertRaw("Raw uri: $uri");
......
......@@ -71,7 +71,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#title' => $this->t('Source string (@language)', ['@language' => $this->t('Built-in English')]),
'#title_display' => 'invisible',
'#plain_text' => $source_array[0],
'#preffix' => '<span lang="en">',
'#prefix' => '<span lang="en">',
'#suffix' => '</span>',
];
}
......@@ -89,7 +89,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#type' => 'item',
'#title' => $this->t('Plural form'),
'#plain_text' => $source_array[1],
'#preffix' => '<span lang="en">',
'#prefix' => '<span lang="en">',
'#suffix' => '</span>',
];
$form['strings'][$string->lid]['original'] = [
......
......@@ -2,7 +2,7 @@
locale_test.no_translation:
type: config_object
label: 'No traslation settings'
label: 'No translation settings'
mapping:
test:
type: string
......
......@@ -155,7 +155,7 @@ public function testDisplayConfiguration() {
* @param string $url
* The canonical URL of the media asset to test.
* @param string $resource_url
* The oEmebd resource URL of the media asset to test.
* The oEmbed resource URL of the media asset to test.
* @param mixed $formatter_settings
* Settings for the oEmbed field formatter.
* @param array $selectors
......
......@@ -218,7 +218,7 @@ public function testErrorMessages() {
// There's a second kind of error message that comes from the back end
// that happens when the media uuid can't be converted to a media preview.
// In this case, the error will appear in a the themable
// In this case, the error will appear in a the themeable
// media-embed-error.html template. We have a hook altering the css
// classes to test the twi template is working properly and picking up our
// extra class.
......
......@@ -6,7 +6,7 @@
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - menu: The menu of availble media types to choose from.
* - menu: The menu of available media types to choose from.
* - content: The form to add new media items, followed by the grid or table of
* existing media items to choose from.
*
......
......@@ -278,7 +278,7 @@ public function testAllowedMediaTypes() {
'all_media_types' => [],
'only_image' => ['image' => 'image'],
'only_arrakis' => ['arrakis' => 'arrakis'],
'both_items_chedked' => [
'both_items_checked' => [
'image' => 'image',
'arrakis' => 'arrakis',
],
......
......@@ -15,7 +15,7 @@
use Drupal\Tests\UnitTestCase;
/**
* Base test class forentity migration destination functionality.
* Base test class for entity migration destination functionality.
*/
class EntityTestBase extends UnitTestCase {
......
......@@ -213,7 +213,7 @@ class MigrationState {
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* Module handler.
* @param \Drupal\Core\Messenger\MessengerInterface $messenger
* Messenger sevice.
* Messenger service.
* @param \Drupal\Core\StringTranslation\TranslationInterface $stringTranslation
* String translation service.
*/
......
......@@ -86,8 +86,8 @@ public function testDefaultEncoderHasSerializer() {
// The serializer should be set on the Drupal encoder, which should then
// set it on our default encoder.
$encoder = new XmlEncoder();
$serialzer = new Serializer([new GetSetMethodNormalizer()]);
$encoder->setSerializer($serialzer);
$serializer = new Serializer([new GetSetMethodNormalizer()]);
$encoder->setSerializer($serializer);
$base_encoder = $encoder->getBaseEncoder();
$this->assertInstanceOf(BaseXmlEncoder::class, $base_encoder);
// Test the encoder.
......
......@@ -393,7 +393,7 @@ public function testDenormalizeWithTypeWithIncorrectUuid() {
/**
* @covers ::denormalize
*/
public function testDenormalizeWithEmtpyUuid() {
public function testDenormalizeWithEmptyUuid() {
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('If provided "target_uuid" cannot be empty for field "test_type".');
......
......@@ -487,7 +487,7 @@ system.batch_page.json:
_admin_route: TRUE
# Note: This route just exists for generating URLs, the dedicated
# frontcontroller is used if the URL is accessed.
# front controller is used if the URL is accessed.
system.db_update:
path: '/update.php/{op}'
defaults:
......
......@@ -8,7 +8,7 @@
* - text: The text shown on counter.
* - severity: The severity of the counter.
*
* @ingroup themable
* @ingroup themeable
*/
#}
<span class="system-status-counter__status-icon system-status-counter__status-icon--{{ severity }}"></span>
......
......@@ -12,7 +12,7 @@
* - description: The description for current status of cron.
* - cron.run_cron: An array to render a button for running cron.
* - database_system: The status of database system:
* - value: The current status of database sytem.
* - value: The current status of database system.
* - description: The description for current status of cron.
* - database_system_version: The info about current database version:
* - value: The current version of database.
......
......@@ -10,7 +10,7 @@
* Defines the test entity class.
*
* @ContentEntityType(
* id = "entity_test_mulrev_chnged_revlog",
* id = "entity_test_mulrev_changed_rev",
* label = @Translation("Test entity - revisions log and data table"),
* base_table = "entity_test_mulrev_changed_revlog",
* revision_table = "entity_test_mulrev_changed_revlog_revision",
......
......@@ -108,7 +108,7 @@ form_test.validate_without_csrf_token:
requirements:
_access: 'TRUE'
form_test.validate_with_error_suppresion:
form_test.validate_with_error_suppression:
path: '/form-test/limit-validation-errors'
defaults:
_form: '\Drupal\form_test\Form\FormTestLimitValidationErrorsForm'
......
......@@ -52,7 +52,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
if (!$form_state->isValueEmpty('redirection')) {
if (!$form_state->isValueEmpty('destination')) {
// The destination is a random URL, so we can't use routed URLs.
// @todo Revist this in https://www.drupal.org/node/2418219.
// @todo Revisit this in https://www.drupal.org/node/2418219.
$form_state->setRedirectUrl(Url::fromUserInput('/' . $form_state->getValue('destination')));
}
}
......
......@@ -114,7 +114,7 @@ public function testTimezoneFormat() {
$this->assertEqual($date->format('Y/m/d H:i:s e'), '1972/10/11 12:25:21 UTC', 'Date has default UTC time zone and correct date/time.');
// Verify that the format method can override the time zone.
$this->assertEqual($date->format('Y/m/d H:i:s e', ['timezone' => 'America/New_York']), '1972/10/11 08:25:21 America/New_York', 'Date displayed overidden time zone and correct date/time');
$this->assertEqual($date->format('Y/m/d H:i:s e', ['timezone' => 'America/New_York']), '1972/10/11 08:25:21 America/New_York', 'Date displayed overridden time zone and correct date/time');
// Verify that the date format method still displays the default time zone
// for the date object.
......
......@@ -231,7 +231,7 @@ public function testEnteringDateTimeViaSelectors() {
'field_dt[0][value][minute]' => '30',
];
$this->drupalPostForm('node/add/page_with_date', $edit, t('Save'));
$this->assertText(t('Selected combination of day and month is not valid.'), 'Inorrect date failed validation');
$this->assertText(t('Selected combination of day and month is not valid.'), 'Incorrect date failed validation');
$edit['field_dt[0][value][day]'] = '29';
$this->drupalPostForm('node/add/page_with_date', $edit, t('Save'));
......
......@@ -62,7 +62,8 @@ public function testNoButtonInfoInPost() {
// Ensure submitting a form with buttons of different types results in the
// triggering element being set to the first button, regardless of type. For
// the FAPI 'button' type, this should result in the submit handler not
// executing. The types are 's'(ubmit), 'b'(utton), and 'i'(mage_button).
// executing. The types are 's' (submit), 'b' (button), and 'i'
// (image_button).
$this->drupalGet($path . '/s/b/i');
$this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
$assert_session->pageTextContains('The clicked button is button1.');
......
......@@ -56,7 +56,7 @@ public function testFormSettingsSubmissionHandler($theme) {
$assert_session->waitForButton('custom_logo_remove_button');
// Assert the new file is uploaded as temporary. This file should not be
// saved as permanent if settings are not submited.
// saved as permanent if settings are not submitted.
$image_field = $this->xpath('//input[@name="custom_logo[fids]"]')[0];
$file = File::load($image_field->getValue());
$this->assertFalse($file->isPermanent());
......
......@@ -45,7 +45,7 @@ public function providerTemplatePreprocessUpdateReport() {
'$variables with data not set' => [
[],
],
'$variables with data as an interger' => [
'$variables with data as an integer' => [
['data' => 4],
],
'$variables with data as a string' => [
......
......@@ -158,7 +158,7 @@ public function testAuthenticateWithCorrectPassword() {
->with($this->password, $this->testUser->getPassword())
->will($this->returnValue(TRUE));
$this->assertsame(1, $this->userAuth->authenticate($this->username, $this->password));
$this->assertSame(1, $this->userAuth->