mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-13 14:09:03 +08:00
Vietnamese language support on web (#3549)
### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [X] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
ee50f78d99
commit
cc5960b88e
@ -3,6 +3,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|||||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||||
import { App, ConfigProvider, ConfigProviderProps } from 'antd';
|
import { App, ConfigProvider, ConfigProviderProps } from 'antd';
|
||||||
import enUS from 'antd/locale/en_US';
|
import enUS from 'antd/locale/en_US';
|
||||||
|
import vi_VN from 'antd/locale/vi_VN';
|
||||||
import zhCN from 'antd/locale/zh_CN';
|
import zhCN from 'antd/locale/zh_CN';
|
||||||
import zh_HK from 'antd/locale/zh_HK';
|
import zh_HK from 'antd/locale/zh_HK';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
@ -27,6 +28,7 @@ const AntLanguageMap = {
|
|||||||
en: enUS,
|
en: enUS,
|
||||||
zh: zhCN,
|
zh: zhCN,
|
||||||
'zh-TRADITIONAL': zh_HK,
|
'zh-TRADITIONAL': zh_HK,
|
||||||
|
vi: vi_VN,
|
||||||
};
|
};
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient();
|
||||||
|
@ -45,6 +45,7 @@ export const LanguageList = [
|
|||||||
'Traditional Chinese',
|
'Traditional Chinese',
|
||||||
'Indonesia',
|
'Indonesia',
|
||||||
'Spanish',
|
'Spanish',
|
||||||
|
'Vietnamese',
|
||||||
];
|
];
|
||||||
|
|
||||||
export const LanguageMap = {
|
export const LanguageMap = {
|
||||||
@ -53,6 +54,7 @@ export const LanguageMap = {
|
|||||||
'Traditional Chinese': '繁體中文',
|
'Traditional Chinese': '繁體中文',
|
||||||
Indonesia: 'Indonesia',
|
Indonesia: 'Indonesia',
|
||||||
Spanish: 'Español',
|
Spanish: 'Español',
|
||||||
|
Vietnamese: 'Tiếng việt',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LanguageTranslationMap = {
|
export const LanguageTranslationMap = {
|
||||||
@ -61,6 +63,7 @@ export const LanguageTranslationMap = {
|
|||||||
'Traditional Chinese': 'zh-TRADITIONAL',
|
'Traditional Chinese': 'zh-TRADITIONAL',
|
||||||
Indonesia: 'id',
|
Indonesia: 'id',
|
||||||
Spanish: 'es',
|
Spanish: 'es',
|
||||||
|
Vietnamese: 'vi',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FileMimeTypeMap = {
|
export const FileMimeTypeMap = {
|
||||||
|
@ -5,14 +5,17 @@ import { initReactI18next } from 'react-i18next';
|
|||||||
import translation_en from './en';
|
import translation_en from './en';
|
||||||
import translation_es from './es';
|
import translation_es from './es';
|
||||||
import translation_id from './id';
|
import translation_id from './id';
|
||||||
|
import translation_vi from './vi';
|
||||||
import translation_zh from './zh';
|
import translation_zh from './zh';
|
||||||
import translation_zh_traditional from './zh-traditional';
|
import translation_zh_traditional from './zh-traditional';
|
||||||
|
|
||||||
const resources = {
|
const resources = {
|
||||||
en: translation_en,
|
en: translation_en,
|
||||||
zh: translation_zh,
|
zh: translation_zh,
|
||||||
'zh-TRADITIONAL': translation_zh_traditional,
|
'zh-TRADITIONAL': translation_zh_traditional,
|
||||||
id: translation_id,
|
id: translation_id,
|
||||||
es: translation_es,
|
es: translation_es,
|
||||||
|
vi: translation_vi,
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n
|
i18n
|
||||||
@ -22,7 +25,7 @@ i18n
|
|||||||
detection: {
|
detection: {
|
||||||
lookupLocalStorage: 'lng',
|
lookupLocalStorage: 'lng',
|
||||||
},
|
},
|
||||||
supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es'],
|
supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es', 'vi'],
|
||||||
resources,
|
resources,
|
||||||
fallbackLng: 'en',
|
fallbackLng: 'en',
|
||||||
interpolation: {
|
interpolation: {
|
||||||
|
@ -439,6 +439,7 @@ The above is the content you need to summarize.`,
|
|||||||
multiTurnTip:
|
multiTurnTip:
|
||||||
'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.',
|
'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.',
|
||||||
howUseId: 'How to use chat ID?',
|
howUseId: 'How to use chat ID?',
|
||||||
|
description: 'Description of assistant',
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
profile: 'Profile',
|
profile: 'Profile',
|
||||||
|
1046
web/src/locales/vi.ts
Normal file
1046
web/src/locales/vi.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -437,6 +437,7 @@ export default {
|
|||||||
multiTurnTip:
|
multiTurnTip:
|
||||||
'在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。',
|
'在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。',
|
||||||
howUseId: '如何使用聊天ID?',
|
howUseId: '如何使用聊天ID?',
|
||||||
|
description: '助理描述',
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
profile: '概要',
|
profile: '概要',
|
||||||
|
@ -6,10 +6,10 @@ const NoFoundPage = () => {
|
|||||||
<Result
|
<Result
|
||||||
status="404"
|
status="404"
|
||||||
title="404"
|
title="404"
|
||||||
subTitle="页面未找到,请输入正确的地址。"
|
subTitle="Page not found, please enter a correct address."
|
||||||
extra={
|
extra={
|
||||||
<Button type="primary" onClick={() => history.push('/')}>
|
<Button type="primary" onClick={() => history.push('/')}>
|
||||||
返回主页
|
Business
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -51,6 +51,9 @@ const AssistantSetting = ({ show, form }: ISegmentedContentProps) => {
|
|||||||
>
|
>
|
||||||
<Input placeholder={t('namePlaceholder')} />
|
<Input placeholder={t('namePlaceholder')} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item name={'description'} label={t('description')}>
|
||||||
|
<Input placeholder={t('descriptionPlaceholder')} />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="icon"
|
name="icon"
|
||||||
label={t('assistantAvatar')}
|
label={t('assistantAvatar')}
|
||||||
|
@ -34,7 +34,7 @@ const Login = () => {
|
|||||||
|
|
||||||
if (title === 'login') {
|
if (title === 'login') {
|
||||||
const code = await login({
|
const code = await login({
|
||||||
email: params.email,
|
email: `${params.email}`.trim(),
|
||||||
password: rsaPassWord,
|
password: rsaPassWord,
|
||||||
});
|
});
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
|
@ -35,6 +35,7 @@ const IconMap = {
|
|||||||
es: 'es',
|
es: 'es',
|
||||||
doc_store: 'storage',
|
doc_store: 'storage',
|
||||||
redis: 'redis',
|
redis: 'redis',
|
||||||
|
storage: 'minio',
|
||||||
database: 'database',
|
database: 'database',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user