Added French language support (#9173)

### What problem does this PR solve?
Implemented French UI translation

### Type of change
- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: ramin cedric <>
Co-authored-by: Liu An <asiro@qq.com>
This commit is contained in:
ramincedric
2025-08-06 04:22:32 +02:00
committed by GitHub
parent f359f2c44e
commit 6a0d6d2565
5 changed files with 1279 additions and 1 deletions

View File

@ -49,8 +49,8 @@ export const LanguageList = [
'Japanese',
'Portuguese BR',
'German',
'French',
];
export const LanguageMap = {
English: 'English',
Chinese: '简体中文',
@ -61,6 +61,7 @@ export const LanguageMap = {
Japanese: '日本語',
'Portuguese BR': 'Português BR',
German: 'German',
French: 'Français',
};
export enum LanguageAbbreviation {
@ -73,6 +74,7 @@ export enum LanguageAbbreviation {
Vi = 'vi',
PtBr = 'pt-BR',
De = 'de',
Fr = 'fr',
}
export const LanguageAbbreviationMap = {
@ -85,6 +87,7 @@ export const LanguageAbbreviationMap = {
[LanguageAbbreviation.Ja]: '日本語',
[LanguageAbbreviation.PtBr]: 'Português BR',
[LanguageAbbreviation.De]: 'Deutsch',
[LanguageAbbreviation.Fr]: 'Français',
};
export const LanguageTranslationMap = {
@ -97,6 +100,7 @@ export const LanguageTranslationMap = {
Japanese: 'ja',
'Portuguese BR': 'pt-br',
German: 'de',
French: 'fr',
};
export enum FileMimeType {

View File

@ -6,6 +6,7 @@ import { LanguageAbbreviation } from '@/constants/common';
import translation_de from './de';
import translation_en from './en';
import translation_es from './es';
import translation_fr from './fr';
import translation_id from './id';
import translation_ja from './ja';
import translation_pt_br from './pt-br';
@ -24,6 +25,7 @@ const resources = {
[LanguageAbbreviation.Vi]: translation_vi,
[LanguageAbbreviation.PtBr]: translation_pt_br,
[LanguageAbbreviation.De]: translation_de,
[LanguageAbbreviation.Fr]: translation_fr,
};
const enFlattened = flattenObject(translation_en);
const viFlattened = flattenObject(translation_vi);
@ -33,6 +35,7 @@ const jaFlattened = flattenObject(translation_ja);
const pt_brFlattened = flattenObject(translation_pt_br);
const zh_traditionalFlattened = flattenObject(translation_zh_traditional);
const deFlattened = flattenObject(translation_de);
const frFlattened = flattenObject(translation_fr);
export const translationTable = createTranslationTable(
[
enFlattened,
@ -43,6 +46,7 @@ export const translationTable = createTranslationTable(
jaFlattened,
pt_brFlattened,
deFlattened,
frFlattened,
],
[
'English',
@ -53,6 +57,7 @@ export const translationTable = createTranslationTable(
'ja',
'pt-BR',
'Deutsch',
'French',
],
);
i18n

1261
web/src/locales/fr.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -57,6 +57,10 @@ export const LanguageOptions = [
value: 'de',
label: 'Deutsch',
},
{
value: 'fr',
label: 'Français',
},
{
value: 'et',
label: 'Eesti',

View File

@ -835,6 +835,10 @@ export const LanguageOptions = [
value: 'de',
label: 'Deutsch',
},
{
value: 'fr',
label: 'Français',
},
{
value: 'et',
label: 'Eesti',