'administer content translation',
'translate any entity',
'create content translations',
'administer languages',
'administer content types',
'administer node fields',
]);
$this->
drupalLogin($user);
// Enable translation for article.
$config = ContentLanguageSettings::
loadByEntityTypeBundle('node', 'article'
);
$config->
setDefaultLangcode(LanguageInterface::LANGCODE_SITE_DEFAULT
);
$config->
setLanguageAlterable(TRUE
);
$config->
save();
$content_translation_manager =
$this->container->
get('content_translation.manager'
);
$content_translation_manager->
setEnabled('node', 'article', TRUE
);
$content_translation_manager->
setBundleTranslationSettings('node', 'article',
[ 'untranslatable_fields_hide' => FALSE,
]);
$this->
rebuildContainer();