@@ -18,7 +18,7 @@ function simple_sitemap_requirements($phase) {
$requirements['simple_sitemap_php_extensions']=[
'title'=>t('Simple XML sitemap PHP extensions'),
'value'=>t('Missing PHP xmlwriter extension'),
'description'=>t("In order to be able to generate sitemaps, the Simple XML sitemap module requires the <em>xmlwriter</em> PHP extension to be enabled."),
'description'=>t('In order to be able to generate sitemaps, the Simple XML sitemap module requires the <em>xmlwriter</em> PHP extension to be enabled.'),
'severity'=>REQUIREMENT_ERROR,
];
}
...
...
@@ -34,8 +34,8 @@ function simple_sitemap_requirements($phase) {
if(!$generated_ago){
$value=t('Not available');
$description=t($cron_generation
?"Run cron, or <a href='@generate'>generate</a> the sitemap manually."
:"Generation on cron run is disabled. <a href='@generate'>Generate</a> the sitemap manually.",[
?'Run cron, or <a href="@generate">generate</a> the sitemap manually.'
:'Generation on cron run is disabled. <a href="@generate">Generate</a> the sitemap manually.',[
0=>$this->getEntityCategory()==='instance'?$this->t('Do not index this @bundle entity',['@bundle'=>$bundle_name]):$this->t('Do not index entities of this type'),
1=>$this->getEntityCategory()==='instance'?$this->t('Index this @bundle entity',['@bundle'=>$bundle_name]):$this->t('Index entities of this type'),
0=>$this->getEntityCategory()==='instance'
?$this->t('Do not index this @bundle entity',['@bundle'=>$bundle_name])
:$this->t('Do not index entities of this type'),
1=>$this->getEntityCategory()==='instance'
?$this->t('Index this @bundle entity',['@bundle'=>$bundle_name])
?$this->t('The frequency with which this @bundle entity changes. Search engine bots may take this as an indication of how often to index it.',['@bundle'=>$bundle_name])
:$this->t('The frequency with which entities of this type change. Search engine bots may take this as an indication of how often to index them.'),
'#description'=>$this->t("Please specify drupal internal (relative) paths, one per line. Do not forget to prepend the paths with a '/'.<br/>Optionally link priority <em>(0.0 - 1.0)</em> can be added by appending it after a space.<br/> Optionally link change frequency <em>(always / hourly / daily / weekly / monthly / yearly / never)</em> can be added by appending it after a space.<br/><br/><strong>Examples:</strong><br/><em>/ 1.0 daily</em> -> home page with the highest priority and daily change frequency<br/><em>/contact</em> -> contact page with the default priority and no change frequency information"),
'#description'=>$this->t('Please specify drupal internal (relative) paths, one per line. Do not forget to prepend the paths with a \'/\'.<br/>Optionally link priority <em>(0.0 - 1.0)</em> can be added by appending it after a space.<br/> Optionally link change frequency <em>(always / hourly / daily / weekly / monthly / yearly / never)</em> can be added by appending it after a space.<br/><br/><strong>Examples:</strong><br/><em>/ 1.0 daily</em> -> home page with the highest priority and daily change frequency<br/><em>/contact</em> -> contact page with the default priority and no change frequency information'),
$form_state->setErrorByName('',$this->t("<strong>Line @line</strong>: The priority setting <em>@priority</em> for path <em>@path</em> is incorrect. Set the priority from 0.0 to 1.0.",$placeholders));
$form_state->setErrorByName('',$this->t('<strong>Line @line</strong>: The priority setting <em>@priority</em> for path <em>@path</em> is incorrect. Set the priority from 0.0 to 1.0.',$placeholders));
$form_state->setErrorByName('',$this->t("<strong>Line @line</strong>: The changefreq setting <em>@changefreq</em> for path <em>@path</em> is incorrect. The following are the correct values: <em>@changefreq_options</em>.",$placeholders));
$form_state->setErrorByName('',$this->t('<strong>Line @line</strong>: The changefreq setting <em>@changefreq</em> for path <em>@path</em> is incorrect. The following are the correct values: <em>@changefreq_options</em>.',$placeholders));
@@ -27,7 +27,7 @@ class SimplesitemapEntitiesForm extends SimplesitemapFormBase {
$form['simple_sitemap_entities']['entities']=[
'#title'=>$this->t('Sitemap entities'),
'#type'=>'fieldset',
'#markup'=>'<p>'.$this->t("Simple XML sitemap settings will be added only to entity forms of entity types enabled here. For all entity types featuring bundles (e.g. <em>node</em>) sitemap settings have to be set on their bundle pages (e.g. <em>page</em>).").'</p>',
'#markup'=>'<p>'.$this->t('Simple XML sitemap settings will be added only to entity forms of entity types enabled here. For all entity types featuring bundles (e.g. <em>node</em>) sitemap settings have to be set on their bundle pages (e.g. <em>page</em>).').'</p>',
.$this->t("<strong>Warning:</strong> This entity type's sitemap settings including per-entity overrides will be deleted after hitting <em>Save</em>.")
."</div>";
='<div id="warning-'.$css_entity_type_id.'">'
.$this->t('<strong>Warning:</strong> This entity type\'s sitemap settings including per-entity overrides will be deleted after hitting <em>Save</em>.')
@@ -86,7 +86,7 @@ abstract class SimplesitemapFormBase extends ConfigFormBase {
*
*/
protectedfunctiongetDonationText(){
return"<div class='description'>".$this->t("If you would like to say thanks and support the development of this module, a <a target='_blank' href='@url'>donation</a> is always appreciated.",['@url'=>'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5AFYRSBLGSC3W'])."</div>";
return'<div class="description">'.$this->t('If you would like to say thanks and support the development of this module, a <a target="_blank" href="@url">donation</a> is always appreciated.',['@url'=>'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5AFYRSBLGSC3W']).'</div>';
@@ -102,7 +102,7 @@ class SimplesitemapSettingsForm extends SimplesitemapFormBase {
'#type'=>'number',
'#title'=>$this->t('Maximum links in a sitemap'),
'#min'=>1,
'#description'=>$this->t("The maximum number of links one sitemap can hold. If more links are generated than set here, a sitemap index will be created and the links split into several sub-sitemaps.<br/>50 000 links is the maximum Google will parse per sitemap, however it is advisable to set this to a lower number. If left blank, all links will be shown on a single sitemap."),
'#description'=>$this->t('The maximum number of links one sitemap can hold. If more links are generated than set here, a sitemap index will be created and the links split into several sub-sitemaps.<br/>50 000 links is the maximum Google will parse per sitemap, however it is advisable to set this to a lower number. If left blank, all links will be shown on a single sitemap.'),
@@ -110,7 +110,7 @@ class SimplesitemapSettingsForm extends SimplesitemapFormBase {
'#type'=>'number',
'#title'=>$this->t('Refresh batch every n links'),
'#min'=>1,
'#description'=>$this->t("During sitemap generation, the batch process will issue a page refresh after n links processed to prevent PHP timeouts and memory exhaustion.<br/>Increasing this number will reduce the number of times Drupal has to bootstrap (thus speeding up the generation process), but will require more memory and less strict PHP timeout settings."),
'#description'=>$this->t('During sitemap generation, the batch process will issue a page refresh after n links processed to prevent PHP timeouts and memory exhaustion.<br/>Increasing this number will reduce the number of times Drupal has to bootstrap (thus speeding up the generation process), but will require more memory and less strict PHP timeout settings.'),
@@ -25,7 +25,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*/
classCustomUrlGeneratorextendsUrlGeneratorBase{
constPATH_DOES_NOT_EXIST_OR_NO_ACCESS_MESSAGE="The custom path @path has been omitted from the XML sitemap as it either does not exist, or it is not accessible to anonymous users. You can review custom paths <a href='@custom_paths_url'>here</a>.";
constPATH_DOES_NOT_EXIST_OR_NO_ACCESS_MESSAGE='The custom path @path has been omitted from the XML sitemap as it either does not exist, or it is not accessible to anonymous users. You can review custom paths <a href="@custom_paths_url">here</a>.';
/**
...
...
@@ -61,8 +61,7 @@ class CustomUrlGenerator extends UrlGeneratorBase {