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.

8.0.x
Nathaniel Catchpole 2013-07-10 22:36:38 +01:00
parent a2e041920e
commit 26c539f7ef
1 changed files with 7 additions and 4 deletions

View File

@ -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;
}
/**