Skip to content

Commit

Permalink
add Chinese translations for "follow" and "stop generating"; log tran…
Browse files Browse the repository at this point in the history
…slation misses only for non-English
  • Loading branch information
heimoshuiyu committed Feb 8, 2025
1 parent ed5f561 commit 8cd43be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/translate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions src/translate/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ const LANG_MAP: Record<string, string> = {
"New Chat": "新对话",
"Delete Chat": "删除对话",
"removed from context": "已从上下文中移除",
follow: "跟随",
"stop generating": "停止生成",
};

export default LANG_MAP;

0 comments on commit 8cd43be

Please sign in to comment.