mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 17:09:11 +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 { App, ConfigProvider, ConfigProviderProps } from 'antd';
|
||||
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 dayjs from 'dayjs';
|
||||
@ -27,6 +28,7 @@ const AntLanguageMap = {
|
||||
en: enUS,
|
||||
zh: zhCN,
|
||||
'zh-TRADITIONAL': zh_HK,
|
||||
vi: vi_VN,
|
||||
};
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
@ -45,6 +45,7 @@ export const LanguageList = [
|
||||
'Traditional Chinese',
|
||||
'Indonesia',
|
||||
'Spanish',
|
||||
'Vietnamese',
|
||||
];
|
||||
|
||||
export const LanguageMap = {
|
||||
@ -53,6 +54,7 @@ export const LanguageMap = {
|
||||
'Traditional Chinese': '繁體中文',
|
||||
Indonesia: 'Indonesia',
|
||||
Spanish: 'Español',
|
||||
Vietnamese: 'Tiếng việt',
|
||||
};
|
||||
|
||||
export const LanguageTranslationMap = {
|
||||
@ -61,6 +63,7 @@ export const LanguageTranslationMap = {
|
||||
'Traditional Chinese': 'zh-TRADITIONAL',
|
||||
Indonesia: 'id',
|
||||
Spanish: 'es',
|
||||
Vietnamese: 'vi',
|
||||
};
|
||||
|
||||
export const FileMimeTypeMap = {
|
||||
|
@ -5,14 +5,17 @@ import { initReactI18next } from 'react-i18next';
|
||||
import translation_en from './en';
|
||||
import translation_es from './es';
|
||||
import translation_id from './id';
|
||||
import translation_vi from './vi';
|
||||
import translation_zh from './zh';
|
||||
import translation_zh_traditional from './zh-traditional';
|
||||
|
||||
const resources = {
|
||||
en: translation_en,
|
||||
zh: translation_zh,
|
||||
'zh-TRADITIONAL': translation_zh_traditional,
|
||||
id: translation_id,
|
||||
es: translation_es,
|
||||
vi: translation_vi,
|
||||
};
|
||||
|
||||
i18n
|
||||
@ -22,7 +25,7 @@ i18n
|
||||
detection: {
|
||||
lookupLocalStorage: 'lng',
|
||||
},
|
||||
supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es'],
|
||||
supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es', 'vi'],
|
||||
resources,
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
|
@ -439,6 +439,7 @@ The above is the content you need to summarize.`,
|
||||
multiTurnTip:
|
||||
'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?',
|
||||
description: 'Description of assistant',
|
||||
},
|
||||
setting: {
|
||||
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:
|
||||
'在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。',
|
||||
howUseId: '如何使用聊天ID?',
|
||||
description: '助理描述',
|
||||
},
|
||||
setting: {
|
||||
profile: '概要',
|
||||
|
@ -6,10 +6,10 @@ const NoFoundPage = () => {
|
||||
<Result
|
||||
status="404"
|
||||
title="404"
|
||||
subTitle="页面未找到,请输入正确的地址。"
|
||||
subTitle="Page not found, please enter a correct address."
|
||||
extra={
|
||||
<Button type="primary" onClick={() => history.push('/')}>
|
||||
返回主页
|
||||
Business
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
@ -51,6 +51,9 @@ const AssistantSetting = ({ show, form }: ISegmentedContentProps) => {
|
||||
>
|
||||
<Input placeholder={t('namePlaceholder')} />
|
||||
</Form.Item>
|
||||
<Form.Item name={'description'} label={t('description')}>
|
||||
<Input placeholder={t('descriptionPlaceholder')} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="icon"
|
||||
label={t('assistantAvatar')}
|
||||
|
@ -34,7 +34,7 @@ const Login = () => {
|
||||
|
||||
if (title === 'login') {
|
||||
const code = await login({
|
||||
email: params.email,
|
||||
email: `${params.email}`.trim(),
|
||||
password: rsaPassWord,
|
||||
});
|
||||
if (code === 0) {
|
||||
|
@ -35,6 +35,7 @@ const IconMap = {
|
||||
es: 'es',
|
||||
doc_store: 'storage',
|
||||
redis: 'redis',
|
||||
storage: 'minio',
|
||||
database: 'database',
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user