mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 04:31:27 +08:00
feat: support germen (#10879)
* feat: support germen
* format code
* translate
* update trans
* format
* add de
---------
Co-authored-by: Payne Fu <payne@Paynes-MBP.rcoffice.ringcentral.com>
(cherry picked from commit 4063c20505)
This commit is contained in:
parent
a9a16ceb3e
commit
9e65eae81a
@ -9,6 +9,7 @@ electronLanguages:
|
||||
- zh_CN # for macOS
|
||||
- zh_TW # for macOS
|
||||
- en # for macOS
|
||||
- de
|
||||
directories:
|
||||
buildResources: build
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ import EnUs from '../../renderer/src/i18n/locales/en-us.json'
|
||||
import ZhCn from '../../renderer/src/i18n/locales/zh-cn.json'
|
||||
import ZhTw from '../../renderer/src/i18n/locales/zh-tw.json'
|
||||
// Machine translation
|
||||
import deDE from '../../renderer/src/i18n/translate/de-de.json'
|
||||
import elGR from '../../renderer/src/i18n/translate/el-gr.json'
|
||||
import esES from '../../renderer/src/i18n/translate/es-es.json'
|
||||
import frFR from '../../renderer/src/i18n/translate/fr-fr.json'
|
||||
@ -16,6 +17,7 @@ const locales = Object.fromEntries(
|
||||
['zh-TW', ZhTw],
|
||||
['ja-JP', JaJP],
|
||||
['ru-RU', RuRu],
|
||||
['de-DE', deDE],
|
||||
['el-GR', elGR],
|
||||
['es-ES', esES],
|
||||
['fr-FR', frFR],
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { useSettings } from '@renderer/hooks/useSettings'
|
||||
import { LanguageVarious } from '@renderer/types'
|
||||
import { ConfigProvider, theme } from 'antd'
|
||||
import deDE from 'antd/locale/de_DE'
|
||||
import elGR from 'antd/locale/el_GR'
|
||||
import enUS from 'antd/locale/en_US'
|
||||
import esES from 'antd/locale/es_ES'
|
||||
@ -126,6 +127,8 @@ function getAntdLocale(language: LanguageVarious) {
|
||||
return zhTW
|
||||
case 'en-US':
|
||||
return enUS
|
||||
case 'de-DE':
|
||||
return deDE
|
||||
case 'ru-RU':
|
||||
return ruRU
|
||||
case 'ja-JP':
|
||||
|
||||
@ -7,7 +7,7 @@ interface UseSmoothStreamOptions {
|
||||
initialText?: string
|
||||
}
|
||||
|
||||
const languages = ['en-US', 'es-ES', 'zh-CN', 'zh-TW', 'ja-JP', 'ru-RU', 'el-GR', 'fr-FR', 'pt-PT']
|
||||
const languages = ['en-US', 'de-DE', 'es-ES', 'zh-CN', 'zh-TW', 'ja-JP', 'ru-RU', 'el-GR', 'fr-FR', 'pt-PT']
|
||||
const segmenter = new Intl.Segmenter(languages)
|
||||
|
||||
export const useSmoothStream = ({ onUpdate, streamDone, minDelay = 10, initialText = '' }: UseSmoothStreamOptions) => {
|
||||
|
||||
@ -8,6 +8,7 @@ import enUS from './locales/en-us.json'
|
||||
import zhCN from './locales/zh-cn.json'
|
||||
import zhTW from './locales/zh-tw.json'
|
||||
// Machine translation
|
||||
import deDE from './translate/de-de.json'
|
||||
import elGR from './translate/el-gr.json'
|
||||
import esES from './translate/es-es.json'
|
||||
import frFR from './translate/fr-fr.json'
|
||||
@ -24,6 +25,7 @@ const resources = Object.fromEntries(
|
||||
['ru-RU', ruRU],
|
||||
['zh-CN', zhCN],
|
||||
['zh-TW', zhTW],
|
||||
['de-DE', deDE],
|
||||
['el-GR', elGR],
|
||||
['es-ES', esES],
|
||||
['fr-FR', frFR],
|
||||
|
||||
4656
src/renderer/src/i18n/translate/de-de.json
Normal file
4656
src/renderer/src/i18n/translate/de-de.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
export type GroupTranslations = {
|
||||
[key: string]: {
|
||||
'el-GR': string
|
||||
'de-DE': string
|
||||
'en-US': string
|
||||
'es-ES': string
|
||||
'fr-FR': string
|
||||
@ -15,6 +16,7 @@ export type GroupTranslations = {
|
||||
export const groupTranslations: GroupTranslations = {
|
||||
我的: {
|
||||
'el-GR': 'Τα δικά μου',
|
||||
'de-DE': 'Meine Agenten',
|
||||
'en-US': 'My Agents',
|
||||
'es-ES': 'Mis agentes',
|
||||
'fr-FR': 'Mes agents',
|
||||
@ -26,6 +28,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
职业: {
|
||||
'el-GR': 'Επαγγελμα',
|
||||
'de-DE': 'Karriere',
|
||||
'en-US': 'Career',
|
||||
'es-ES': 'Profesional',
|
||||
'fr-FR': 'Professionnel',
|
||||
@ -37,6 +40,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
商业: {
|
||||
'el-GR': 'Εμπορικός',
|
||||
'de-DE': 'Geschäft',
|
||||
'en-US': 'Business',
|
||||
'es-ES': 'Negocio',
|
||||
'fr-FR': 'Commercial',
|
||||
@ -48,6 +52,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
工具: {
|
||||
'el-GR': 'Εργαλεία',
|
||||
'de-DE': 'Werkzeuge',
|
||||
'en-US': 'Tools',
|
||||
'es-ES': 'Herramientas',
|
||||
'fr-FR': 'Outils',
|
||||
@ -59,6 +64,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
语言: {
|
||||
'el-GR': 'Γλώσσα',
|
||||
'de-DE': 'Sprache',
|
||||
'en-US': 'Language',
|
||||
'es-ES': 'Idioma',
|
||||
'fr-FR': 'Langue',
|
||||
@ -70,6 +76,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
办公: {
|
||||
'el-GR': 'Γραφείο',
|
||||
'de-DE': 'Büro',
|
||||
'en-US': 'Office',
|
||||
'es-ES': 'Oficina',
|
||||
'fr-FR': 'Bureau',
|
||||
@ -81,6 +88,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
通用: {
|
||||
'el-GR': 'Γενικά',
|
||||
'de-DE': 'Allgemein',
|
||||
'en-US': 'General',
|
||||
'es-ES': 'General',
|
||||
'fr-FR': 'Général',
|
||||
@ -92,6 +100,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
写作: {
|
||||
'el-GR': 'Γράφημα',
|
||||
'de-DE': 'Schreiben',
|
||||
'en-US': 'Writing',
|
||||
'es-ES': 'Escritura',
|
||||
'fr-FR': 'Écriture',
|
||||
@ -103,6 +112,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
精选: {
|
||||
'el-GR': 'Επιλεγμένο',
|
||||
'de-DE': 'Empfohlen',
|
||||
'en-US': 'Featured',
|
||||
'es-ES': 'Destacado',
|
||||
'fr-FR': 'Sélection',
|
||||
@ -114,6 +124,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
编程: {
|
||||
'el-GR': 'Προγραμματισμός',
|
||||
'de-DE': 'Programmierung',
|
||||
'en-US': 'Programming',
|
||||
'es-ES': 'Programación',
|
||||
'fr-FR': 'Programmation',
|
||||
@ -125,6 +136,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
情感: {
|
||||
'el-GR': 'Αίσθημα',
|
||||
'de-DE': 'Emotion',
|
||||
'en-US': 'Emotion',
|
||||
'es-ES': 'Emoción',
|
||||
'fr-FR': 'Émotion',
|
||||
@ -136,6 +148,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
教育: {
|
||||
'el-GR': 'Εκπαίδευση',
|
||||
'de-DE': 'Bildung',
|
||||
'en-US': 'Education',
|
||||
'es-ES': 'Educación',
|
||||
'fr-FR': 'Éducation',
|
||||
@ -147,6 +160,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
创意: {
|
||||
'el-GR': 'Κreativiteit',
|
||||
'de-DE': 'Kreativ',
|
||||
'en-US': 'Creative',
|
||||
'es-ES': 'Creativo',
|
||||
'fr-FR': 'Créatif',
|
||||
@ -158,6 +172,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
学术: {
|
||||
'el-GR': 'Ακαδημικός',
|
||||
'de-DE': 'Akademisch',
|
||||
'en-US': 'Academic',
|
||||
'es-ES': 'Académico',
|
||||
'fr-FR': 'Académique',
|
||||
@ -169,6 +184,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
设计: {
|
||||
'el-GR': 'Δημιουργικό',
|
||||
'de-DE': 'Design',
|
||||
'en-US': 'Design',
|
||||
'es-ES': 'Diseño',
|
||||
'fr-FR': 'Design',
|
||||
@ -180,6 +196,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
艺术: {
|
||||
'el-GR': 'Τέχνη',
|
||||
'de-DE': 'Kunst',
|
||||
'en-US': 'Art',
|
||||
'es-ES': 'Arte',
|
||||
'fr-FR': 'Art',
|
||||
@ -191,6 +208,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
娱乐: {
|
||||
'el-GR': 'Αναψυχή',
|
||||
'de-DE': 'Unterhaltung',
|
||||
'en-US': 'Entertainment',
|
||||
'es-ES': 'Entretenimiento',
|
||||
'fr-FR': 'Divertissement',
|
||||
@ -202,6 +220,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
生活: {
|
||||
'el-GR': 'Ζωή',
|
||||
'de-DE': 'Leben',
|
||||
'en-US': 'Life',
|
||||
'es-ES': 'Vida',
|
||||
'fr-FR': 'Vie',
|
||||
@ -213,6 +232,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
医疗: {
|
||||
'el-GR': 'Υγεία',
|
||||
'de-DE': 'Medizin',
|
||||
'en-US': 'Medical',
|
||||
'es-ES': 'Médico',
|
||||
'fr-FR': 'Médical',
|
||||
@ -224,6 +244,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
游戏: {
|
||||
'el-GR': 'Παιχνίδια',
|
||||
'de-DE': 'Spiele',
|
||||
'en-US': 'Games',
|
||||
'es-ES': 'Juegos',
|
||||
'fr-FR': 'Jeux',
|
||||
@ -235,6 +256,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
翻译: {
|
||||
'el-GR': 'Γραφήματα',
|
||||
'de-DE': 'Übersetzung',
|
||||
'en-US': 'Translation',
|
||||
'es-ES': 'Traducción',
|
||||
'fr-FR': 'Traduction',
|
||||
@ -246,6 +268,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
音乐: {
|
||||
'el-GR': 'Μουσική',
|
||||
'de-DE': 'Musik',
|
||||
'en-US': 'Music',
|
||||
'es-ES': 'Música',
|
||||
'fr-FR': 'Musique',
|
||||
@ -257,6 +280,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
点评: {
|
||||
'el-GR': 'Αξιολόγηση',
|
||||
'de-DE': 'Bewertung',
|
||||
'en-US': 'Review',
|
||||
'es-ES': 'Revisión',
|
||||
'fr-FR': 'Avis',
|
||||
@ -268,6 +292,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
文案: {
|
||||
'el-GR': 'Γραφήματα',
|
||||
'de-DE': 'Texterstellung',
|
||||
'en-US': 'Copywriting',
|
||||
'es-ES': 'Redacción',
|
||||
'fr-FR': 'Rédaction',
|
||||
@ -279,6 +304,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
百科: {
|
||||
'el-GR': 'Εγκυκλοπαίδεια',
|
||||
'de-DE': 'Enzyklopädie',
|
||||
'en-US': 'Encyclopedia',
|
||||
'es-ES': 'Enciclopedia',
|
||||
'fr-FR': 'Encyclopédie',
|
||||
@ -290,6 +316,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
健康: {
|
||||
'el-GR': 'Υγεία',
|
||||
'de-DE': 'Gesundheit',
|
||||
'en-US': 'Health',
|
||||
'es-ES': 'Salud',
|
||||
'fr-FR': 'Santé',
|
||||
@ -301,6 +328,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
营销: {
|
||||
'el-GR': 'Μάρκετινγκ',
|
||||
'de-DE': 'Marketing',
|
||||
'en-US': 'Marketing',
|
||||
'es-ES': 'Marketing',
|
||||
'fr-FR': 'Marketing',
|
||||
@ -312,6 +340,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
科学: {
|
||||
'el-GR': 'Επιστήμη',
|
||||
'de-DE': 'Wissenschaft',
|
||||
'en-US': 'Science',
|
||||
'es-ES': 'Ciencia',
|
||||
'fr-FR': 'Science',
|
||||
@ -323,6 +352,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
分析: {
|
||||
'el-GR': 'Ανάλυση',
|
||||
'de-DE': 'Analyse',
|
||||
'en-US': 'Analysis',
|
||||
'es-ES': 'Análisis',
|
||||
'fr-FR': 'Analyse',
|
||||
@ -334,6 +364,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
法律: {
|
||||
'el-GR': 'Νόμος',
|
||||
'de-DE': 'Recht',
|
||||
'en-US': 'Legal',
|
||||
'es-ES': 'Legal',
|
||||
'fr-FR': 'Légal',
|
||||
@ -345,6 +376,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
咨询: {
|
||||
'el-GR': 'Συμβουλή',
|
||||
'de-DE': 'Beratung',
|
||||
'en-US': 'Consulting',
|
||||
'es-ES': 'Consultoría',
|
||||
'fr-FR': 'Consultation',
|
||||
@ -356,6 +388,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
金融: {
|
||||
'el-GR': 'Φορολογία',
|
||||
'de-DE': 'Finanzen',
|
||||
'en-US': 'Finance',
|
||||
'es-ES': 'Finanzas',
|
||||
'fr-FR': 'Finance',
|
||||
@ -367,6 +400,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
旅游: {
|
||||
'el-GR': 'Τουρισμός',
|
||||
'de-DE': 'Reisen',
|
||||
'en-US': 'Travel',
|
||||
'es-ES': 'Viajes',
|
||||
'fr-FR': 'Voyages',
|
||||
@ -378,6 +412,7 @@ export const groupTranslations: GroupTranslations = {
|
||||
},
|
||||
管理: {
|
||||
'el-GR': 'Διοίκηση',
|
||||
'de-DE': 'Management',
|
||||
'en-US': 'Management',
|
||||
'es-ES': 'Gestión',
|
||||
'fr-FR': 'Gestion',
|
||||
|
||||
@ -122,6 +122,7 @@ const GeneralSettings: FC = () => {
|
||||
{ value: 'zh-CN', label: '中文', flag: '🇨🇳' },
|
||||
{ value: 'zh-TW', label: '中文(繁体)', flag: '🇭🇰' },
|
||||
{ value: 'en-US', label: 'English', flag: '🇺🇸' },
|
||||
{ value: 'de-DE', label: 'Deutsch', flag: '🇩🇪' },
|
||||
{ value: 'ja-JP', label: '日本語', flag: '🇯🇵' },
|
||||
{ value: 'ru-RU', label: 'Русский', flag: '🇷🇺' },
|
||||
{ value: 'el-GR', label: 'Ελληνικά', flag: '🇬🇷' },
|
||||
|
||||
@ -567,7 +567,17 @@ export enum ThemeMode {
|
||||
}
|
||||
|
||||
/** 有限的UI语言 */
|
||||
export type LanguageVarious = 'zh-CN' | 'zh-TW' | 'el-GR' | 'en-US' | 'es-ES' | 'fr-FR' | 'ja-JP' | 'pt-PT' | 'ru-RU'
|
||||
export type LanguageVarious =
|
||||
| 'zh-CN'
|
||||
| 'zh-TW'
|
||||
| 'de-DE'
|
||||
| 'el-GR'
|
||||
| 'en-US'
|
||||
| 'es-ES'
|
||||
| 'fr-FR'
|
||||
| 'ja-JP'
|
||||
| 'pt-PT'
|
||||
| 'ru-RU'
|
||||
|
||||
export type CodeStyleVarious = 'auto' | string
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user