Commit c6f24511 authored by CeraRose's avatar CeraRose Committed by RenatoG
Browse files

Issue #2989628 by JKerschner, hswong3i, RenatoG: Fix typos throughout module

parent 82d4fecb
......@@ -6,7 +6,7 @@ xmlsitemap.settings:
mapping:
minimum_lifetime:
type: integer
label: 'Minumum lifetime of an xmlsitemap xml file'
label: 'Minimum lifetime of an xmlsitemap xml file'
xsl:
type: integer
label: 'Check XSL functionality'
......
......@@ -457,7 +457,7 @@ abstract class XmlSitemapTestBase extends WebTestBase {
* Format a watchdog message in a one-line summary.
*
* @param string $message
* A watchdog messsage object.
* A watchdog message object.
*
* @return string
* A string containing the watchdog message's timestamp, severity, type,
......
......@@ -646,7 +646,7 @@ function xmlsitemap_get_link_info($type = NULL, $reset = FALSE) {
];
$uri_callback = $entity_type->getUriCallback();
if (empty($uri_callback) || !isset($entity_type->xmlsitemap)) {
// Remove any non URL-able or XML sitemap un-supported entites.
// Remove any non URL-able or XML sitemap un-supported entities.
}
foreach (\Drupal::service('entity_type.bundle.info')->getBundleInfo($entity_type->id()) as $bundle) {
if (!isset($bundle['xmlsitemap'])) {
......@@ -1684,11 +1684,11 @@ function xmlsitemap_entity_update(EntityInterface $entity) {
}
// If so, remove the translations that no longer exist.
if ($languge_differences = array_diff($link_storage_languages, array_keys($translation_languages))) {
if ($language_differences = array_diff($link_storage_languages, array_keys($translation_languages))) {
$link_storage->deleteMultiple([
'type' => $entity->getEntityTypeId(),
'id' => $entity->id(),
'language' => $languge_differences,
'language' => $language_differences,
]);
}
}
......@@ -2558,7 +2558,7 @@ function xmlsitemap_batch_variable_set(array $variables) {
}
/**
* Batch callback; clear sitemap links for entites.
* Batch callback; clear sitemap links for entities.
*
* @param array $entity_type_ids
* Entity types to rebuild.
......
......@@ -83,11 +83,12 @@ class XmlSitemapCustomFunctionalTest extends XmlSitemapTestBase {
$this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', ['@link' => $edit['loc']]));
$this->assertNoSitemapLink(['type' => 'custom', 'loc' => $edit['loc']]);
// Test an unaccessible file .
// Test an inaccessible file.
$edit['loc'] = '/.htaccess';
$this->drupalPostForm('admin/config/search/xmlsitemap/custom/add', $edit, t('Save'));
$this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', ['@link' => $edit['loc']]));
$this->assertNoSitemapLink(['type' => 'custom', 'loc' => $edit['loc']]);
// Test a valid file.
$edit['loc'] = '/core/misc/drupal.js';
$this->drupalPostForm('admin/config/search/xmlsitemap/custom/add', $edit, t('Save'));
......
......@@ -15,4 +15,4 @@ xmlsitemap_engines.settings:
label: 'Url engines'
minimum_lifetime:
type: integer
label: 'Minumum lifetime for sitemaps'
label: 'Minimum lifetime for sitemaps'
......@@ -109,14 +109,14 @@ class XmlSitemapEnginesFunctionalTest extends XmlSitemapTestBase {
$this->assertWatchdogMessage([
'type' => 'xmlsitemap',
'message' => 'Recieved ping for @sitemap.',
'message' => 'Received ping for @sitemap.',
'variables' => [
'@sitemap' => 'http://example.com/sitemap.xml',
],
]);
$this->assertWatchdogMessage([
'type' => 'xmlsitemap',
'message' => 'Recieved ping for @sitemap.',
'message' => 'Received ping for @sitemap.',
'variables' => [
'@sitemap' => 'http://example.com/sitemap-2.xml',
],
......@@ -133,7 +133,7 @@ class XmlSitemapEnginesFunctionalTest extends XmlSitemapTestBase {
$this->submitEngines();
$this->assertWatchdogMessage(['type' => 'xmlsitemap', 'message' => 'Submitted the sitemap to %url and received response @code.']);
$this->assertWatchdogMessage(['type' => 'xmlsitemap', 'message' => 'Recieved ping for @sitemap.']);
$this->assertWatchdogMessage(['type' => 'xmlsitemap', 'message' => 'Received ping for @sitemap.']);
}
/**
......@@ -169,7 +169,7 @@ class XmlSitemapEnginesFunctionalTest extends XmlSitemapTestBase {
]);
$this->assertWatchdogMessage([
'type' => 'xmlsitemap',
'message' => 'Recieved ping for @sitemap.',
'message' => 'Received ping for @sitemap.',
'variables' => [
'@sitemap' => Url::fromRoute('xmlsitemap.sitemap_xml', [], [
'absolute' => TRUE,
......
......@@ -29,7 +29,7 @@ class XmlSitemapEnginesTestController extends ControllerBase {
throw new NotFoundHttpException();
}
else {
\Drupal::logger('xmlsitemap')->debug('Recieved ping for @sitemap.', ['@sitemap' => $query]);
\Drupal::logger('xmlsitemap')->debug('Received ping for @sitemap.', ['@sitemap' => $query]);
}
return new Response('', 200);
}
......
......@@ -180,7 +180,7 @@ function xmlsitemap_engines_get_engine_info($engine = NULL) {
else {
// Fetch the results of all hook_xmlsitemap_engine_info() implementations.
$engines = \Drupal::moduleHandler()->invokeAll('xmlsitemap_engine_info');
// Allow other modulse to alter the engine info.
// Allow other modules to alter the engine info.
\Drupal::moduleHandler()->alter('xmlsitemap_engine_info', $engines);
// Cache by language since engine names are translated.
\Drupal::cache()->set('xmlsitemap:engines:' . $language->getId(), $engines, Cache::PERMANENT, ['xmlsitemap']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment