X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_translation%2Fcontent_translation.install;h=bc948e1a3aea5a75f1c8a0baebb3060f33b81cd4;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=455d5ed3d8529341feb8ddbdaafab8d12e1f2f56;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website
diff --git a/web/core/modules/content_translation/content_translation.install b/web/core/modules/content_translation/content_translation.install
index 455d5ed3d..bc948e1a3 100644
--- a/web/core/modules/content_translation/content_translation.install
+++ b/web/core/modules/content_translation/content_translation.install
@@ -20,17 +20,17 @@ function content_translation_install() {
// Translation works when at least two languages are added.
if (count(\Drupal::languageManager()->getLanguages()) < 2) {
$t_args = [
- ':language_url' => Url::fromRoute('entity.configurable_language.collection')->toString()
+ ':language_url' => Url::fromRoute('entity.configurable_language.collection')->toString(),
];
$message = t('This site has only a single language enabled. Add at least one more language in order to translate content.', $t_args);
- drupal_set_message($message, 'warning');
+ \Drupal::messenger()->addWarning($message);
}
// Point the user to the content translation settings.
$t_args = [
- ':settings_url' => Url::fromRoute('language.content_settings_page')->toString()
+ ':settings_url' => Url::fromRoute('language.content_settings_page')->toString(),
];
$message = t('Enable translation for content types, taxonomy vocabularies, accounts, or any other element you wish to translate.', $t_args);
- drupal_set_message($message, 'warning');
+ \Drupal::messenger()->addWarning($message);
}
/**
@@ -59,6 +59,7 @@ function content_translation_update_8400() {
$entity_type_manager = \Drupal::entityTypeManager();
$entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager();
+ $entity_type_manager->clearCachedDefinitions();
foreach ($content_translation_manager->getSupportedEntityTypes() as $entity_type_id => $entity_type_definition) {
$storage = $entity_type_manager->getStorage($entity_type_id);
if ($storage instanceof SqlEntityStorageInterface) {