This commit is contained in:
hailin 2025-04-19 11:03:51 +08:00
parent a686d36ddd
commit d53a4e5507
4 changed files with 34 additions and 4 deletions

View File

@ -100,9 +100,6 @@ export const SidebarCreateButtons: FC<SidebarCreateButtonsProps> = ({
}
}
// 获取当前语言
const language = i18n.language;
// 判断需要大写首字母的语言
const needsUpperCaseFirstLetter = (language: string) => {
const languagesRequiringUpperCase = ['en', 'de', 'fr', 'es', 'it']; // 其他需要大写首字母的语言
@ -123,7 +120,7 @@ export const SidebarCreateButtons: FC<SidebarCreateButtonsProps> = ({
<IconPlus className="mr-1" size={20} />
{t('side.sidebarCreateNew')}{" "}
{getCapitalizedContentType(contentType, language)}
{getCapitalizedContentType(t(`contentType.${contentType}`), i18n.language)}
</Button>

View File

@ -146,6 +146,17 @@
"workspaceBeginSettings": "These are the settings your workspace begins with when selected.",
"workspaceInstructionsPlaceholder": "Instructions... (optional)",
"sidebarCreateNew": "New"
},
"contentType": {
"chats": "chats",
"presets": "presets",
"prompts": "prompts",
"files": "files",
"collections": "collections",
"assistants": "assistants",
"tools": "tools",
"models": "models"
}
}

View File

@ -145,6 +145,17 @@
"workspaceBeginSettings": "これらはワークスペースを選択したときに始まる設定です。",
"workspaceInstructionsPlaceholder": "説明...(オプション)",
"sidebarCreateNew": "新規作成"
},
"contentType": {
"chats": "チャット",
"presets": "プリセット",
"prompts": "プロンプト",
"files": "ファイル",
"collections": "コレクション",
"assistants": "アシスタント",
"tools": "ツール",
"models": "モデル"
}
}

View File

@ -145,6 +145,17 @@
"workspaceBeginSettings": "这些是选择此工作区时的初始设置。",
"workspaceInstructionsPlaceholder": "说明...(可选)",
"sidebarCreateNew": "新建"
},
"contentType": {
"chats": "聊天",
"presets": "预设",
"prompts": "提示词",
"files": "文件",
"collections": "集合",
"assistants": "助手",
"tools": "工具",
"models": "模型"
}
}