From ea6470cb75e26128f6d33dfdf0868afa40c1e7b9 Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 14 Nov 2026 15:34:08 +0800 Subject: [PATCH] gui tests: i18n-keys leaves vendored third_party code out 0caa09b3d vendored yaml.v3 under third_party/, and its yamlh.go says "Error type", a key of the usage plugin's i18n.js, so "a plugin's words are its own" went red on main. Vendored code says nothing to magpie's window; the walk now skips third_party like node_modules. Run (mote): node --test internal/gui/tests/i18n-keys.test.cjs: 4 of 4 pass; red before this change at 01c3efc4f (and on origin/main df2b819c6) with 'plugins/usage/i18n.js "Error type": third_party/yaml.v3/yamlh.go says it too'. --- internal/gui/tests/i18n-keys.test.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/gui/tests/i18n-keys.test.cjs b/internal/gui/tests/i18n-keys.test.cjs index 857886ecb..cf5adde38 100644 --- a/internal/gui/tests/i18n-keys.test.cjs +++ b/internal/gui/tests/i18n-keys.test.cjs @@ -45,7 +45,8 @@ test("a plugin's words are its own", () => { for (const e of fs.readdirSync(d, { withFileTypes: true })) { const p = path.join(d, e.name); if (e.isDirectory()) { - if (!["node_modules", ".git", "site", "tests", "testdata", "docs"].includes(e.name)) walk(p); + // third_party is vendored code, which says nothing to the window + if (!["node_modules", ".git", "site", "tests", "testdata", "docs", "third_party"].includes(e.name)) walk(p); } else if (/\.(go|js|html|css)$/.test(e.name) && e.name !== "i18n.js") { let text = fs.readFileSync(p, "utf8"); // a comment line says nothing to the window: Go's "(View routing,