diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php index e1966b7..fb78979 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php @@ -262,7 +262,8 @@ protected function getEditValues($values, $langcode, $new = FALSE) { * Name of the button to hit. */ protected function getFormSubmitAction(EntityInterface $entity, $langcode = NULL) { - return t('Save'); + $translatable = ($field = $entity->getFieldDefinition('status')) && $field->isTranslatable(); + return t('Save') . ' ' . ($translatable ? t('(this translation)') : t('(all translations)')); } /** diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php index bce6dbe..b3bbd77 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php @@ -106,10 +106,10 @@ protected function getFormSubmitAction(EntityInterface $entity, $langcode = NULL $translatable = ($field = $entity->getFieldDefinition('status')) && $field->isTranslatable(); if ($entity->isPublished()) { - return $translatable ? t('Save and unpublish (this translation)') : t('Save and unpublish (all translations)'); + return t('Save and unpublish') . ' ' . ($translatable ? t('(this translation)') : t('(all translations)')); } else { - return $translatable ? t('Save and keep unpublished (this translation)') : t('Save and keep unpublished (all translations)'); + return t('Save and keep unpublished') . ' ' . ($translatable ? t('(this translation)') : t('(all translations)')); } } @@ -123,8 +123,8 @@ protected function doTestPublishedStatus() { $translatable = ($field = $entity->getFieldDefinition('status')) && $field->isTranslatable(); $actions = array( - $translatable ? t('Save and publish (this translation)') : t('Save and publish (all translations)'), - $translatable ? t('Save and unpublish (this translation)') : t('Save and unpublish (all translations)'), + t('Save and publish') . ' ' . ($translatable ? t('(this translation)') : t('(all translations)')), + t('Save and unpublish') . ' ' . ($translatable ? t('(this translation)') : t('(all translations)')), ); foreach ($actions as $index => $action) { diff --git a/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php b/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php index 0653743..a76440a 100644 --- a/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php +++ b/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php @@ -79,6 +79,7 @@ function setUp() { function testAliasTranslation() { $english_node = $this->drupalCreateNode(array('type' => 'page', 'langcode' => 'en')); $english_alias = $this->randomName(); + $translatable = ($field = $english_node->getFieldDefinition('status')) && $field->isTranslatable(); // Edit the node to set language and path. $edit = array(); @@ -98,7 +99,7 @@ function testAliasTranslation() { $edit['body[0][value]'] = $this->randomName(); $french_alias = $this->randomName(); $edit['path[alias]'] = $french_alias; - $this->drupalPostForm(NULL, $edit, t('Save')); + $this->drupalPostForm(NULL, $edit, t('Save') . ' ' . ($translatable ? t('(this translation)') : t('(all translations)'))); // Clear the path lookup cache. $this->container->get('path.alias_manager')->cacheClear();