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>
This commit is contained in:
beyondkmp 2025-10-22 15:38:17 +08:00 committed by GitHub
parent 50798280db
commit 4063c20505
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 4712 additions and 2 deletions

View File

@ -9,6 +9,7 @@ electronLanguages:
- zh_CN # for macOS - zh_CN # for macOS
- zh_TW # for macOS - zh_TW # for macOS
- en # for macOS - en # for macOS
- de
directories: directories:
buildResources: build buildResources: build

View File

@ -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 ZhCn from '../../renderer/src/i18n/locales/zh-cn.json'
import ZhTw from '../../renderer/src/i18n/locales/zh-tw.json' import ZhTw from '../../renderer/src/i18n/locales/zh-tw.json'
// Machine translation // Machine translation
import deDE from '../../renderer/src/i18n/translate/de-de.json'
import elGR from '../../renderer/src/i18n/translate/el-gr.json' import elGR from '../../renderer/src/i18n/translate/el-gr.json'
import esES from '../../renderer/src/i18n/translate/es-es.json' import esES from '../../renderer/src/i18n/translate/es-es.json'
import frFR from '../../renderer/src/i18n/translate/fr-fr.json' import frFR from '../../renderer/src/i18n/translate/fr-fr.json'
@ -16,6 +17,7 @@ const locales = Object.fromEntries(
['zh-TW', ZhTw], ['zh-TW', ZhTw],
['ja-JP', JaJP], ['ja-JP', JaJP],
['ru-RU', RuRu], ['ru-RU', RuRu],
['de-DE', deDE],
['el-GR', elGR], ['el-GR', elGR],
['es-ES', esES], ['es-ES', esES],
['fr-FR', frFR], ['fr-FR', frFR],

View File

@ -1,6 +1,7 @@
import { useSettings } from '@renderer/hooks/useSettings' import { useSettings } from '@renderer/hooks/useSettings'
import { LanguageVarious } from '@renderer/types' import { LanguageVarious } from '@renderer/types'
import { ConfigProvider, theme } from 'antd' import { ConfigProvider, theme } from 'antd'
import deDE from 'antd/locale/de_DE'
import elGR from 'antd/locale/el_GR' import elGR from 'antd/locale/el_GR'
import enUS from 'antd/locale/en_US' import enUS from 'antd/locale/en_US'
import esES from 'antd/locale/es_ES' import esES from 'antd/locale/es_ES'
@ -126,6 +127,8 @@ function getAntdLocale(language: LanguageVarious) {
return zhTW return zhTW
case 'en-US': case 'en-US':
return enUS return enUS
case 'de-DE':
return deDE
case 'ru-RU': case 'ru-RU':
return ruRU return ruRU
case 'ja-JP': case 'ja-JP':

View File

@ -7,7 +7,7 @@ interface UseSmoothStreamOptions {
initialText?: string 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) const segmenter = new Intl.Segmenter(languages)
export const useSmoothStream = ({ onUpdate, streamDone, minDelay = 10, initialText = '' }: UseSmoothStreamOptions) => { export const useSmoothStream = ({ onUpdate, streamDone, minDelay = 10, initialText = '' }: UseSmoothStreamOptions) => {

View File

@ -8,6 +8,7 @@ import enUS from './locales/en-us.json'
import zhCN from './locales/zh-cn.json' import zhCN from './locales/zh-cn.json'
import zhTW from './locales/zh-tw.json' import zhTW from './locales/zh-tw.json'
// Machine translation // Machine translation
import deDE from './translate/de-de.json'
import elGR from './translate/el-gr.json' import elGR from './translate/el-gr.json'
import esES from './translate/es-es.json' import esES from './translate/es-es.json'
import frFR from './translate/fr-fr.json' import frFR from './translate/fr-fr.json'
@ -24,6 +25,7 @@ const resources = Object.fromEntries(
['ru-RU', ruRU], ['ru-RU', ruRU],
['zh-CN', zhCN], ['zh-CN', zhCN],
['zh-TW', zhTW], ['zh-TW', zhTW],
['de-DE', deDE],
['el-GR', elGR], ['el-GR', elGR],
['es-ES', esES], ['es-ES', esES],
['fr-FR', frFR], ['fr-FR', frFR],

File diff suppressed because it is too large Load Diff

View File

@ -122,6 +122,7 @@ const GeneralSettings: FC = () => {
{ value: 'zh-CN', label: '中文', flag: '🇨🇳' }, { value: 'zh-CN', label: '中文', flag: '🇨🇳' },
{ value: 'zh-TW', label: '中文(繁体)', flag: '🇭🇰' }, { value: 'zh-TW', label: '中文(繁体)', flag: '🇭🇰' },
{ value: 'en-US', label: 'English', flag: '🇺🇸' }, { value: 'en-US', label: 'English', flag: '🇺🇸' },
{ value: 'de-DE', label: 'Deutsch', flag: '🇩🇪' },
{ value: 'ja-JP', label: '日本語', flag: '🇯🇵' }, { value: 'ja-JP', label: '日本語', flag: '🇯🇵' },
{ value: 'ru-RU', label: 'Русский', flag: '🇷🇺' }, { value: 'ru-RU', label: 'Русский', flag: '🇷🇺' },
{ value: 'el-GR', label: 'Ελληνικά', flag: '🇬🇷' }, { value: 'el-GR', label: 'Ελληνικά', flag: '🇬🇷' },

View File

@ -2,6 +2,7 @@
export type GroupTranslations = { export type GroupTranslations = {
[key: string]: { [key: string]: {
'el-GR': string 'el-GR': string
'de-DE': string
'en-US': string 'en-US': string
'es-ES': string 'es-ES': string
'fr-FR': string 'fr-FR': string
@ -16,6 +17,7 @@ export type GroupTranslations = {
export const groupTranslations: GroupTranslations = { export const groupTranslations: GroupTranslations = {
: { : {
'el-GR': 'Τα δικά μου', 'el-GR': 'Τα δικά μου',
'de-DE': 'Meine Agenten',
'en-US': 'My Agents', 'en-US': 'My Agents',
'es-ES': 'Mis agentes', 'es-ES': 'Mis agentes',
'fr-FR': 'Mes agents', 'fr-FR': 'Mes agents',
@ -27,6 +29,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Επαγγελμα', 'el-GR': 'Επαγγελμα',
'de-DE': 'Karriere',
'en-US': 'Career', 'en-US': 'Career',
'es-ES': 'Profesional', 'es-ES': 'Profesional',
'fr-FR': 'Professionnel', 'fr-FR': 'Professionnel',
@ -38,6 +41,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Εμπορικός', 'el-GR': 'Εμπορικός',
'de-DE': 'Geschäft',
'en-US': 'Business', 'en-US': 'Business',
'es-ES': 'Negocio', 'es-ES': 'Negocio',
'fr-FR': 'Commercial', 'fr-FR': 'Commercial',
@ -49,6 +53,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Εργαλεία', 'el-GR': 'Εργαλεία',
'de-DE': 'Werkzeuge',
'en-US': 'Tools', 'en-US': 'Tools',
'es-ES': 'Herramientas', 'es-ES': 'Herramientas',
'fr-FR': 'Outils', 'fr-FR': 'Outils',
@ -60,6 +65,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Γλώσσα', 'el-GR': 'Γλώσσα',
'de-DE': 'Sprache',
'en-US': 'Language', 'en-US': 'Language',
'es-ES': 'Idioma', 'es-ES': 'Idioma',
'fr-FR': 'Langue', 'fr-FR': 'Langue',
@ -71,6 +77,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Γραφείο', 'el-GR': 'Γραφείο',
'de-DE': 'Büro',
'en-US': 'Office', 'en-US': 'Office',
'es-ES': 'Oficina', 'es-ES': 'Oficina',
'fr-FR': 'Bureau', 'fr-FR': 'Bureau',
@ -82,6 +89,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Γενικά', 'el-GR': 'Γενικά',
'de-DE': 'Allgemein',
'en-US': 'General', 'en-US': 'General',
'es-ES': 'General', 'es-ES': 'General',
'fr-FR': 'Général', 'fr-FR': 'Général',
@ -93,6 +101,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Γράφημα', 'el-GR': 'Γράφημα',
'de-DE': 'Schreiben',
'en-US': 'Writing', 'en-US': 'Writing',
'es-ES': 'Escritura', 'es-ES': 'Escritura',
'fr-FR': 'Écriture', 'fr-FR': 'Écriture',
@ -104,6 +113,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Επιλεγμένο', 'el-GR': 'Επιλεγμένο',
'de-DE': 'Empfohlen',
'en-US': 'Featured', 'en-US': 'Featured',
'es-ES': 'Destacado', 'es-ES': 'Destacado',
'fr-FR': 'Sélection', 'fr-FR': 'Sélection',
@ -115,6 +125,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Προγραμματισμός', 'el-GR': 'Προγραμματισμός',
'de-DE': 'Programmierung',
'en-US': 'Programming', 'en-US': 'Programming',
'es-ES': 'Programación', 'es-ES': 'Programación',
'fr-FR': 'Programmation', 'fr-FR': 'Programmation',
@ -126,6 +137,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Αίσθημα', 'el-GR': 'Αίσθημα',
'de-DE': 'Emotion',
'en-US': 'Emotion', 'en-US': 'Emotion',
'es-ES': 'Emoción', 'es-ES': 'Emoción',
'fr-FR': 'Émotion', 'fr-FR': 'Émotion',
@ -137,6 +149,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Εκπαίδευση', 'el-GR': 'Εκπαίδευση',
'de-DE': 'Bildung',
'en-US': 'Education', 'en-US': 'Education',
'es-ES': 'Educación', 'es-ES': 'Educación',
'fr-FR': 'Éducation', 'fr-FR': 'Éducation',
@ -148,6 +161,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Κreativiteit', 'el-GR': 'Κreativiteit',
'de-DE': 'Kreativ',
'en-US': 'Creative', 'en-US': 'Creative',
'es-ES': 'Creativo', 'es-ES': 'Creativo',
'fr-FR': 'Créatif', 'fr-FR': 'Créatif',
@ -159,6 +173,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Ακαδημικός', 'el-GR': 'Ακαδημικός',
'de-DE': 'Akademisch',
'en-US': 'Academic', 'en-US': 'Academic',
'es-ES': 'Académico', 'es-ES': 'Académico',
'fr-FR': 'Académique', 'fr-FR': 'Académique',
@ -170,6 +185,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Δημιουργικό', 'el-GR': 'Δημιουργικό',
'de-DE': 'Design',
'en-US': 'Design', 'en-US': 'Design',
'es-ES': 'Diseño', 'es-ES': 'Diseño',
'fr-FR': 'Design', 'fr-FR': 'Design',
@ -181,6 +197,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Τέχνη', 'el-GR': 'Τέχνη',
'de-DE': 'Kunst',
'en-US': 'Art', 'en-US': 'Art',
'es-ES': 'Arte', 'es-ES': 'Arte',
'fr-FR': 'Art', 'fr-FR': 'Art',
@ -192,6 +209,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Αναψυχή', 'el-GR': 'Αναψυχή',
'de-DE': 'Unterhaltung',
'en-US': 'Entertainment', 'en-US': 'Entertainment',
'es-ES': 'Entretenimiento', 'es-ES': 'Entretenimiento',
'fr-FR': 'Divertissement', 'fr-FR': 'Divertissement',
@ -203,6 +221,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Ζωή', 'el-GR': 'Ζωή',
'de-DE': 'Leben',
'en-US': 'Life', 'en-US': 'Life',
'es-ES': 'Vida', 'es-ES': 'Vida',
'fr-FR': 'Vie', 'fr-FR': 'Vie',
@ -214,6 +233,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Υγεία', 'el-GR': 'Υγεία',
'de-DE': 'Medizin',
'en-US': 'Medical', 'en-US': 'Medical',
'es-ES': 'Médico', 'es-ES': 'Médico',
'fr-FR': 'Médical', 'fr-FR': 'Médical',
@ -225,6 +245,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Παιχνίδια', 'el-GR': 'Παιχνίδια',
'de-DE': 'Spiele',
'en-US': 'Games', 'en-US': 'Games',
'es-ES': 'Juegos', 'es-ES': 'Juegos',
'fr-FR': 'Jeux', 'fr-FR': 'Jeux',
@ -236,6 +257,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Γραφήματα', 'el-GR': 'Γραφήματα',
'de-DE': 'Übersetzung',
'en-US': 'Translation', 'en-US': 'Translation',
'es-ES': 'Traducción', 'es-ES': 'Traducción',
'fr-FR': 'Traduction', 'fr-FR': 'Traduction',
@ -247,6 +269,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Μουσική', 'el-GR': 'Μουσική',
'de-DE': 'Musik',
'en-US': 'Music', 'en-US': 'Music',
'es-ES': 'Música', 'es-ES': 'Música',
'fr-FR': 'Musique', 'fr-FR': 'Musique',
@ -258,6 +281,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Αξιολόγηση', 'el-GR': 'Αξιολόγηση',
'de-DE': 'Bewertung',
'en-US': 'Review', 'en-US': 'Review',
'es-ES': 'Revisión', 'es-ES': 'Revisión',
'fr-FR': 'Avis', 'fr-FR': 'Avis',
@ -269,6 +293,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Γραφήματα', 'el-GR': 'Γραφήματα',
'de-DE': 'Texterstellung',
'en-US': 'Copywriting', 'en-US': 'Copywriting',
'es-ES': 'Redacción', 'es-ES': 'Redacción',
'fr-FR': 'Rédaction', 'fr-FR': 'Rédaction',
@ -280,6 +305,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Εγκυκλοπαίδεια', 'el-GR': 'Εγκυκλοπαίδεια',
'de-DE': 'Enzyklopädie',
'en-US': 'Encyclopedia', 'en-US': 'Encyclopedia',
'es-ES': 'Enciclopedia', 'es-ES': 'Enciclopedia',
'fr-FR': 'Encyclopédie', 'fr-FR': 'Encyclopédie',
@ -291,6 +317,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Υγεία', 'el-GR': 'Υγεία',
'de-DE': 'Gesundheit',
'en-US': 'Health', 'en-US': 'Health',
'es-ES': 'Salud', 'es-ES': 'Salud',
'fr-FR': 'Santé', 'fr-FR': 'Santé',
@ -302,6 +329,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Μάρκετινγκ', 'el-GR': 'Μάρκετινγκ',
'de-DE': 'Marketing',
'en-US': 'Marketing', 'en-US': 'Marketing',
'es-ES': 'Marketing', 'es-ES': 'Marketing',
'fr-FR': 'Marketing', 'fr-FR': 'Marketing',
@ -313,6 +341,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Επιστήμη', 'el-GR': 'Επιστήμη',
'de-DE': 'Wissenschaft',
'en-US': 'Science', 'en-US': 'Science',
'es-ES': 'Ciencia', 'es-ES': 'Ciencia',
'fr-FR': 'Science', 'fr-FR': 'Science',
@ -324,6 +353,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Ανάλυση', 'el-GR': 'Ανάλυση',
'de-DE': 'Analyse',
'en-US': 'Analysis', 'en-US': 'Analysis',
'es-ES': 'Análisis', 'es-ES': 'Análisis',
'fr-FR': 'Analyse', 'fr-FR': 'Analyse',
@ -335,6 +365,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Νόμος', 'el-GR': 'Νόμος',
'de-DE': 'Recht',
'en-US': 'Legal', 'en-US': 'Legal',
'es-ES': 'Legal', 'es-ES': 'Legal',
'fr-FR': 'Légal', 'fr-FR': 'Légal',
@ -346,6 +377,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Συμβουλή', 'el-GR': 'Συμβουλή',
'de-DE': 'Beratung',
'en-US': 'Consulting', 'en-US': 'Consulting',
'es-ES': 'Consultoría', 'es-ES': 'Consultoría',
'fr-FR': 'Consultation', 'fr-FR': 'Consultation',
@ -357,6 +389,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Φορολογία', 'el-GR': 'Φορολογία',
'de-DE': 'Finanzen',
'en-US': 'Finance', 'en-US': 'Finance',
'es-ES': 'Finanzas', 'es-ES': 'Finanzas',
'fr-FR': 'Finance', 'fr-FR': 'Finance',
@ -368,6 +401,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Τουρισμός', 'el-GR': 'Τουρισμός',
'de-DE': 'Reisen',
'en-US': 'Travel', 'en-US': 'Travel',
'es-ES': 'Viajes', 'es-ES': 'Viajes',
'fr-FR': 'Voyages', 'fr-FR': 'Voyages',
@ -379,6 +413,7 @@ export const groupTranslations: GroupTranslations = {
}, },
: { : {
'el-GR': 'Διοίκηση', 'el-GR': 'Διοίκηση',
'de-DE': 'Management',
'en-US': 'Management', 'en-US': 'Management',
'es-ES': 'Gestión', 'es-ES': 'Gestión',
'fr-FR': 'Gestion', 'fr-FR': 'Gestion',

View File

@ -433,7 +433,17 @@ export enum ThemeMode {
} }
/** 有限的UI语言 */ /** 有限的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 export type CodeStyleVarious = 'auto' | string