mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 19:30:17 +08:00
feat(i18n): add Simplified Chinese and German language support
Add 'zh-cn' and 'de-de' to language map and log system prompt for debugging
This commit is contained in:
parent
74eb3141cd
commit
e1aa223e5d
@ -27,6 +27,7 @@ const openai = new OpenAI({
|
||||
})
|
||||
|
||||
const languageMap = {
|
||||
'zh-cn': 'Simplified Chinese',
|
||||
'en-us': 'English',
|
||||
'ja-jp': 'Japanese',
|
||||
'ru-ru': 'Russian',
|
||||
@ -34,7 +35,8 @@ const languageMap = {
|
||||
'el-gr': 'Greek',
|
||||
'es-es': 'Spanish',
|
||||
'fr-fr': 'French',
|
||||
'pt-pt': 'Portuguese'
|
||||
'pt-pt': 'Portuguese',
|
||||
'de-de': 'German'
|
||||
}
|
||||
|
||||
const PROMPT = `
|
||||
@ -137,6 +139,8 @@ const main = async () => {
|
||||
}
|
||||
const systemPrompt = PROMPT.replace('{{target_language}}', languageMap[filename])
|
||||
|
||||
console.info('System Prompt: ', systemPrompt)
|
||||
|
||||
const result = await translateRecursively(targetJson, systemPrompt)
|
||||
count += 1
|
||||
bar.update(count)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user