summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2014-05-04 17:19:57 (GMT)
committerwebchick2014-05-04 17:19:57 (GMT)
commite4ae1523e70e4e7426f73407a6d4c1dafe0d4460 (patch)
tree982bd8ab99c246d768e333dbeacbc85d7f589da7
parentace08794364a570322602c4ba28a246698d0b538 (diff)
Issue #2240463 by robertdbailey, balagan, holly.ross.drupal: Fix text: languages are not "enabled/disabled" anymore, they are added/removed.
-rw-r--r--core/lib/Drupal/Component/Utility/UserAgent.php2
-rw-r--r--core/lib/Drupal/Core/Language/LanguageManagerInterface.php4
-rw-r--r--core/modules/content_translation/content_translation.install4
-rw-r--r--core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php4
-rw-r--r--core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php10
-rw-r--r--core/modules/language/language.module2
-rw-r--r--core/modules/language/lib/Drupal/language/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php6
-rw-r--r--core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php2
-rw-r--r--core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php2
-rw-r--r--core/modules/locale/lib/Drupal/locale/Tests/LocaleExportTest.php2
-rw-r--r--core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php4
-rw-r--r--core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php6
-rw-r--r--core/modules/locale/locale.bulk.inc2
-rw-r--r--core/modules/locale/locale.module2
-rw-r--r--core/modules/node/lib/Drupal/node/NodeListBuilder.php2
-rw-r--r--core/modules/search/lib/Drupal/search/Tests/SearchLanguageTest.php2
-rw-r--r--core/modules/user/lib/Drupal/user/AccountForm.php8
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php2
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php2
-rw-r--r--sites/default/default.settings.php2
20 files changed, 35 insertions, 35 deletions
diff --git a/core/lib/Drupal/Component/Utility/UserAgent.php b/core/lib/Drupal/Component/Utility/UserAgent.php
index d91074b..8b35c75 100644
--- a/core/lib/Drupal/Component/Utility/UserAgent.php
+++ b/core/lib/Drupal/Component/Utility/UserAgent.php
@@ -106,7 +106,7 @@ class UserAgent {
}
}
- // Find the enabled language with the greatest qvalue, following the rules
+ // Find the added language with the greatest qvalue, following the rules
// of RFC 2616 (section 14.4). If several languages have the same qvalue,
// prefer the one with the greatest weight.
$best_match_langcode = FALSE;
diff --git a/core/lib/Drupal/Core/Language/LanguageManagerInterface.php b/core/lib/Drupal/Core/Language/LanguageManagerInterface.php
index da1a079..43b2f23 100644
--- a/core/lib/Drupal/Core/Language/LanguageManagerInterface.php
+++ b/core/lib/Drupal/Core/Language/LanguageManagerInterface.php
@@ -28,10 +28,10 @@ interface LanguageManagerInterface {
public function init();
/**
- * Returns whether or not the site has more than one language enabled.
+ * Returns whether or not the site has more than one language added.
*
* @return bool
- * TRUE if more than one language is enabled, FALSE otherwise.
+ * TRUE if more than one language is added, FALSE otherwise.
*/
public function isMultilingual();
diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install
index b814f2d..f6dda75 100644
--- a/core/modules/content_translation/content_translation.install
+++ b/core/modules/content_translation/content_translation.install
@@ -107,10 +107,10 @@ function content_translation_install() {
* Implements hook_enable().
*/
function content_translation_enable() {
- // Translation works when at least two languages are enabled.
+ // Translation works when at least two languages are added.
if (count(\Drupal::languageManager()->getLanguages()) < 2) {
$t_args = array('!language_url' => url('admin/config/regional/language'));
- $message = t('Be sure to <a href="!language_url">enable at least two languages</a> to translate content.', $t_args);
+ $message = t('Be sure to <a href="!language_url">add at least two languages</a> to translate content.', $t_args);
drupal_set_message($message, 'warning');
}
// Point the user to the content translation settings.
diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php
index 415b116..cec9404 100644
--- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php
+++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php
@@ -38,7 +38,7 @@ abstract class ContentTranslationTestBase extends WebTestBase {
protected $bundle;
/**
- * The enabled languages.
+ * The added languages.
*
* @var array
*/
@@ -96,7 +96,7 @@ abstract class ContentTranslationTestBase extends WebTestBase {
}
/**
- * Enables additional languages.
+ * Adds additional languages.
*/
protected function setupLanguages() {
$this->langcodes = array('it', 'fr');
diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php
index 96bf8b2..4454176 100644
--- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php
+++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php
@@ -130,21 +130,21 @@ abstract class ContentTranslationUITest extends ContentTranslationTestBase {
$entity = entity_load($this->entityTypeId, $this->entityId, TRUE);
// Check that every translation has the correct "outdated" status.
- foreach ($this->langcodes as $enabled_langcode) {
- $prefix = $enabled_langcode != $default_langcode ? $enabled_langcode . '/' : '';
+ foreach ($this->langcodes as $added_langcode) {
+ $prefix = $added_langcode != $default_langcode ? $added_langcode . '/' : '';
$path = $prefix . $edit_path;
$this->drupalGet($path);
- if ($enabled_langcode == $langcode) {
+ if ($added_langcode == $langcode) {
$this->assertFieldByXPath('//input[@name="content_translation[retranslate]"]', FALSE, 'The retranslate flag is not checked by default.');
}
else {
$this->assertFieldByXPath('//input[@name="content_translation[outdated]"]', TRUE, 'The translate flag is checked by default.');
$edit = array('content_translation[outdated]' => FALSE);
- $this->drupalPostForm($path, $edit, $this->getFormSubmitAction($entity, $enabled_langcode));
+ $this->drupalPostForm($path, $edit, $this->getFormSubmitAction($entity, $added_langcode));
$this->drupalGet($path);
$this->assertFieldByXPath('//input[@name="content_translation[retranslate]"]', FALSE, 'The retranslate flag is now shown.');
$entity = entity_load($this->entityTypeId, $this->entityId, TRUE);
- $this->assertFalse($entity->translation[$enabled_langcode]['outdated'], 'The "outdated" status has been correctly stored.');
+ $this->assertFalse($entity->translation[$added_langcode]['outdated'], 'The "outdated" status has been correctly stored.');
}
}
}
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index 845407d..08cd8e0 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -60,7 +60,7 @@ function language_help($path, $arg) {
case 'admin/structure/block/manage/%':
case 'admin/structure/block/add/%/%':
if ($arg[4] == 'language' && $arg[5] == 'language_interface') {
- return '<p>' . t('With multiple languages enabled, registered users can select their preferred language and authors can assign a specific language to content.') . '</p>';
+ return '<p>' . t('With multiple languages added, registered users can select their preferred language and authors can assign a specific language to content.') . '</p>';
}
break;
diff --git a/core/modules/language/lib/Drupal/language/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php b/core/modules/language/lib/Drupal/language/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
index eacb5c4..42a0933 100644
--- a/core/modules/language/lib/Drupal/language/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
+++ b/core/modules/language/lib/Drupal/language/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
@@ -59,7 +59,7 @@ class LanguageNegotiationUrl extends LanguageNegotiationMethodBase implements In
$path_args = explode('/', $request_path);
$prefix = array_shift($path_args);
- // Search prefix within enabled languages.
+ // Search prefix within added languages.
$negotiated_language = FALSE;
foreach ($languages as $language) {
if (isset($config['prefixes'][$language->id]) && $config['prefixes'][$language->id] == $prefix) {
@@ -104,7 +104,7 @@ class LanguageNegotiationUrl extends LanguageNegotiationMethodBase implements In
$parts = explode('/', $path);
$prefix = array_shift($parts);
- // Search prefix within enabled languages.
+ // Search prefix within added languages.
foreach ($this->languageManager->getLanguages() as $language) {
if (isset($config['prefixes'][$language->id]) && $config['prefixes'][$language->id] == $prefix) {
// Rebuild $path with the language removed.
@@ -132,7 +132,7 @@ class LanguageNegotiationUrl extends LanguageNegotiationMethodBase implements In
$language_url = $this->languageManager->getCurrentLanguage(Language::TYPE_URL);
$options['language'] = $language_url;
}
- // We allow only enabled languages here.
+ // We allow only added languages here.
elseif (!is_object($options['language']) || !isset($languages[$options['language']->id])) {
return $path;
}
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
index 273850b..d5abded 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
@@ -126,7 +126,7 @@ class LanguageListTest extends WebTestBase {
$languages = $this->container->get('language_manager')->getLanguages();
// We need raw here because %language and %langcode will add HTML.
$t_args = array('%language' => 'French', '%langcode' => 'fr');
- $this->assertRaw(t('The %language (%langcode) language has been removed.', $t_args), 'Disabled language has been removed.');
+ $this->assertRaw(t('The %language (%langcode) language has been removed.', $t_args), 'The French language has been removed.');
$this->assertEqual($this->getUrl(), url('admin/config/regional/language', array('absolute' => TRUE)), 'Correct page redirection.');
// Verify that language is no longer found.
$this->drupalGet('admin/config/regional/language/delete/fr');
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php
index 169bfcf..1a2e5d6 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageUILanguageNegotiationTest.php
@@ -32,7 +32,7 @@ use Drupal\language\LanguageNegotiatorInterface;
* 2. URL (PATH) > BROWSER > DEFAULT
* admin/config
* UI in user's browser language preference if the site has that
- * language enabled, if not, the default language
+ * language added, if not, the default language
* zh-hans/admin/config
* UI in Chinese
* blah-blah/admin/config
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleExportTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleExportTest.php
index c0ceb05..cf69ddb 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleExportTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleExportTest.php
@@ -50,7 +50,7 @@ class LocaleExportTest extends WebTestBase {
*/
function testExportTranslation() {
// First import some known translations.
- // This will also automatically enable the 'fr' language.
+ // This will also automatically add the 'fr' language.
$name = tempnam('temporary://', "po_") . '.po';
file_put_contents($name, $this->getPoFile());
$this->drupalPostForm('admin/config/regional/translate/import', array(
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
index b1982f6..c8adf97 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
@@ -41,7 +41,7 @@ class LocalePluralFormatTest extends WebTestBase {
*/
function testGetPluralFormat() {
// Import some .po files with formulas to set up the environment.
- // These will also add the languages to the system and enable them.
+ // These will also add the languages to the system.
$this->importPoFile($this->getPoFileWithSimplePlural(), array(
'langcode' => 'fr',
));
@@ -142,7 +142,7 @@ class LocalePluralFormatTest extends WebTestBase {
*/
function testPluralEditExport() {
// Import some .po files with formulas to set up the environment.
- // These will also add the languages to the system and enable them.
+ // These will also add the languages to the system.
$this->importPoFile($this->getPoFileWithSimplePlural(), array(
'langcode' => 'fr',
));
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
index 81a1ac6..268f72f 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
@@ -342,7 +342,7 @@ class LocaleUpdateTest extends LocaleUpdateBase {
}
/**
- * Tests automatic translation import when a langauge is enabled.
+ * Tests automatic translation import when a langauge is added.
*
* When a language is added, the system will check for translations files of
* enabled modules and will import them. When a language is removed the system
@@ -390,7 +390,7 @@ class LocaleUpdateTest extends LocaleUpdateBase {
}
/**
- * Tests automatic translation import when a custom langauge is enabled.
+ * Tests automatic translation import when a custom langauge is added.
*/
function testEnableCustomLanguage() {
// Make the hidden test modules look like a normal custom module.
@@ -402,7 +402,7 @@ class LocaleUpdateTest extends LocaleUpdateBase {
);
$this->drupalPostForm('admin/modules', $edit, t('Save configuration'));
- // Create and enable a custom language with language code 'xx' and a random
+ // Create a custom language with language code 'xx' and a random
// name.
$langcode = 'xx';
$name = $this->randomName(16);
diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc
index f75a23e..06c0887 100644
--- a/core/modules/locale/locale.bulk.inc
+++ b/core/modules/locale/locale.bulk.inc
@@ -45,7 +45,7 @@ function locale_translate_batch_import_files($options, $force = FALSE) {
}
else {
// If langcode was not provided, make sure to only import files for the
- // languages we have enabled.
+ // languages we have added.
$langcodes = array_keys(\Drupal::languageManager()->getLanguages());
}
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index afb4047..039d51a 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -4,7 +4,7 @@
* @file
* Enables the translation of the user interface to languages other than English.
*
- * When enabled, multiple languages can be set up. The site interface can be
+ * When enabled, multiple languages can be added. The site interface can be
* displayed in different languages, and nodes can have languages assigned. The
* setup of languages and translations is completely web based. Gettext portable
* object files are supported.
diff --git a/core/modules/node/lib/Drupal/node/NodeListBuilder.php b/core/modules/node/lib/Drupal/node/NodeListBuilder.php
index 51b2485..fc9c0ba 100644
--- a/core/modules/node/lib/Drupal/node/NodeListBuilder.php
+++ b/core/modules/node/lib/Drupal/node/NodeListBuilder.php
@@ -61,7 +61,7 @@ class NodeListBuilder extends EntityListBuilder {
* {@inheritdoc}
*/
public function buildHeader() {
- // Enable language column and filter if multiple languages are enabled.
+ // Enable language column and filter if multiple languages are added.
$header = array(
'title' => $this->t('Title'),
'type' => array(
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchLanguageTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchLanguageTest.php
index c7b51c8..7cdf0bd 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchLanguageTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchLanguageTest.php
@@ -25,7 +25,7 @@ class SearchLanguageTest extends SearchTestBase {
public static function getInfo() {
return array(
'name' => 'Search language selection',
- 'description' => 'Tests advanced search with different languages enabled.',
+ 'description' => 'Tests advanced search with different languages added.',
'group' => 'Search',
);
}
diff --git a/core/modules/user/lib/Drupal/user/AccountForm.php b/core/modules/user/lib/Drupal/user/AccountForm.php
index f85fca2..f650c07 100644
--- a/core/modules/user/lib/Drupal/user/AccountForm.php
+++ b/core/modules/user/lib/Drupal/user/AccountForm.php
@@ -237,11 +237,11 @@ abstract class AccountForm extends ContentEntityForm {
$user_preferred_admin_langcode = $register ? $language_interface->id : $account->getPreferredAdminLangcode();
- // Is the user preferred language enabled?
- $user_language_enabled = FALSE;
+ // Is the user preferred language added?
+ $user_language_added = FALSE;
if ($this->languageManager instanceof ConfigurableLanguageManagerInterface) {
$negotiator = $this->languageManager->getNegotiator();
- $user_language_enabled = $negotiator && $negotiator->isNegotiationMethodEnabled(LanguageNegotiationUser::METHOD_ID, Language::TYPE_INTERFACE);
+ $user_language_added = $negotiator && $negotiator->isNegotiationMethodEnabled(LanguageNegotiationUser::METHOD_ID, Language::TYPE_INTERFACE);
}
$form['language'] = array(
'#type' => $this->languageManager->isMultilingual() ? 'details' : 'container',
@@ -257,7 +257,7 @@ abstract class AccountForm extends ContentEntityForm {
'#title' => $this->t('Site language'),
'#languages' => Language::STATE_CONFIGURABLE,
'#default_value' => $user_preferred_langcode,
- '#description' => $user_language_enabled ? $this->t("This account's preferred language for e-mails and site presentation.") : $this->t("This account's preferred language for e-mails."),
+ '#description' => $user_language_added ? $this->t("This account's preferred language for e-mails and site presentation.") : $this->t("This account's preferred language for e-mails."),
);
// Only show the account setting for Administration pages language to users
diff --git a/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php b/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php
index becbeaf..869ad88 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php
@@ -33,7 +33,7 @@ class RowEntityRenderersTest extends ViewUnitTestBase {
public static $testViews = array('test_entity_row_renderers');
/**
- * An array of enabled languages.
+ * An array of added languages.
*
* @var array
*/
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php
index 1693888..8e35fbc 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ViewEditTest.php
@@ -101,7 +101,7 @@ class ViewEditTest extends UITestBase {
$langcode_url = 'admin/structure/views/nojs/display/test_view/default/field_langcode';
$this->assertLinkByHref($langcode_url);
$this->assertLink(t("Current user's language"));
- // Click the link and check the form before language is enabled.
+ // Click the link and check the form before language is added.
$this->drupalGet($langcode_url);
$this->assertResponse(200);
$this->assertText(t("You don't have translatable entity types."));
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index b2ce930..9fa9dde 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -491,7 +491,7 @@ $settings['update_free_access'] = FALSE;
* Remove the leading hash signs to enable.
*
* The "en" part of the variable name, is dynamic and can be any langcode of
- * any enabled language. (eg locale_custom_strings_de for german).
+ * any added language. (eg locale_custom_strings_de for german).
*/
# $settings['locale_custom_strings_en'][''] = array(
# 'forum' => 'Discussion board',