diff --git a/core/modules/node/node.js b/core/modules/node/node.js index e54a4d4..56b1972 100644 --- a/core/modules/node/node.js +++ b/core/modules/node/node.js @@ -44,18 +44,20 @@ Drupal.behaviors.nodeFieldsetSummaries = { }); $context.find('fieldset.node-translation-options').drupalSetSummary(function (context) { - var translate; - var $checkbox = $context.find('.form-item-translation-translate input'); + var $checkbox_translate = $context.find('.form-item-translation-translate input'); + var translate_vals = []; - if ($checkbox.size()) { - translate = $checkbox.is(':checked') ? Drupal.t('Needs to be updated') : Drupal.t('Does not need to be updated'); + if ($checkbox_translate.size()) { + translate_vals.push($checkbox_translate.is(':checked') ? Drupal.t('Needs to be updated') : Drupal.t('Does not need to be updated')); } - else { - $checkbox = $context.find('.form-item-translation-retranslate input'); - translate = $checkbox.is(':checked') ? Drupal.t('Flag other translations as outdated') : Drupal.t('Do not flag other translations as outdated'); + + var $checkbox_retranslate = $context.find('.form-item-translation-retranslate input'); + + if ($checkbox_retranslate.size()) { + translate_vals.unshift($checkbox_retranslate.is(':checked') ? Drupal.t('Flag other translations as outdated') : Drupal.t('Do not flag other translations as outdated')); } - return translate; + return translate_vals.join(', '); }); } }; diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php index 5489245..d7af2e9 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php @@ -211,8 +211,16 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac '#access' => $this->getTranslationAccess($entity, $form_langcode), ); - $translate = !$new_translation && $entity->retranslate[$form_langcode]; - if (!$translate) { + if (!$new_translation) { + $form['translation']['translate'] = array( + '#type' => 'checkbox', + '#title' => t('This translation needs to be updated'), + '#default_value' => $entity->retranslate[$form_langcode], + '#description' => t('When this option is checked, this translation needs to be updated. Uncheck when the translation is up to date again.'), + ); + } + + if ($new_translation || !$entity->retranslate[$form_langcode]) { $form['translation']['retranslate'] = array( '#type' => 'checkbox', '#title' => t('Flag other translations as outdated'), @@ -220,14 +228,6 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac '#description' => t('If you made a significant change, which means the other translations should be updated, you can flag all other translations of this content as outdated. This will not change any other property of them, like whether they are published or not.'), ); } - else { - $form['translation']['translate'] = array( - '#type' => 'checkbox', - '#title' => t('This translation needs to be updated'), - '#default_value' => $translate, - '#description' => t('When this option is checked, this translation needs to be updated. Uncheck when the translation is up to date again.'), - ); - } } // Process the submitted values before they are stored. diff --git a/core/modules/translation_entity/translation_entity.module b/core/modules/translation_entity/translation_entity.module index 13e4105..0f3cff6 100644 --- a/core/modules/translation_entity/translation_entity.module +++ b/core/modules/translation_entity/translation_entity.module @@ -29,7 +29,7 @@ function translation_entity_help($path, $arg) { $output .= '
' . t('After enabling translation you can create a new content of the configured type or edit existing content and assign it a language. Once this is done you will see a Translations tab or link that will give you access to an overview of the translation status for the current content. From there you can add translations and edit or delete existing translations. This process is similar for every translatable element on your site, such as taxonomy terms, comments or user accounts.') . '

'; $output .= '

' . t('The source language can be changed. If you enable more than two languages and you create at least one content translation, when creating subsequent translations you will be able to choose which language to translate from through the Source language selector. If you choose a different language from the default one, all the translation form elements will be repopulated with the values from the specified source.') . '

'; $output .= '
' . t('Maintaining translations') . '
'; - $output .= '
' . t('If editing content in one language requires that translated versions also be updated to reflect the change, use the Flag other translations as outdated check box to mark the translations as outdated and in need of revision.') . '
'; + $output .= '
' . t('If editing content in one language requires that translated versions also be updated to reflect the change, use the Flag other translations as outdated check box to mark the translations as outdated and in need of revision. Individual translations may also be marked for revision by selecting the This translation needs to be updated check box on the translation editing form.') . '
'; $output .= '
' . t('Translation permissions') . '
'; $output .= '
' . t('Enabling the Entity Translation module makes a basic set of permissions available. Additional permissions are made available after translation is enabled for each type of content.', array('@permissions' => url('admin/people/permissions#module-translation_entity'))) . '
'; $output .= '';