diff --git a/core/modules/locale/tests/locale_test.js b/core/modules/locale/tests/locale_test.js deleted file mode 100644 index 86acc4a13c..0000000000 --- a/core/modules/locale/tests/locale_test.js +++ /dev/null @@ -1,38 +0,0 @@ -/** -* DO NOT EDIT THIS FILE. -* See the following change record for more information, -* https://www.drupal.org/node/2815083 -* @preserve -**/ - -Drupal.t("Standard Call t"); -Drupal.t("Whitespace Call t"); - -Drupal.t('Single Quote t'); -Drupal.t('Single Quote \'Escaped\' t'); -Drupal.t('Single Quote ' + 'Concat ' + 'strings ' + 't'); - -Drupal.t("Double Quote t"); -Drupal.t("Double Quote \"Escaped\" t"); -Drupal.t("Double Quote " + "Concat " + "strings " + "t"); - -Drupal.t("Context Unquoted t", {}, { context: "Context string unquoted" }); -Drupal.t("Context Single Quoted t", {}, { 'context': "Context string single quoted" }); -Drupal.t("Context Double Quoted t", {}, { "context": "Context string double quoted" }); - -Drupal.t("Context !key Args t", { '!key': 'value' }, { context: "Context string" }); - -Drupal.formatPlural(1, "Standard Call plural", "Standard Call @count plural"); -Drupal.formatPlural(1, "Whitespace Call plural", "Whitespace Call @count plural"); - -Drupal.formatPlural(1, 'Single Quote plural', 'Single Quote @count plural'); -Drupal.formatPlural(1, 'Single Quote \'Escaped\' plural', 'Single Quote \'Escaped\' @count plural'); - -Drupal.formatPlural(1, "Double Quote plural", "Double Quote @count plural"); -Drupal.formatPlural(1, "Double Quote \"Escaped\" plural", "Double Quote \"Escaped\" @count plural"); - -Drupal.formatPlural(1, "Context Unquoted plural", "Context Unquoted @count plural", {}, { context: "Context string unquoted" }); -Drupal.formatPlural(1, "Context Single Quoted plural", "Context Single Quoted @count plural", {}, { 'context': "Context string single quoted" }); -Drupal.formatPlural(1, "Context Double Quoted plural", "Context Double Quoted @count plural", {}, { "context": "Context string double quoted" }); - -Drupal.formatPlural(1, "Context !key Args plural", "Context !key Args @count plural", { '!key': 'value' }, { context: "Context string" }); \ No newline at end of file diff --git a/core/modules/locale/tests/locale_test.es6.js b/core/modules/locale/tests/locale_test.js.fake similarity index 90% rename from core/modules/locale/tests/locale_test.es6.js rename to core/modules/locale/tests/locale_test.js.fake index ba62b7504e..e93e6d2cea 100644 --- a/core/modules/locale/tests/locale_test.es6.js +++ b/core/modules/locale/tests/locale_test.js.fake @@ -2,7 +2,10 @@ * @file * JavaScript for locale_test.module. * - * @ignore + * @preserve + * The Locale module parses the strings in JavaScript files with a simple regex. + * We need to keep this non-ES6 original file for testing purposes. There is no + * ES6 version available. */ Drupal.t("Standard Call t"); diff --git a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php index bbb825832b..f96a37bde5 100644 --- a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php @@ -21,7 +21,7 @@ class LocaleJavascriptTranslationTest extends BrowserTestBase { public static $modules = ['locale', 'locale_test']; public function testFileParsing() { - $filename = __DIR__ . '/../../locale_test.js'; + $filename = __DIR__ . '/../../locale_test.js.fake'; // Parse the file to look for source strings. _locale_parse_js_file($filename);