X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_translation%2Fcontent_translation.install;h=bc948e1a3aea5a75f1c8a0baebb3060f33b81cd4;hb=9424afc6c1f518c301bf87a23c047d1873435d05;hp=0e47270092177f48ca36b5d15e0084c064c9fcce;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/content_translation/content_translation.install b/web/core/modules/content_translation/content_translation.install index 0e4727009..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); } /**