From 105b60a8633fe02fedb09f01fab41c612a4feac4 Mon Sep 17 00:00:00 2001 From: Lauri Eskola <lauri.eskola@acquia.com> Date: Tue, 1 Feb 2022 15:38:19 +0200 Subject: [PATCH] Issue #3232550 by Wim Leers, hooroomoo, xjm, ravi.shankar: Improve messaging about Internet Explorer 11 --- core/modules/ckeditor5/js/ie11.filter.warnings.es6.js | 4 ++-- core/modules/ckeditor5/js/ie11.filter.warnings.js | 4 ++-- core/modules/ckeditor5/js/ie11.user.warnings.es6.js | 6 +++++- core/modules/ckeditor5/js/ie11.user.warnings.js | 4 +++- .../src/FunctionalJavascript/CKEditor5AllowedTagsTest.php | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/core/modules/ckeditor5/js/ie11.filter.warnings.es6.js b/core/modules/ckeditor5/js/ie11.filter.warnings.es6.js index aeee85ed5c11..1e125d985a70 100644 --- a/core/modules/ckeditor5/js/ie11.filter.warnings.es6.js +++ b/core/modules/ckeditor5/js/ie11.filter.warnings.es6.js @@ -38,7 +38,7 @@ const ck5Warning = () => { selectMessages.add( Drupal.t( - 'CKEditor 5 is not compatible with Internet Explorer 11. Text fields using CKEditor 5 will still be editable but without the benefits of CKEditor.', + 'CKEditor 5 is not compatible with Internet Explorer. Text fields using CKEditor 5 will fall back to plain HTML editing without CKEditor for users of Internet Explorer.', ), { type: 'warning', @@ -48,7 +48,7 @@ // https://www.drupal.org/docs/system-requirements/browser-requirements selectMessages.add( Drupal.t( - 'Text editor toolbar settings are not available. They will be available in any <a href="@supported-browsers">supported browser</a> other than Internet Explorer', + 'Text editor toolbar settings are not available in Internet Explorer. They will be available in other <a href="@supported-browsers">supported browsers</a>.', { '@supported-browsers': 'https://www.drupal.org/docs/system-requirements/browser-requirements', diff --git a/core/modules/ckeditor5/js/ie11.filter.warnings.js b/core/modules/ckeditor5/js/ie11.filter.warnings.js index 4b643a633030..6ebf942c81d0 100644 --- a/core/modules/ckeditor5/js/ie11.filter.warnings.js +++ b/core/modules/ckeditor5/js/ie11.filter.warnings.js @@ -19,12 +19,12 @@ const editorSettings = document.querySelector('#editor-settings-wrapper'); const ck5Warning = () => { - selectMessages.add(Drupal.t('CKEditor 5 is not compatible with Internet Explorer 11. Text fields using CKEditor 5 will still be editable but without the benefits of CKEditor.'), { + selectMessages.add(Drupal.t('CKEditor 5 is not compatible with Internet Explorer. Text fields using CKEditor 5 will fall back to plain HTML editing without CKEditor for users of Internet Explorer.'), { type: 'warning' }); if (isIE11) { - selectMessages.add(Drupal.t('Text editor toolbar settings are not available. They will be available in any <a href="@supported-browsers">supported browser</a> other than Internet Explorer', { + selectMessages.add(Drupal.t('Text editor toolbar settings are not available in Internet Explorer. They will be available in other <a href="@supported-browsers">supported browsers</a>.', { '@supported-browsers': 'https://www.drupal.org/docs/system-requirements/browser-requirements' }), { type: 'error' diff --git a/core/modules/ckeditor5/js/ie11.user.warnings.es6.js b/core/modules/ckeditor5/js/ie11.user.warnings.es6.js index 3fe12292cc6a..c28a16a35a94 100644 --- a/core/modules/ckeditor5/js/ie11.user.warnings.es6.js +++ b/core/modules/ckeditor5/js/ie11.user.warnings.es6.js @@ -37,7 +37,11 @@ const editorMessages = new Drupal.Message(editorMessageContainer); editorMessages.add( Drupal.t( - 'Internet Explorer 11 user: a rich text editor is available for this field when used with any other supported browser.', + 'A rich text editor is available for this field when used with <a href="@supported-browsers">supported browsers</a> other than Internet Explorer.', + { + '@supported-browsers': + 'https://www.drupal.org/docs/system-requirements/browser-requirements', + }, ), { type: 'warning', diff --git a/core/modules/ckeditor5/js/ie11.user.warnings.js b/core/modules/ckeditor5/js/ie11.user.warnings.js index e6b4af0d0210..e459fde14888 100644 --- a/core/modules/ckeditor5/js/ie11.user.warnings.js +++ b/core/modules/ckeditor5/js/ie11.user.warnings.js @@ -15,7 +15,9 @@ const editorMessageContainer = document.createElement('div'); element.parentNode.insertBefore(editorMessageContainer, element); const editorMessages = new Drupal.Message(editorMessageContainer); - editorMessages.add(Drupal.t('Internet Explorer 11 user: a rich text editor is available for this field when used with any other supported browser.'), { + editorMessages.add(Drupal.t('A rich text editor is available for this field when used with <a href="@supported-browsers">supported browsers</a> other than Internet Explorer.', { + '@supported-browsers': 'https://www.drupal.org/docs/system-requirements/browser-requirements' + }), { type: 'warning' }); }, diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php index 875c755c62c1..a0b8de84c8ce 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php @@ -410,7 +410,7 @@ public function testMediaElementAllowedTags() { public function testInternetExplorerWarning() { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); - $warning_text = 'CKEditor 5 is not compatible with Internet Explorer 11. Fields using CKEditor 5 will still be editable but without the benefits of CKEditor.'; + $warning_text = 'CKEditor 5 is not compatible with Internet Explorer. Text fields using CKEditor 5 will fall back to plain HTML editing without CKEditor for users of Internet Explorer.'; $this->createNewTextFormat($page, $assert_session); $assert_session->waitForText($warning_text); $page->selectFieldOption('editor[editor]', 'None'); -- GitLab