From 8cd43bec723211b00f41f436626c4fdd33305aad Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sat, 8 Feb 2025 11:03:20 +0800 Subject: [PATCH] add Chinese translations for "follow" and "stop generating"; log translation misses only for non-English --- src/translate/index.tsx | 4 +++- src/translate/zh_CN.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/translate/index.tsx b/src/translate/index.tsx index 654578a..dd3f73f 100644 --- a/src/translate/index.tsx +++ b/src/translate/index.tsx @@ -50,7 +50,9 @@ function tr(text: string, langCode: "en-US" | "zh-CN") { const translatedText = langMap[text.toLowerCase()]; if (translatedText === undefined) { - console.log(`[Translation] not found for "${text}"`); + if (langCode !== "en-US") { + console.log(`[Translation] not found for "${text}"`); + } return text; } diff --git a/src/translate/zh_CN.ts b/src/translate/zh_CN.ts index ac446e4..fe5bb0f 100644 --- a/src/translate/zh_CN.ts +++ b/src/translate/zh_CN.ts @@ -142,6 +142,8 @@ const LANG_MAP: Record = { "New Chat": "新对话", "Delete Chat": "删除对话", "removed from context": "已从上下文中移除", + follow: "跟随", + "stop generating": "停止生成", }; export default LANG_MAP;