Feat: Add german translations (#5866)

### What problem does this PR solve?

Add Support for german language 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Philipp Rien 2025-03-11 09:13:58 +01:00 committed by GitHub
parent 1abf03351d
commit 8250b9f6b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 1200 additions and 1 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@ nltk_data/
# Exclude hash-like temporary files like 9b5ad71b2ce5302211f9c61530b329a4922fc6a4
*[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]*
.lh/

View File

@ -7,6 +7,7 @@ import enUS from 'antd/locale/en_US';
import vi_VN from 'antd/locale/vi_VN';
import zhCN from 'antd/locale/zh_CN';
import zh_HK from 'antd/locale/zh_HK';
import deDE from 'antd/locale/de_DE';
import dayjs from 'dayjs';
import advancedFormat from 'dayjs/plugin/advancedFormat';
import customParseFormat from 'dayjs/plugin/customParseFormat';
@ -32,6 +33,7 @@ const AntLanguageMap = {
'zh-TRADITIONAL': zh_HK,
vi: vi_VN,
'pt-BR': pt_BR,
de: deDE,
};
const queryClient = new QueryClient();

View File

@ -48,6 +48,7 @@ export const LanguageList = [
'Vietnamese',
'Japanese',
'Portuguese BR',
'German',
];
export const LanguageMap = {
@ -59,6 +60,7 @@ export const LanguageMap = {
Vietnamese: 'Tiếng việt',
Japanese: '日本語',
'Portuguese BR': 'Português BR',
German: 'German',
};
export enum LanguageAbbreviation {
@ -70,6 +72,7 @@ export enum LanguageAbbreviation {
Es = 'es',
Vi = 'vi',
PtBr = 'pt-BR',
De = 'de',
}
export const LanguageAbbreviationMap = {
@ -81,6 +84,7 @@ export const LanguageAbbreviationMap = {
[LanguageAbbreviation.Vi]: 'Tiếng việt',
[LanguageAbbreviation.Ja]: '日本語',
[LanguageAbbreviation.PtBr]: 'Português BR',
[LanguageAbbreviation.De]: 'Deutsch',
};
export const LanguageTranslationMap = {
@ -92,6 +96,7 @@ export const LanguageTranslationMap = {
Vietnamese: 'vi',
Japanese: 'ja',
'Portuguese BR': 'pt-br',
German: 'de',
};
export enum FileMimeType {

View File

@ -8,6 +8,7 @@ import translation_es from './es';
import translation_id from './id';
import translation_ja from './ja';
import translation_pt_br from './pt-br';
import translation_de from './de';
import { createTranslationTable, flattenObject } from './until';
import translation_vi from './vi';
import translation_zh from './zh';
@ -22,6 +23,7 @@ const resources = {
[LanguageAbbreviation.Es]: translation_es,
[LanguageAbbreviation.Vi]: translation_vi,
[LanguageAbbreviation.PtBr]: translation_pt_br,
[LanguageAbbreviation.De]: translation_de,
};
const enFlattened = flattenObject(translation_en);
const viFlattened = flattenObject(translation_vi);
@ -30,6 +32,7 @@ const zhFlattened = flattenObject(translation_zh);
const jaFlattened = flattenObject(translation_ja);
const pt_brFlattened = flattenObject(translation_pt_br);
const zh_traditionalFlattened = flattenObject(translation_zh_traditional);
const deFlattened = flattenObject(translation_de);
export const translationTable = createTranslationTable(
[
enFlattened,
@ -39,8 +42,9 @@ export const translationTable = createTranslationTable(
zh_traditionalFlattened,
jaFlattened,
pt_brFlattened,
deFlattened,
],
['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL', 'ja', 'pt-BR'],
['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL', 'ja', 'pt-BR', 'Deutsch'],
);
i18n
.use(initReactI18next)

1186
web/src/locales/de.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@ function UserSettingLocale() {
'zh-TRADITIONAL',
'ja',
'pt-br',
'German',
]}
/>
);