diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module index e121f0413200..30ceee8b0e78 100644 --- a/core/modules/translation/translation.module +++ b/core/modules/translation/translation.module @@ -532,7 +532,7 @@ function translation_language_switch_links_alter(array &$links, $type, $path) { else { // No translation in this language, or no permission to view. unset($links[$langcode]['href']); - $links[$langcode]['attributes']['class'] = 'locale-untranslated'; + $links[$langcode]['attributes']['class'][] = 'locale-untranslated'; } } } diff --git a/core/modules/translation/translation.test b/core/modules/translation/translation.test index dd00734151b1..cebe9a551b2b 100644 --- a/core/modules/translation/translation.test +++ b/core/modules/translation/translation.test @@ -436,7 +436,7 @@ class TranslationTestCase extends DrupalWebTestCase { $xpath = '//div[contains(@class, :type)]//a[@href=:url]'; } else { - $xpath = '//div[contains(@class, :type)]//span[@class="locale-untranslated"]'; + $xpath = '//div[contains(@class, :type)]//span[contains(@class, "locale-untranslated")]'; } $found = $this->findContentByXPath($xpath, array(':type' => $type, ':url' => $url), $translation_language->name);