From 26c539f7ef8b9d348362a753225d32c1d28ec9dd Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Wed, 10 Jul 2013 22:36:38 +0100 Subject: [PATCH] Issue #1946462 by YesCT: Follow-up to Convert all confirm_form() in content_translation.admin.inc and content_translation.pages.inc to the new form interface. --- .../content_translation/Form/TranslatableForm.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Form/TranslatableForm.php b/core/modules/content_translation/lib/Drupal/content_translation/Form/TranslatableForm.php index 998609ec4884..bdeb983c3ec7 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Form/TranslatableForm.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Form/TranslatableForm.php @@ -42,10 +42,13 @@ class TranslatableForm extends ConfirmFormBase { * {@inheritdoc} */ public function getQuestion() { - $action = $this->fieldInfo['translatable'] ? 'disable' : 'enable'; - return t('Are you sure you want to %action translation for the %name field?', - array('%action' => $action, '%name' => $this->fieldName) - ); + if ($field['translatable']) { + $question = t('Are you sure you want to disable translation for the %name field?', array('%name' => $this->fieldName)); + } + else { + $question = t('Are you sure you want to enable translation for the %name field?', array('%name' => $this->fieldName)); + } + return $question; } /**