mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-15 14:25:53 +08:00
Fix: language selection display on the profile settings page (#5459)
### What problem does this PR solve? Improve the language selection display on the profile settings page. | before | after | | --- | --- | ||| ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
b2a5482d2c
commit
f150687dbc
@ -1,3 +1,6 @@
|
|||||||
|
import { LanguageList, LanguageMap } from '@/constants/common';
|
||||||
|
import { useTranslate } from '@/hooks/common-hooks';
|
||||||
|
import { useChangeLanguage } from '@/hooks/logic-hooks';
|
||||||
import { useFetchUserInfo, useSaveSetting } from '@/hooks/user-setting-hooks';
|
import { useFetchUserInfo, useSaveSetting } from '@/hooks/user-setting-hooks';
|
||||||
import {
|
import {
|
||||||
getBase64FromUploadFileList,
|
getBase64FromUploadFileList,
|
||||||
@ -16,15 +19,10 @@ import {
|
|||||||
Upload,
|
Upload,
|
||||||
UploadFile,
|
UploadFile,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import camelCase from 'lodash/camelCase';
|
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import SettingTitle from '../components/setting-title';
|
import SettingTitle from '../components/setting-title';
|
||||||
import { TimezoneList } from '../constants';
|
import { TimezoneList } from '../constants';
|
||||||
import { useValidateSubmittable } from '../hooks';
|
import { useValidateSubmittable } from '../hooks';
|
||||||
|
|
||||||
import { LanguageList } from '@/constants/common';
|
|
||||||
import { useTranslate } from '@/hooks/common-hooks';
|
|
||||||
import { useChangeLanguage } from '@/hooks/logic-hooks';
|
|
||||||
import parentStyles from '../index.less';
|
import parentStyles from '../index.less';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
@ -155,7 +153,7 @@ const UserSettingProfile = () => {
|
|||||||
>
|
>
|
||||||
{LanguageList.map((x) => (
|
{LanguageList.map((x) => (
|
||||||
<Option value={x} key={x}>
|
<Option value={x} key={x}>
|
||||||
{t(camelCase(x), { keyPrefix: 'common' })}
|
{LanguageMap[x as keyof typeof LanguageMap]}
|
||||||
</Option>
|
</Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user