Commit d8aa1a87 authored by alexpott's avatar alexpott

Issue #2422685 by balagan: Language negotiation configuration page titles...

Issue #2422685 by balagan: Language negotiation configuration page titles inconsistent, should not even mention "negotiation"
parent 87ba2da9
......@@ -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':
......
......@@ -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'
......
......@@ -209,7 +209,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$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.'));
}
/**
......
......@@ -153,7 +153,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
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) {
......
......@@ -96,7 +96,7 @@ function testLanguageConfiguration() {
'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(
......
......@@ -42,7 +42,7 @@ function testLocalUserCreation() {
'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.
......
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