Commit eeab69b6 authored by gbyte.co's avatar gbyte.co

Fix description text, streamline some code

parent 4859ffa6
......@@ -221,7 +221,7 @@ function simple_sitemap_delete_bundle_config($entity_type_id, $bundle) {
$message = "You may want to <a href='@url'>regenerate</a> your XML sitemap now.";
if ($generator->getSetting('cron_generate')) {
$message .= ' Otherwise the sitemap will be regenerated on the next cron run.';
$message .= ' Otherwise the sitemap will be regenerated during a future cron run.';
}
drupal_set_message(t($message, ['@url' => $GLOBALS['base_url'] . '/admin/config/search/simplesitemap']));
}
......
......@@ -173,7 +173,7 @@ class UrlGeneratorBase {
: $this->languages;
// Entity is not translated.
if (NULL !== $entity && isset($translation_languages['und'])) {
if ($entity instanceof ContentEntityBase && isset($translation_languages['und'])) {
if ($url_object->access($this->anonUser)) {
$url_object->setOption('language', $this->languages[$this->defaultLanguageId]);
$alternate_urls[$this->defaultLanguageId] = $this->replaceBaseUrlWithCustom($url_object->toString());
......
......@@ -203,7 +203,7 @@ class FormHelper {
'#default_value' => FALSE,
];
if ($this->generator->getSetting('cron_generate')) {
$form_fragment['simple_sitemap_regenerate_now']['#description'] .= '</br>' . $this->t('Otherwise the sitemap will be regenerated on the next cron run.');
$form_fragment['simple_sitemap_regenerate_now']['#description'] .= '</br>' . $this->t('Otherwise the sitemap will be regenerated during a future cron run.');
}
}
......
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