diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 658050d..dddfe2a 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -508,12 +508,14 @@ public function getProvider() { * entity row language types. Note that these are only supported for * display options, not substituted in queries. * @param array|null $current_values - * The list of current values if available so we add them to the list. + * The currently-selected options in the list, if available. * * @return array * An array of language names, keyed by the language code. Negotiated and * special languages have special codes that are substituted in queries by * PluginBase::queryLanguageSubstitutions(). + * Only configurable languages and languages that are in $current_values are + * included in the list. */ protected function listLanguages($flags = LanguageInterface::STATE_ALL, array $current_values = NULL) { $manager = \Drupal::languageManager(); @@ -526,7 +528,8 @@ protected function listLanguages($flags = LanguageInterface::STATE_ALL, array $c $list['***LANGUAGE_entity_default***'] = $this->t('Original language of content in view row'); } - // STATE_SITE_DEFAULT comes in with ID set to LanguageInterface::LANGCODE_SITE_DEFAULT. + // STATE_SITE_DEFAULT comes in with ID set + // to LanguageInterface::LANGCODE_SITE_DEFAULT. // Since this is not a real language, surround it by '***LANGUAGE_...***', // like the negotiated languages below. if ($flags & LanguageInterface::STATE_SITE_DEFAULT) { diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 621e6c5..4e6b7a7 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -2610,7 +2610,7 @@ public function getExtenders() { protected function buildRenderingLanguageOptions() { // @todo Consider making these plugins. See https://drupal.org/node/2173811. // Pass the current rendering language (in this case a one element array) so - // is not lost when there is language configuration changes. + // is not lost when there are language configuration changes. return $this->listLanguages(LanguageInterface::STATE_CONFIGURABLE | LanguageInterface::STATE_SITE_DEFAULT | PluginBase::INCLUDE_NEGOTIATED | PluginBase::INCLUDE_ENTITY, array($this->getOption('rendering_language'))); } diff --git a/core/modules/views/src/Plugin/views/filter/LanguageFilter.php b/core/modules/views/src/Plugin/views/filter/LanguageFilter.php index acf59e7..9396d0d 100644 --- a/core/modules/views/src/Plugin/views/filter/LanguageFilter.php +++ b/core/modules/views/src/Plugin/views/filter/LanguageFilter.php @@ -66,7 +66,7 @@ public function getValueOptions() { if (!isset($this->valueOptions)) { $this->valueTitle = $this->t('Language'); // Pass the current values so options that are already selected do not get - // lost when there is changes in the language configuration. + // lost when there are changes in the language configuration. $this->valueOptions = $this->listLanguages(LanguageInterface::STATE_ALL | LanguageInterface::STATE_SITE_DEFAULT | PluginBase::INCLUDE_NEGOTIATED, array_keys($this->value)); } }