diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index b6f8f5e..c9a6af2 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -568,15 +568,27 @@ function content_translation_form_alter(array &$form, array &$form_state) { // elements once we have an official #multilingual FAPI key. $translations = $entity->getTranslationLanguages(); $form_langcode = $form_controller->getFormLangcode($form_state); + $status_translatable = NULL; // Handle fields shared between translations when there is at least one // translation available or a new one is being created. if (!$entity->isNew() && (!isset($translations[$form_langcode]) || count($translations) > 1)) { foreach ($entity->getFieldDefinitions() as $property_name => $definition) { + if ($property_name == 'status') { + // @todo we sure to have a better way through entity keys somehow? + $status_translatable = $definition->isTranslatable(); + } if (isset($form[$property_name])) { $form[$property_name]['#multilingual'] = $definition->isTranslatable(); } } + if (isset($status_translatable)) { + foreach(array('publish', 'unpublish', 'submit') as $button) { + if (isset($form['actions'][$button])) { + $form['actions'][$button]['#value'] .= ' ' . ($status_translatable ? t('(this translation)') : t('(all translations)')); + } + } + } } }