summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-02-19 09:49:59 (GMT)
committerAlex Pott2015-02-19 09:49:59 (GMT)
commitd8aa1a879922dec1bcfa54d10643fa65887098b5 (patch)
tree1003eaca32fcd1a42f5b7e97af59a28f9a4e02db
parent87ba2da98bc37f71026346104fb73533b9468b72 (diff)
Issue #2422685 by balagan: Language negotiation configuration page titles inconsistent, should not even mention "negotiation"
-rw-r--r--core/modules/language/language.module2
-rw-r--r--core/modules/language/language.routing.yml6
-rw-r--r--core/modules/language/src/Form/NegotiationConfigureForm.php2
-rw-r--r--core/modules/language/src/Form/NegotiationUrlForm.php2
-rw-r--r--core/modules/language/src/Tests/LanguageConfigurationTest.php2
-rw-r--r--core/modules/user/src/Tests/UserLanguageCreationTest.php2
6 files changed, 8 insertions, 8 deletions
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index 5b2099e..45ce7cb 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -63,7 +63,7 @@ function language_help($route_name, RouteMatchInterface $route_match) {
return '<p>' . t('Add a language to be supported by your site. If your desired language is not available, pick <em>Custom language...</em> at the end and provide a language code and other details manually.') . '</p>';
case 'language.negotiation':
- $output = '<p>' . t('Define how to decide which language is used to display page elements (primarily text provided by modules, such as field labels and help text). This decision is made by evaluating a series of detection methods for languages; the first detection method that gets a result will determine which language is used for that type of text. Be aware that some language negotiation methods are unreliable under certain conditions, such as browser detection when page-caching is enabled and a user is not currently logged in. Define the order of evaluation of language detection methods on this page. The default language can be changed in the <a href="!admin-change-language">list of languages</a>.', array('!admin-change-language' => \Drupal::url('entity.configurable_language.collection'))) . '</p>';
+ $output = '<p>' . t('Define how to decide which language is used to display page elements (primarily text provided by modules, such as field labels and help text). This decision is made by evaluating a series of detection methods for languages; the first detection method that gets a result will determine which language is used for that type of text. Be aware that some language detection methods are unreliable under certain conditions, such as browser detection when page-caching is enabled and a user is not currently logged in. Define the order of evaluation of language detection methods on this page. The default language can be changed in the <a href="!admin-change-language">list of languages</a>.', array('!admin-change-language' => \Drupal::url('entity.configurable_language.collection'))) . '</p>';
return $output;
case 'language.negotiation_session':
diff --git a/core/modules/language/language.routing.yml b/core/modules/language/language.routing.yml
index d21941d..84740ee 100644
--- a/core/modules/language/language.routing.yml
+++ b/core/modules/language/language.routing.yml
@@ -2,7 +2,7 @@ language.negotiation_url:
path: '/admin/config/regional/language/detection/url'
defaults:
_form: 'Drupal\language\Form\NegotiationUrlForm'
- _title: 'Configure URL language negotiation'
+ _title: 'URL language detection configuration'
requirements:
_permission: 'administer languages'
@@ -10,7 +10,7 @@ language.negotiation_session:
path: '/admin/config/regional/language/detection/session'
defaults:
_form: 'Drupal\language\Form\NegotiationSessionForm'
- _title: 'Configure session language negotiation'
+ _title: 'Session language detection configuration'
requirements:
_permission: 'administer languages'
@@ -18,7 +18,7 @@ language.negotiation_selected:
path: '/admin/config/regional/language/detection/selected'
defaults:
_form: 'Drupal\language\Form\NegotiationSelectedForm'
- _title: 'Configure selection language negotiation'
+ _title: 'Selected language configuration'
requirements:
_permission: 'administer languages'
diff --git a/core/modules/language/src/Form/NegotiationConfigureForm.php b/core/modules/language/src/Form/NegotiationConfigureForm.php
index 66168c4..5d6cc3b 100644
--- a/core/modules/language/src/Form/NegotiationConfigureForm.php
+++ b/core/modules/language/src/Form/NegotiationConfigureForm.php
@@ -209,7 +209,7 @@ class NegotiationConfigureForm extends ConfigFormBase {
$this->blockManager->clearCachedDefinitions();
$form_state->setRedirect('language.negotiation');
- drupal_set_message($this->t('Language negotiation configuration saved.'));
+ drupal_set_message($this->t('Language detection configuration saved.'));
}
/**
diff --git a/core/modules/language/src/Form/NegotiationUrlForm.php b/core/modules/language/src/Form/NegotiationUrlForm.php
index 2ed158f..49110a3 100644
--- a/core/modules/language/src/Form/NegotiationUrlForm.php
+++ b/core/modules/language/src/Form/NegotiationUrlForm.php
@@ -153,7 +153,7 @@ class NegotiationUrlForm extends ConfigFormBase {
if (!($default_langcode == $langcode) && $form_state->getValue('language_negotiation_url_part') == LanguageNegotiationUrl::CONFIG_PATH_PREFIX) {
// Throw a form error if the prefix is blank for a non-default language,
// although it is required for selected negotiation type.
- $form_state->setErrorByName("prefix][$langcode", $this->t('The prefix may only be left blank for the selected negotiation fallback language.'));
+ $form_state->setErrorByName("prefix][$langcode", $this->t('The prefix may only be left blank for the selected detection fallback language.'));
}
}
elseif (strpos($value, '/') !== FALSE) {
diff --git a/core/modules/language/src/Tests/LanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageConfigurationTest.php
index 15e2eb5..dc522bc 100644
--- a/core/modules/language/src/Tests/LanguageConfigurationTest.php
+++ b/core/modules/language/src/Tests/LanguageConfigurationTest.php
@@ -96,7 +96,7 @@ class LanguageConfigurationTest extends WebTestBase {
'prefix[en]' => '',
);
$this->drupalPostForm(NULL, $edit, t('Save configuration'));
- $this->assertText(t('The prefix may only be left blank for the selected negotiation fallback language.'));
+ $this->assertText(t('The prefix may only be left blank for the selected detection fallback language.'));
// Check that prefix cannot be changed to contain a slash.
$edit = array(
diff --git a/core/modules/user/src/Tests/UserLanguageCreationTest.php b/core/modules/user/src/Tests/UserLanguageCreationTest.php
index fc95906..3b9c5b1 100644
--- a/core/modules/user/src/Tests/UserLanguageCreationTest.php
+++ b/core/modules/user/src/Tests/UserLanguageCreationTest.php
@@ -42,7 +42,7 @@ class UserLanguageCreationTest extends WebTestBase {
'language_interface[enabled][language-url]' => TRUE,
);
$this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
- $this->assertText(t('Language negotiation configuration saved.'), 'Set language negotiation.');
+ $this->assertText(t('Language detection configuration saved.'), 'Set language negotiation.');
// Check if the language selector is available on admin/people/create and
// set to the currently active language.