From 08e683eeb4a0441d51e57a6a233559290a04ae33 Mon Sep 17 00:00:00 2001 From: Caldalis Date: Tue, 25 Aug 2026 19:46:09 +0800 Subject: [PATCH] fix(i18n): skip regex fragments in the translation check --- frontend-enterprise/scripts/check-i18n.cjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend-enterprise/scripts/check-i18n.cjs b/frontend-enterprise/scripts/check-i18n.cjs index 2579cd255..0f0b4c456 100644 --- a/frontend-enterprise/scripts/check-i18n.cjs +++ b/frontend-enterprise/scripts/check-i18n.cjs @@ -8,7 +8,10 @@ const catalog = require(path.join(sourceRoot, 'i18n', 'en.json')); const ignoredFiles = new Set([ path.join(sourceRoot, 'components', 'LanguageSwitcher.tsx'), ]); -const ignoredFragments = ["after:content-['展开']"]; +const ignoredFragments = [ + "after:content-['展开']", + '(?:参考来源|参考资料|引用来源|资料来源)', +]; const missing = new Map(); function sourceFiles(directory) {