mirror of
https://git-proxy.hk.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-10 15:50:31 +08:00
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:
parent
1abf03351d
commit
8250b9f6b0
1
.gitignore
vendored
1
.gitignore
vendored
@ -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/
|
||||
|
@ -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();
|
||||
|
@ -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 {
|
||||
|
@ -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
1186
web/src/locales/de.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,7 @@ function UserSettingLocale() {
|
||||
'zh-TRADITIONAL',
|
||||
'ja',
|
||||
'pt-br',
|
||||
'German',
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user