mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 17:16:52 +08:00
### What problem does this PR solve? fix: Optimize internationalization configuration - Update multi-language options, adding general translations for functions like Select All and Clear - Add internationalization support for modules like Chat, Search, and Datasets ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -43,7 +43,7 @@ export default function ChatBasicSetting() {
|
||||
name="name"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>{t('assistantName')}</FormLabel>
|
||||
<FormLabel required>{t('assistantName')}</FormLabel>
|
||||
<FormControl>
|
||||
<Input {...field}></Input>
|
||||
</FormControl>
|
||||
@ -69,7 +69,9 @@ export default function ChatBasicSetting() {
|
||||
name={'prompt_config.empty_response'}
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>{t('emptyResponse')}</FormLabel>
|
||||
<FormLabel tooltip={t('emptyResponseTip')}>
|
||||
{t('emptyResponse')}
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Textarea {...field}></Textarea>
|
||||
</FormControl>
|
||||
@ -82,7 +84,9 @@ export default function ChatBasicSetting() {
|
||||
name={'prompt_config.prologue'}
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>{t('setAnOpener')}</FormLabel>
|
||||
<FormLabel tooltip={t('setAnOpenerTip')}>
|
||||
{t('setAnOpener')}
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Textarea {...field}></Textarea>
|
||||
</FormControl>
|
||||
@ -93,14 +97,17 @@ export default function ChatBasicSetting() {
|
||||
<SwitchFormField
|
||||
name={'prompt_config.quote'}
|
||||
label={t('quote')}
|
||||
tooltip={t('quoteTip')}
|
||||
></SwitchFormField>
|
||||
<SwitchFormField
|
||||
name={'prompt_config.keyword'}
|
||||
label={t('keyword')}
|
||||
tooltip={t('keywordTip')}
|
||||
></SwitchFormField>
|
||||
<SwitchFormField
|
||||
name={'prompt_config.tts'}
|
||||
label={t('tts')}
|
||||
tooltip={t('ttsTip')}
|
||||
></SwitchFormField>
|
||||
<TavilyFormField></TavilyFormField>
|
||||
<KnowledgeBaseFormField></KnowledgeBaseFormField>
|
||||
|
||||
@ -37,11 +37,12 @@ export function ChatPromptEngine() {
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<SimilaritySliderFormField></SimilaritySliderFormField>
|
||||
<SimilaritySliderFormField isTooltipShown></SimilaritySliderFormField>
|
||||
<TopNFormField></TopNFormField>
|
||||
<SwitchFormField
|
||||
name={'prompt_config.refine_multiturn'}
|
||||
label={t('multiTurn')}
|
||||
tooltip={t('multiTurnTip')}
|
||||
></SwitchFormField>
|
||||
<UseKnowledgeGraphFormField name="prompt_config.use_kg"></UseKnowledgeGraphFormField>
|
||||
<SwitchFormField
|
||||
|
||||
@ -23,6 +23,7 @@ import {
|
||||
import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
|
||||
import { buildMessageUuidWithRole } from '@/utils/chat';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { t } from 'i18next';
|
||||
import { isEmpty, omit } from 'lodash';
|
||||
import { ListCheck, Plus, Trash2 } from 'lucide-react';
|
||||
import { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
|
||||
@ -139,7 +140,7 @@ const ChatCard = forwardRef(function ChatCard(
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>Apply model configs</p>
|
||||
<p>{t('chat.applyModelConfigs')}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
{!isLatestChat || chatBoxIds.length === 3 ? (
|
||||
|
||||
@ -63,10 +63,10 @@ export default function Chat() {
|
||||
<section className="pt-14 h-[100vh] pb-24">
|
||||
<div className="flex items-center justify-between px-10 pb-5">
|
||||
<span className="text-2xl">
|
||||
Multiple Models ({chatBoxIds.length}/3)
|
||||
{t('chat.multipleModels')} ({chatBoxIds.length}/3)
|
||||
</span>
|
||||
<Button variant={'ghost'} onClick={switchDebugMode}>
|
||||
Exit <LogOut />
|
||||
{t('chat.exit')} <LogOut />
|
||||
</Button>
|
||||
</div>
|
||||
<MultipleChatBox
|
||||
@ -124,7 +124,7 @@ export default function Chat() {
|
||||
isNew === 'true'
|
||||
}
|
||||
>
|
||||
<ArrowUpRight /> Multiple Models
|
||||
<ArrowUpRight /> {t('chat.multipleModels')}
|
||||
</Button>
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
|
||||
@ -71,7 +71,7 @@ export function Sessions({
|
||||
</section>
|
||||
<div className="flex justify-between items-center mb-4 pt-10">
|
||||
<div className="flex items-center gap-3">
|
||||
<span className="text-base font-bold">Conversations</span>
|
||||
<span className="text-base font-bold">{t('chat.conversations')}</span>
|
||||
<span className="text-text-secondary text-xs">
|
||||
{conversationList.length}
|
||||
</span>
|
||||
|
||||
@ -38,7 +38,7 @@ export default function ChatList() {
|
||||
<section className="flex flex-col w-full flex-1">
|
||||
<div className="px-8 pt-8">
|
||||
<ListFilterBar
|
||||
title="Chat apps"
|
||||
title={t('chat.chatApps')}
|
||||
icon="chat"
|
||||
onSearchChange={handleInputChange}
|
||||
searchString={searchString}
|
||||
|
||||
Reference in New Issue
Block a user