From 696cfc9e350e7a167672a32cd3c3c34a5ca29434 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Sat, 10 Oct 2026 18:39:43 +0000 Subject: [PATCH] fix(ci): exclude shared translation modules from locale checks --- web/scripts/check-i18n.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/scripts/check-i18n.mjs b/web/scripts/check-i18n.mjs index fd426046a..514750725 100755 --- a/web/scripts/check-i18n.mjs +++ b/web/scripts/check-i18n.mjs @@ -88,7 +88,11 @@ function extractKeys(filePath) { } function main() { - const files = readdirSync(LOCALES_DIR).filter((f) => f.endsWith('.ts')); + // Shared translation modules (for example bot-setup.ts) are not locales. + // Match language-region and language-script filenames used by the app. + const files = readdirSync(LOCALES_DIR).filter((f) => + /^[a-z]{2,3}-(?:[A-Z]{2}|[A-Z][a-z]{3})\.ts$/.test(f), + ); if (!files.includes(REFERENCE)) { console.error(`Reference file ${REFERENCE} not found in ${LOCALES_DIR}`);