diff --git a/core/modules/translation_entity/translation_entity.module b/core/modules/translation_entity/translation_entity.module index 620aeca..aa278a0 100644 --- a/core/modules/translation_entity/translation_entity.module +++ b/core/modules/translation_entity/translation_entity.module @@ -756,12 +756,12 @@ function translation_entity_language_configuration_element_validate($element, ar $values = $form_state['values'][$key]; if (language_is_locked($values['langcode']) && $values['language_hidden'] && $values['translation_entity']) { foreach (language_list(LANGUAGE_LOCKED) as $language) { - $locked_languages[] = $language->name; + $locked_languages[$language->langcode] = $language->name; } // @todo Set the correct form element name as soon as the element parents // are correctly set. We should be using NestedArray::getValue() but for // now we cannot. - form_set_error('', t('Translation is not supported if the default language is one of: @locked_languages and the "Hide language selection" option is checked.', array('@locked_languages' => implode(", ", $locked_languages)))); + form_set_error('', t('"Hide language selection" is not compatible with translating content that has language: %choice.

Either do not hide the language selection or pick a specific language.', array('%choice' => $locked_languages[$values['langcode']]))); } }