From d2c7fa34945272aae500f90536aa9fdffdc35e7e Mon Sep 17 00:00:00 2001 From: RonGamzu <37371774+RonGamzu@users.noreply.github.com> Date: Tue, 26 May 2026 19:21:51 +0300 Subject: [PATCH] fix: use consistent spelling in script_unknown_attribute warning (#18281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The `script_unknown_attribute` warning message used American English (`Unrecognized`) while every other user-facing error/warning in the compiler uses British English (`Unrecognised`): - `options_unrecognised` error: `Unrecognised compiler option…` - `unknown_code` warning: `is not a recognised code` This change updates `script_unknown_attribute` to match, then regenerates `warnings.js` and the reference documentation from the source message file via `node scripts/process-messages`. ## Test plan - Spelling change is isolated to the `script_unknown_attribute` warning message - `warnings.js` and generated docs were updated by running `node scripts/process-messages` - All three occurrences (source, generated JS, generated docs) are consistent --- .../docs/98-reference/.generated/compile-warnings.md | 2 +- packages/svelte/messages/compile-warnings/template.md | 2 +- packages/svelte/src/compiler/warnings.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/docs/98-reference/.generated/compile-warnings.md b/documentation/docs/98-reference/.generated/compile-warnings.md index fb53c644cf..f372a010a5 100644 --- a/documentation/docs/98-reference/.generated/compile-warnings.md +++ b/documentation/docs/98-reference/.generated/compile-warnings.md @@ -842,7 +842,7 @@ Reassignments of module-level declarations will not cause reactive statements to ### script_unknown_attribute ``` -Unrecognized attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it +Unrecognised attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it ``` ### slot_element_deprecated diff --git a/packages/svelte/messages/compile-warnings/template.md b/packages/svelte/messages/compile-warnings/template.md index 3650e07b47..f1e32a6d18 100644 --- a/packages/svelte/messages/compile-warnings/template.md +++ b/packages/svelte/messages/compile-warnings/template.md @@ -107,7 +107,7 @@ This code will work when the component is rendered on the client (which is why t ## script_unknown_attribute -> Unrecognized attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it +> Unrecognised attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it ## slot_element_deprecated diff --git a/packages/svelte/src/compiler/warnings.js b/packages/svelte/src/compiler/warnings.js index c7d660a617..98f407671d 100644 --- a/packages/svelte/src/compiler/warnings.js +++ b/packages/svelte/src/compiler/warnings.js @@ -804,11 +804,11 @@ export function script_context_deprecated(node) { } /** - * Unrecognized attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it + * Unrecognised attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it * @param {null | NodeLike} node */ export function script_unknown_attribute(node) { - w(node, 'script_unknown_attribute', `Unrecognized attribute — should be one of \`generics\`, \`lang\` or \`module\`. If this exists for a preprocessor, ensure that the preprocessor removes it\nhttps://svelte.dev/e/script_unknown_attribute`); + w(node, 'script_unknown_attribute', `Unrecognised attribute — should be one of \`generics\`, \`lang\` or \`module\`. If this exists for a preprocessor, ensure that the preprocessor removes it\nhttps://svelte.dev/e/script_unknown_attribute`); } /**