feat(i18n): 将前端用户可见中文硬编码改为四语言

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
sophieandCursor committed 2026-07-30 14:39:16 +08:00
1 parent dce915ea30
commit ac7b53a523
105 files changed
+2928 -647

No files matched your search

@@ -58,7 +58,9 @@ export const getDocumentDisplayDescription = (doc: KbDocumentItem, t: KbTranslat
return text || getDocumentDisplayTitle(doc, t);
};
/** 将后端重复文档错误归一为前端可展示的简短文案 */
/** 将后端重复文档错误归一为前端可展示的简短文案。
* [NLU] includes() 匹配后端中文错误原文,刻意保留;返回值走 i18n。
*/
export const normalizeDuplicateDocumentError = (message: string | null | undefined, t: KbTranslateFn) => {
const text = String(message || '').trim();
if (!text) return t('kbWorkspace.errors.apiRequestFailed');