feat: optimize i18n implementation for better localization (#2062)
* feat: optimize i18n implementation for better localization * delete i18n-ally-custom-framework.yml * update common key
This commit is contained in:
@@ -10,7 +10,12 @@ const CommunityModal = ({ onClose }: { onClose: () => void }) => {
|
||||
const { feConfigs } = useSystemStore();
|
||||
|
||||
return (
|
||||
<MyModal isOpen={true} onClose={onClose} iconSrc="modal/concat" title={t('system.Concat us')}>
|
||||
<MyModal
|
||||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="modal/concat"
|
||||
title={t('common:system.Concat us')}
|
||||
>
|
||||
<ModalBody textAlign={'center'}>
|
||||
<Markdown source={feConfigs?.concatMd || ''} />
|
||||
</ModalBody>
|
||||
|
||||
@@ -39,7 +39,7 @@ const Auth = ({ children }: { children: JSX.Element }) => {
|
||||
);
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('support.user.Need to login')
|
||||
title: t('common:support.user.Need to login')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,28 +27,28 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
const navbarList = useMemo(
|
||||
() => [
|
||||
{
|
||||
label: t('navbar.Chat'),
|
||||
label: t('common:navbar.Chat'),
|
||||
icon: 'core/chat/chatLight',
|
||||
activeIcon: 'core/chat/chatFill',
|
||||
link: `/chat?appId=${lastChatAppId}&chatId=${lastChatId}`,
|
||||
activeLink: ['/chat']
|
||||
},
|
||||
{
|
||||
label: t('navbar.Studio'),
|
||||
label: t('common:navbar.Studio'),
|
||||
icon: 'core/app/aiLight',
|
||||
activeIcon: 'core/app/aiFill',
|
||||
link: `/app/list`,
|
||||
activeLink: ['/app/list', '/app/detail']
|
||||
},
|
||||
{
|
||||
label: t('navbar.Datasets'),
|
||||
label: t('common:navbar.Datasets'),
|
||||
icon: 'core/dataset/datasetLight',
|
||||
activeIcon: 'core/dataset/datasetFill',
|
||||
link: `/dataset/list`,
|
||||
activeLink: ['/dataset/list', '/dataset/detail']
|
||||
},
|
||||
{
|
||||
label: t('navbar.Account'),
|
||||
label: t('common:navbar.Account'),
|
||||
icon: 'support/user/userLight',
|
||||
activeIcon: 'support/user/userFill',
|
||||
link: '/account',
|
||||
@@ -163,7 +163,7 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
</Box>
|
||||
)}
|
||||
{(feConfigs?.docUrl || feConfigs?.chatbotUrl) && (
|
||||
<MyTooltip label={t('common.system.Use Helper')} placement={'right-end'}>
|
||||
<MyTooltip label={t('common:common.system.Use Helper')} placement={'right-end'}>
|
||||
<Link
|
||||
{...itemStyles}
|
||||
{...hoverStyle}
|
||||
|
||||
@@ -13,7 +13,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
||||
const navbarList = useMemo(
|
||||
() => [
|
||||
{
|
||||
label: t('navbar.Chat'),
|
||||
label: t('common:navbar.Chat'),
|
||||
icon: 'core/chat/chatLight',
|
||||
activeIcon: 'core/chat/chatFill',
|
||||
link: `/chat?appId=${lastChatAppId}&chatId=${lastChatId}`,
|
||||
@@ -21,7 +21,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
||||
unread: 0
|
||||
},
|
||||
{
|
||||
label: t('navbar.Studio'),
|
||||
label: t('common:navbar.Studio'),
|
||||
icon: 'core/app/aiLight',
|
||||
activeIcon: 'core/app/aiFill',
|
||||
link: `/app/list`,
|
||||
@@ -29,7 +29,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
||||
unread: 0
|
||||
},
|
||||
{
|
||||
label: t('navbar.Tools'),
|
||||
label: t('common:navbar.Tools'),
|
||||
icon: 'phoneTabbar/tool',
|
||||
activeIcon: 'phoneTabbar/toolFill',
|
||||
link: '/tools',
|
||||
@@ -37,7 +37,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
||||
unread: 0
|
||||
},
|
||||
{
|
||||
label: t('navbar.Account'),
|
||||
label: t('common:navbar.Account'),
|
||||
icon: 'support/user/userLight',
|
||||
activeIcon: 'support/user/userFill',
|
||||
link: '/account',
|
||||
|
||||
@@ -329,7 +329,7 @@ const CodeLight = ({
|
||||
<Box flex={1}>{codeBoxName}</Box>
|
||||
<Flex cursor={'pointer'} onClick={() => copyData(String(children))} alignItems={'center'}>
|
||||
<Icon name={'copy'} width={15} height={15}></Icon>
|
||||
<Box ml={1}>{t('common.Copy')}</Box>
|
||||
<Box ml={1}>{t('common:common.Copy')}</Box>
|
||||
</Flex>
|
||||
</Flex>
|
||||
<SyntaxHighlighter style={codeLight as any} language={match?.[1]} PreTag="pre">
|
||||
|
||||
@@ -24,7 +24,7 @@ const QuestionGuide = ({ text }: { text: string }) => {
|
||||
|
||||
return questionGuides.length > 0 ? (
|
||||
<Box mt={2}>
|
||||
<ChatBoxDivider icon="core/chat/QGFill" text={t('core.chat.Question Guide')} />
|
||||
<ChatBoxDivider icon="core/chat/QGFill" text={t('common:core.chat.Question Guide')} />
|
||||
<Flex alignItems={'center'} flexWrap={'wrap'} gap={2}>
|
||||
{questionGuides.map((text) => (
|
||||
<Flex
|
||||
@@ -60,7 +60,7 @@ const QuestionGuide = ({ text }: { text: string }) => {
|
||||
lineHeight={0}
|
||||
bg={`linear-gradient(to left, white,white min(60px,100%),rgba(255,255,255,0) 80%)`}
|
||||
>
|
||||
<MyTooltip label={t('core.chat.markdown.Edit Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Edit Question')}>
|
||||
<MyIcon
|
||||
name={'edit'}
|
||||
w={'14px'}
|
||||
@@ -71,7 +71,7 @@ const QuestionGuide = ({ text }: { text: string }) => {
|
||||
onClick={() => eventBus.emit(EventNameEnum.editQuestion, { text })}
|
||||
/>
|
||||
</MyTooltip>
|
||||
<MyTooltip label={t('core.chat.markdown.Send Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Send Question')}>
|
||||
<MyIcon
|
||||
ml={4}
|
||||
name={'core/chat/sendLight'}
|
||||
|
||||
@@ -117,7 +117,7 @@ const A = React.memo(function A({ children, ...props }: any) {
|
||||
const text = useMemo(() => String(children), [children]);
|
||||
|
||||
return (
|
||||
<MyTooltip label={t('core.chat.markdown.Quick Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Quick Question')}>
|
||||
<Button
|
||||
variant={'whitePrimary'}
|
||||
size={'xs'}
|
||||
|
||||
@@ -47,7 +47,7 @@ const AIModelSelector = ({ list, onchange, disableTip, ...props }: Props) => {
|
||||
label: (
|
||||
<Flex alignItems={'center'}>
|
||||
<Avatar borderRadius={'0'} mr={2} src={LOGO_ICON} w={'18px'} />
|
||||
<Box>{t('support.user.Price')}</Box>
|
||||
<Box>{t('common:support.user.Price')}</Box>
|
||||
</Flex>
|
||||
),
|
||||
value: 'price'
|
||||
|
||||
@@ -64,7 +64,7 @@ const EditResourceModal = ({
|
||||
setValue('avatar', src);
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: getErrText(err, t('common.error.Select avatar failed')),
|
||||
title: getErrText(err, t('common:common.error.Select avatar failed')),
|
||||
status: 'warning'
|
||||
});
|
||||
}
|
||||
@@ -76,9 +76,9 @@ const EditResourceModal = ({
|
||||
<MyModal isOpen onClose={onClose} iconSrc={avatar} title={title}>
|
||||
<ModalBody>
|
||||
<Box>
|
||||
<FormLabel mb={1}>{t('core.app.Name and avatar')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:core.app.Name and avatar')}</FormLabel>
|
||||
<HStack spacing={4}>
|
||||
<MyTooltip label={t('common.Set Avatar')}>
|
||||
<MyTooltip label={t('common:common.Set Avatar')}>
|
||||
<Avatar
|
||||
flexShrink={0}
|
||||
src={avatar}
|
||||
@@ -98,13 +98,13 @@ const EditResourceModal = ({
|
||||
</HStack>
|
||||
</Box>
|
||||
<Box mt={4}>
|
||||
<FormLabel mb={1}>{t('common.Intro')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:common.Intro')}</FormLabel>
|
||||
<Textarea {...register('intro')} bg={'myGray.50'} maxLength={200} />
|
||||
</Box>
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button isLoading={loading} onClick={handleSubmit(onSave)} px={6}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ const ParentPaths = (props: {
|
||||
const { t } = useTranslation();
|
||||
const {
|
||||
paths = [],
|
||||
rootName = t('common.folder.Root Path'),
|
||||
rootName = t('common:common.folder.Root Path'),
|
||||
FirstPathDom,
|
||||
onClick,
|
||||
fontSize
|
||||
|
||||
@@ -24,7 +24,7 @@ const MyTextarea = React.forwardRef<HTMLTextAreaElement, Props>(function MyTexta
|
||||
const TextareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
|
||||
const { t } = useTranslation();
|
||||
const { title = t('core.app.edit.Prompt Editor'), ...childProps } = props;
|
||||
const { title = t('common:core.app.edit.Prompt Editor'), ...childProps } = props;
|
||||
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
|
||||
@@ -52,7 +52,7 @@ const MyTextarea = React.forwardRef<HTMLTextAreaElement, Props>(function MyTexta
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
@@ -85,7 +85,7 @@ const Editor = React.memo(function Editor({
|
||||
cursor={'pointer'}
|
||||
onClick={onOpenModal}
|
||||
>
|
||||
<MyTooltip label={t('common.ui.textarea.Magnifying')}>
|
||||
<MyTooltip label={t('common:common.ui.textarea.Magnifying')}>
|
||||
<MyIcon name={'common/fullScreenLight'} w={'14px'} color={'myGray.600'} />
|
||||
</MyTooltip>
|
||||
</Box>
|
||||
|
||||
@@ -31,7 +31,7 @@ const TagTextarea = ({ defaultValues, onUpdate, ...props }: Props) => {
|
||||
if (tags.includes(value)) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('common.input.Repeat Value')
|
||||
title: t('common:common.input.Repeat Value')
|
||||
});
|
||||
}
|
||||
setTags([...tags, value]);
|
||||
|
||||
@@ -49,7 +49,7 @@ const MoveModal = ({ moveResourceId, title, server, onConfirm, onClose }: Props)
|
||||
setFolderList([
|
||||
{
|
||||
id: rootId,
|
||||
name: t('common.folder.Root Path'),
|
||||
name: t('common:common.folder.Root Path'),
|
||||
open: true,
|
||||
children: data.map((item) => ({
|
||||
id: item.id,
|
||||
@@ -156,7 +156,7 @@ const MoveModal = ({ moveResourceId, title, server, onConfirm, onClose }: Props)
|
||||
onSuccess: () => {
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.folder.Move Success')
|
||||
successToast: t('common:common.folder.Move Success')
|
||||
}
|
||||
);
|
||||
|
||||
@@ -174,7 +174,7 @@ const MoveModal = ({ moveResourceId, title, server, onConfirm, onClose }: Props)
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button isLoading={confirming} isDisabled={!selectedId} onClick={onConfirmSelect}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -14,7 +14,7 @@ const FolderPath = (props: {
|
||||
const { t } = useTranslation();
|
||||
const {
|
||||
paths,
|
||||
rootName = t('common.folder.Root Path'),
|
||||
rootName = t('common:common.folder.Root Path'),
|
||||
FirstPathDom,
|
||||
onClick,
|
||||
fontSize,
|
||||
|
||||
@@ -40,7 +40,7 @@ const SelectOneResource = ({
|
||||
id: rootId,
|
||||
open: true,
|
||||
avatar: FolderImgUrl,
|
||||
name: t('common.folder.Root Path'),
|
||||
name: t('common:common.folder.Root Path'),
|
||||
isFolder: true,
|
||||
children: dataList
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@ const FolderSlideCard = ({
|
||||
<MyDivider my={6} />
|
||||
|
||||
<Box>
|
||||
<FormLabel>{t('common.Operation')}</FormLabel>
|
||||
<FormLabel>{t('common:common.Operation')}</FormLabel>
|
||||
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
@@ -101,7 +101,7 @@ const FolderSlideCard = ({
|
||||
mt={4}
|
||||
onClick={onMove}
|
||||
>
|
||||
{t('common.Move')}
|
||||
{t('common:common.Move')}
|
||||
</Button>
|
||||
{managePer.permission.isOwner && (
|
||||
<Button
|
||||
@@ -118,7 +118,7 @@ const FolderSlideCard = ({
|
||||
openConfirm(onDelete)();
|
||||
}}
|
||||
>
|
||||
{t('common.Delete folder')}
|
||||
{t('common:common.Delete folder')}
|
||||
</Button>
|
||||
)}
|
||||
</Box>
|
||||
@@ -130,7 +130,7 @@ const FolderSlideCard = ({
|
||||
<MyDivider my={6} />
|
||||
|
||||
<Box>
|
||||
<FormLabel>{t('support.permission.Permission')}</FormLabel>
|
||||
<FormLabel>{t('common:support.permission.Permission')}</FormLabel>
|
||||
|
||||
{!isInheritPermission && (
|
||||
<Box mt={2}>
|
||||
@@ -141,7 +141,7 @@ const FolderSlideCard = ({
|
||||
{managePer.permission.hasManagePer && (
|
||||
<Box mt={5}>
|
||||
<Box fontSize={'sm'} color={'myGray.500'}>
|
||||
{t('permission.Default permission')}
|
||||
{t('common:permission.Default permission')}
|
||||
</Box>
|
||||
<DefaultPermissionList
|
||||
mt="1"
|
||||
@@ -166,11 +166,11 @@ const FolderSlideCard = ({
|
||||
<>
|
||||
<Flex alignItems="center" justifyContent="space-between">
|
||||
<Box fontSize={'sm'} color={'myGray.500'}>
|
||||
{t('permission.Collaborator')}
|
||||
{t('common:permission.Collaborator')}
|
||||
</Box>
|
||||
{managePer.permission.hasManagePer && (
|
||||
<HStack spacing={3}>
|
||||
<MyTooltip label={t('permission.Manage')}>
|
||||
<MyTooltip label={t('common:permission.Manage')}>
|
||||
<MyIcon
|
||||
w="1rem"
|
||||
name="common/settingLight"
|
||||
@@ -179,7 +179,7 @@ const FolderSlideCard = ({
|
||||
onClick={onOpenManageModal}
|
||||
/>
|
||||
</MyTooltip>
|
||||
<MyTooltip label={t('common.Add')}>
|
||||
<MyTooltip label={t('common:common.Add')}>
|
||||
<MyIcon
|
||||
w="1rem"
|
||||
name="support/permission/collaborator"
|
||||
|
||||
@@ -75,7 +75,7 @@ const AIChatSettingsModal = ({
|
||||
onClose={onClose}
|
||||
title={
|
||||
<>
|
||||
{t('core.ai.AI settings')}
|
||||
{t('common:core.ai.AI settings')}
|
||||
{feConfigs?.docUrl && (
|
||||
<Link
|
||||
href={getDocPath('/docs/course/ai_settings/')}
|
||||
@@ -85,7 +85,7 @@ const AIChatSettingsModal = ({
|
||||
fontWeight={'normal'}
|
||||
fontSize={'md'}
|
||||
>
|
||||
{t('common.Read intro')}
|
||||
{t('common:common.Read intro')}
|
||||
</Link>
|
||||
)}
|
||||
</>
|
||||
@@ -95,7 +95,7 @@ const AIChatSettingsModal = ({
|
||||
<ModalBody overflowY={'auto'}>
|
||||
<Flex alignItems={'center'}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Model')}
|
||||
{t('common:core.ai.Model')}
|
||||
</Box>
|
||||
<Box flex={'1 0 0'}>
|
||||
<AIModelSelector
|
||||
@@ -112,7 +112,7 @@ const AIChatSettingsModal = ({
|
||||
{feConfigs && (
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Ai point price')}
|
||||
{t('common:core.ai.Ai point price')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
{t('support.wallet.Ai point every thousand tokens', {
|
||||
@@ -123,7 +123,7 @@ const AIChatSettingsModal = ({
|
||||
)}
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Max context')}
|
||||
{t('common:core.ai.Max context')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
{selectedModel?.maxContext || 4096}Tokens
|
||||
@@ -131,8 +131,8 @@ const AIChatSettingsModal = ({
|
||||
</Flex>
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Support tool')}
|
||||
<QuestionTip ml={1} label={t('core.module.template.AI support tool tip')} />
|
||||
{t('common:core.ai.Support tool')}
|
||||
<QuestionTip ml={1} label={t('common:core.module.template.AI support tool tip')} />
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
{selectedModel?.toolChoice || selectedModel?.functionCall ? '支持' : '不支持'}
|
||||
@@ -140,13 +140,13 @@ const AIChatSettingsModal = ({
|
||||
</Flex>
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.app.Temperature')}
|
||||
{t('common:core.app.Temperature')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
<MySlider
|
||||
markList={[
|
||||
{ label: t('core.app.deterministic'), value: 0 },
|
||||
{ label: t('core.app.Random'), value: 10 }
|
||||
{ label: t('common:core.app.deterministic'), value: 0 },
|
||||
{ label: t('common:core.app.Random'), value: 10 }
|
||||
]}
|
||||
width={'95%'}
|
||||
min={0}
|
||||
@@ -161,7 +161,7 @@ const AIChatSettingsModal = ({
|
||||
</Flex>
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.app.Max tokens')}
|
||||
{t('common:core.app.Max tokens')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
<MySlider
|
||||
@@ -184,7 +184,7 @@ const AIChatSettingsModal = ({
|
||||
{showMaxHistoriesSlider && (
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.app.Max histories')}
|
||||
{t('common:core.app.Max histories')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
<MySlider
|
||||
@@ -207,10 +207,10 @@ const AIChatSettingsModal = ({
|
||||
{showResponseAnswerText && (
|
||||
<Flex mt={8} alignItems={'center'}>
|
||||
<Box {...LabelStyles}>
|
||||
{t('core.app.Ai response')}
|
||||
{t('common:core.app.Ai response')}
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.module.template.AI response switch tip')}
|
||||
label={t('common:core.module.template.AI response switch tip')}
|
||||
></QuestionTip>
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
@@ -228,10 +228,10 @@ const AIChatSettingsModal = ({
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button ml={4} onClick={handleSubmit(onSuccess)}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -55,7 +55,7 @@ const SettingLLMModel = ({ llmModelType = LLMModelTypeEnum.all, defaultData, onC
|
||||
})}
|
||||
position={'relative'}
|
||||
>
|
||||
<MyTooltip label={t('core.app.Setting ai property')}>
|
||||
<MyTooltip label={t('common:core.app.Setting ai property')}>
|
||||
<Button
|
||||
w={'100%'}
|
||||
justifyContent={'flex-start'}
|
||||
|
||||
@@ -123,7 +123,7 @@ const DatasetParamsModal = ({
|
||||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/params.svg"
|
||||
title={t('core.dataset.search.Dataset Search Params')}
|
||||
title={t('common:core.dataset.search.Dataset Search Params')}
|
||||
w={['90vw', '550px']}
|
||||
>
|
||||
<ModalBody flex={'auto'} overflow={'auto'}>
|
||||
@@ -132,16 +132,16 @@ const DatasetParamsModal = ({
|
||||
list={[
|
||||
{
|
||||
icon: 'modal/setting',
|
||||
label: t('core.dataset.search.search mode'),
|
||||
label: t('common:core.dataset.search.search mode'),
|
||||
value: SearchSettingTabEnum.searchMode
|
||||
},
|
||||
{
|
||||
icon: 'support/outlink/apikeyFill',
|
||||
label: t('core.dataset.search.Filter'),
|
||||
label: t('common:core.dataset.search.Filter'),
|
||||
value: SearchSettingTabEnum.limit
|
||||
},
|
||||
{
|
||||
label: t('core.module.template.Query extension'),
|
||||
label: t('common:core.module.template.Query extension'),
|
||||
value: SearchSettingTabEnum.queryExtension,
|
||||
icon: '/imgs/workflow/cfr.svg'
|
||||
}
|
||||
@@ -182,7 +182,7 @@ const DatasetParamsModal = ({
|
||||
if (!showReRank) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('core.ai.Not deploy rerank model')
|
||||
title: t('common:core.ai.Not deploy rerank model')
|
||||
});
|
||||
}
|
||||
if (
|
||||
@@ -191,7 +191,7 @@ const DatasetParamsModal = ({
|
||||
) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('support.team.limit.No permission rerank')
|
||||
title: t('common:support.team.limit.No permission rerank')
|
||||
});
|
||||
}
|
||||
setValue('usingReRank', !getValues('usingReRank'));
|
||||
@@ -200,9 +200,9 @@ const DatasetParamsModal = ({
|
||||
>
|
||||
<MyIcon name="core/dataset/rerank" w={'18px'} mr={'14px'} />
|
||||
<Box pr={2} color={'myGray.800'} flex={'1 0 0'}>
|
||||
<Box fontSize={'sm'}>{t('core.dataset.search.ReRank')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:core.dataset.search.ReRank')}</Box>
|
||||
<Box fontSize={'xs'} color={'myGray.500'}>
|
||||
{t('core.dataset.search.ReRank desc')}
|
||||
{t('common:core.dataset.search.ReRank desc')}
|
||||
</Box>
|
||||
</Box>
|
||||
<Box position={'relative'} w={'18px'} h={'18px'}>
|
||||
@@ -218,10 +218,10 @@ const DatasetParamsModal = ({
|
||||
{limit !== undefined && (
|
||||
<Box display={['block', 'flex']}>
|
||||
<Flex flex={'0 0 120px'} mb={[8, 0]}>
|
||||
<FormLabel>{t('core.dataset.search.Max Tokens')}</FormLabel>
|
||||
<FormLabel>{t('common:core.dataset.search.Max Tokens')}</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.dataset.search.Max Tokens Tips')}
|
||||
label={t('common:core.dataset.search.Max Tokens Tips')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Box flex={1} mx={4}>
|
||||
@@ -244,10 +244,10 @@ const DatasetParamsModal = ({
|
||||
)}
|
||||
<Box display={['block', 'flex']} mt={10}>
|
||||
<Flex flex={'0 0 120px'} mb={[8, 0]}>
|
||||
<FormLabel>{t('core.dataset.search.Min Similarity')}</FormLabel>
|
||||
<FormLabel>{t('common:core.dataset.search.Min Similarity')}</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.dataset.search.Min Similarity Tips')}
|
||||
label={t('common:core.dataset.search.Min Similarity Tips')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Box flex={1} mx={4}>
|
||||
@@ -267,7 +267,9 @@ const DatasetParamsModal = ({
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Box color={'myGray.500'}>{t('core.dataset.search.No support similarity')}</Box>
|
||||
<Box color={'myGray.500'}>
|
||||
{t('common:core.dataset.search.No support similarity')}
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
@@ -276,16 +278,18 @@ const DatasetParamsModal = ({
|
||||
{currentTabType === SearchSettingTabEnum.queryExtension && (
|
||||
<Box>
|
||||
<Box transform={'translateY(-5px)'} fontSize={'xs'} color={'myGray.500'}>
|
||||
{t('core.dataset.Query extension intro')}
|
||||
{t('common:core.dataset.Query extension intro')}
|
||||
</Box>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<FormLabel flex={'1 0 0'}>{t('core.dataset.search.Using query extension')}</FormLabel>
|
||||
<FormLabel flex={'1 0 0'}>
|
||||
{t('common:core.dataset.search.Using query extension')}
|
||||
</FormLabel>
|
||||
<Switch {...register('datasetSearchUsingExtensionQuery')} />
|
||||
</Flex>
|
||||
{datasetSearchUsingCfrForm === true && (
|
||||
<>
|
||||
<Flex mt={4} alignItems={'center'}>
|
||||
<FormLabel flex={['0 0 80px', '1 0 0']}>{t('core.ai.Model')}</FormLabel>
|
||||
<FormLabel flex={['0 0 80px', '1 0 0']}>{t('common:core.ai.Model')}</FormLabel>
|
||||
<Box flex={['1 0 0', '0 0 300px']}>
|
||||
<SelectAiModel
|
||||
width={'100%'}
|
||||
@@ -299,17 +303,19 @@ const DatasetParamsModal = ({
|
||||
</Flex>
|
||||
<Box mt={3}>
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.edit.Query extension background prompt')}</FormLabel>
|
||||
<FormLabel>
|
||||
{t('common:core.app.edit.Query extension background prompt')}
|
||||
</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.app.edit.Query extension background tip')}
|
||||
label={t('common:core.app.edit.Query extension background tip')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Box mt={1}>
|
||||
<PromptEditor
|
||||
h={200}
|
||||
showOpenModal={false}
|
||||
placeholder={t('core.module.QueryExtension.placeholder')}
|
||||
placeholder={t('common:core.module.QueryExtension.placeholder')}
|
||||
value={cfbBgDesc}
|
||||
onChange={(e) => {
|
||||
setValue('datasetSearchExtensionBg', e);
|
||||
@@ -324,7 +330,7 @@ const DatasetParamsModal = ({
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
@@ -332,7 +338,7 @@ const DatasetParamsModal = ({
|
||||
handleSubmit(onSuccess)();
|
||||
}}
|
||||
>
|
||||
{t('common.Done')}
|
||||
{t('common:common.Done')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -61,7 +61,7 @@ export const DatasetSelectModal = ({
|
||||
isOpen={isOpen}
|
||||
paths={paths}
|
||||
setParentId={setParentId}
|
||||
tips={t('dataset.Select Dataset Tips')}
|
||||
tips={t('common:dataset.Select Dataset Tips')}
|
||||
onClose={onClose}
|
||||
>
|
||||
<Flex h={'100%'} flexDirection={'column'} flex={'1 0 0'}>
|
||||
@@ -124,8 +124,8 @@ export const DatasetSelectModal = ({
|
||||
key={item._id}
|
||||
label={
|
||||
item.type === DatasetTypeEnum.folder
|
||||
? t('dataset.Select Folder')
|
||||
: t('dataset.Select Dataset')
|
||||
? t('common:dataset.Select Folder')
|
||||
: t('common:dataset.Select Dataset')
|
||||
}
|
||||
>
|
||||
<Card
|
||||
@@ -148,7 +148,7 @@ export const DatasetSelectModal = ({
|
||||
if (vectorModel && vectorModel !== item.vectorModel.model) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('dataset.Select Dataset Tips')
|
||||
title: t('common:dataset.Select Dataset Tips')
|
||||
});
|
||||
}
|
||||
setSelectedDatasets((state) => [...state, { datasetId: item._id }]);
|
||||
@@ -170,7 +170,7 @@ export const DatasetSelectModal = ({
|
||||
</Flex>
|
||||
<Flex justifyContent={'flex-end'} alignItems={'center'} fontSize={'sm'}>
|
||||
{item.type === DatasetTypeEnum.folder ? (
|
||||
<Box color={'myGray.500'}>{t('Folder')}</Box>
|
||||
<Box color={'myGray.500'}>{t('common:Folder')}</Box>
|
||||
) : (
|
||||
<>
|
||||
<MyIcon mr={1} name="kbTest" w={'12px'} />
|
||||
@@ -184,7 +184,9 @@ export const DatasetSelectModal = ({
|
||||
})()
|
||||
)}
|
||||
</Grid>
|
||||
{filterDatasets.unSelected.length === 0 && <EmptyTip text={t('common.folder.empty')} />}
|
||||
{filterDatasets.unSelected.length === 0 && (
|
||||
<EmptyTip text={t('common:common.folder.empty')} />
|
||||
)}
|
||||
</ModalBody>
|
||||
|
||||
<ModalFooter>
|
||||
@@ -199,7 +201,7 @@ export const DatasetSelectModal = ({
|
||||
onChange(filterDatasets);
|
||||
}}
|
||||
>
|
||||
{t('common.Done')}
|
||||
{t('common:common.Done')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ const InputGuideConfig = ({
|
||||
|
||||
const formLabel = useMemo(() => {
|
||||
if (!isOpenQuestionGuide) {
|
||||
return t('core.app.whisper.Close');
|
||||
return t('common:core.app.whisper.Close');
|
||||
}
|
||||
return t('core.app.whisper.Open');
|
||||
return t('common:core.app.whisper.Open');
|
||||
}, [t, isOpenQuestionGuide]);
|
||||
|
||||
return (
|
||||
@@ -110,7 +110,7 @@ const InputGuideConfig = ({
|
||||
>
|
||||
<ModalBody px={[5, 16]} py={[4, 8]}>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel>{t('Is open')}</FormLabel>
|
||||
<FormLabel>{t('common:Is open')}</FormLabel>
|
||||
<Switch
|
||||
isChecked={isOpenQuestionGuide}
|
||||
onChange={(e) => {
|
||||
@@ -231,7 +231,7 @@ const LexiconConfigModal = ({ appId, onClose }: { appId: string; onClose: () =>
|
||||
} else {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('common.Add Success')
|
||||
title: t('common:common.Add Success')
|
||||
});
|
||||
}
|
||||
fetchData(1);
|
||||
@@ -241,7 +241,7 @@ const LexiconConfigModal = ({ appId, onClose }: { appId: string; onClose: () =>
|
||||
onSuccess() {
|
||||
setNewData(undefined);
|
||||
},
|
||||
errorToast: t('error.Create failed')
|
||||
errorToast: t('common:error.Create failed')
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ const QGSwitch = (props: SwitchProps) => {
|
||||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/chat/QGFill'} mr={2} w={'20px'} />
|
||||
<FormLabel>{t('core.app.Question Guide')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.Question Guide')}</FormLabel>
|
||||
<ChatFunctionTip type={'nextQuestion'} />
|
||||
<Box flex={1} />
|
||||
<Switch {...props} />
|
||||
|
||||
@@ -213,7 +213,7 @@ const ScheduledTriggerConfig = ({
|
||||
// cron config to show label
|
||||
const formatLabel = useMemo(() => {
|
||||
if (!isOpenSchedule) {
|
||||
return t('common.Not open');
|
||||
return t('common:common.Not open');
|
||||
}
|
||||
|
||||
if (cronField[0] === 'month') {
|
||||
@@ -239,7 +239,7 @@ const ScheduledTriggerConfig = ({
|
||||
});
|
||||
}
|
||||
|
||||
return t('common.Not open');
|
||||
return t('common:common.Not open');
|
||||
}, [cronField, isOpenSchedule, t]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -254,10 +254,10 @@ const ScheduledTriggerConfig = ({
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/schedulePlan'} w={'20px'} />
|
||||
<HStack ml={2} flex={1} spacing={1}>
|
||||
<FormLabel>{t('core.app.Interval timer run')}</FormLabel>
|
||||
<QuestionTip label={t('core.app.Interval timer tip')} />
|
||||
<FormLabel>{t('common:core.app.Interval timer run')}</FormLabel>
|
||||
<QuestionTip label={t('common:core.app.Interval timer tip')} />
|
||||
</HStack>
|
||||
<MyTooltip label={t('core.app.Config schedule plan')}>
|
||||
<MyTooltip label={t('common:core.app.Config schedule plan')}>
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
iconSpacing={1}
|
||||
@@ -274,12 +274,15 @@ const ScheduledTriggerConfig = ({
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
iconSrc={'core/app/schedulePlan'}
|
||||
title={t('core.app.Interval timer config')}
|
||||
title={t('common:core.app.Interval timer config')}
|
||||
overflow={'unset'}
|
||||
>
|
||||
<ModalBody>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel flex={'0 0 80px'}> {t('core.app.schedule.Open schedule')}</FormLabel>
|
||||
<FormLabel flex={'0 0 80px'}>
|
||||
{' '}
|
||||
{t('common:core.app.schedule.Open schedule')}
|
||||
</FormLabel>
|
||||
<Switch
|
||||
isChecked={isOpenSchedule}
|
||||
onChange={(e) => {
|
||||
@@ -318,12 +321,12 @@ const ScheduledTriggerConfig = ({
|
||||
</Box>
|
||||
</Flex>
|
||||
<Box mt={5}>
|
||||
<FormLabel mb={1}>{t('core.app.schedule.Default prompt')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:core.app.schedule.Default prompt')}</FormLabel>
|
||||
<Textarea
|
||||
value={defaultPrompt}
|
||||
rows={8}
|
||||
bg={'myGray.50'}
|
||||
placeholder={t('core.app.schedule.Default prompt placeholder')}
|
||||
placeholder={t('common:core.app.schedule.Default prompt placeholder')}
|
||||
onChange={(e) => {
|
||||
onUpdate({ defaultPrompt: e.target.value });
|
||||
}}
|
||||
|
||||
@@ -27,8 +27,8 @@ const TTSSelect = ({
|
||||
|
||||
const list = useMemo(
|
||||
() => [
|
||||
{ label: t('core.app.tts.Close'), value: TTSTypeEnum.none },
|
||||
{ label: t('core.app.tts.Web'), value: TTSTypeEnum.web },
|
||||
{ label: t('common:core.app.tts.Close'), value: TTSTypeEnum.none },
|
||||
{ label: t('common:core.app.tts.Web'), value: TTSTypeEnum.web },
|
||||
...audioSpeechModelList.map((item) => item?.voices || []).flat()
|
||||
],
|
||||
[audioSpeechModelList, t]
|
||||
@@ -44,7 +44,7 @@ const TTSSelect = ({
|
||||
return value.voice;
|
||||
}, [value]);
|
||||
const formLabel = useMemo(
|
||||
() => list.find((item) => item.value === formatValue)?.label || t('common.UnKnow'),
|
||||
() => list.find((item) => item.value === formatValue)?.label || t('common:common.UnKnow'),
|
||||
[formatValue, list, t]
|
||||
);
|
||||
|
||||
@@ -82,10 +82,10 @@ const TTSSelect = ({
|
||||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/tts'} mr={2} w={'20px'} />
|
||||
<FormLabel>{t('core.app.TTS')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.TTS')}</FormLabel>
|
||||
<ChatFunctionTip type={'tts'} />
|
||||
<Box flex={1} />
|
||||
<MyTooltip label={t('core.app.Select TTS')}>
|
||||
<MyTooltip label={t('common:core.app.Select TTS')}>
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
iconSpacing={1}
|
||||
@@ -100,7 +100,7 @@ const TTSSelect = ({
|
||||
title={
|
||||
<>
|
||||
<MyIcon name={'core/app/simpleMode/tts'} mr={2} w={'20px'} />
|
||||
{t('core.app.TTS')}
|
||||
{t('common:core.app.TTS')}
|
||||
</>
|
||||
}
|
||||
isOpen={isOpen}
|
||||
@@ -109,11 +109,11 @@ const TTSSelect = ({
|
||||
>
|
||||
<ModalBody px={[5, 16]} py={[4, 8]}>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.tts.Speech model')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.tts.Speech model')}</FormLabel>
|
||||
<MySelect w={'220px'} value={formatValue} list={list} onchange={onclickChange} />
|
||||
</Flex>
|
||||
<Flex mt={8} justifyContent={'space-between'}>
|
||||
<FormLabel>{t('core.app.tts.Speech speed')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.tts.Speech speed')}</FormLabel>
|
||||
<MySlider
|
||||
markList={[
|
||||
{ label: '0.3', value: 0.3 },
|
||||
@@ -145,7 +145,7 @@ const TTSSelect = ({
|
||||
leftIcon={<MyIcon name={'core/chat/stopSpeech'} w={'16px'} />}
|
||||
onClick={cancelAudio}
|
||||
>
|
||||
{t('core.chat.tts.Stop Speech')}
|
||||
{t('common:core.chat.tts.Stop Speech')}
|
||||
</Button>
|
||||
</Flex>
|
||||
) : (
|
||||
@@ -154,11 +154,11 @@ const TTSSelect = ({
|
||||
leftIcon={<MyIcon name={'core/app/headphones'} w={'16px'} />}
|
||||
onClick={() => {
|
||||
playAudioByText({
|
||||
text: t('core.app.tts.Test Listen Text')
|
||||
text: t('common:core.app.tts.Test Listen Text')
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t('core.app.tts.Test Listen')}
|
||||
{t('common:core.app.tts.Test Listen')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
@@ -25,26 +25,26 @@ const ChatFunctionTip = ({ type }: { type: `${FnTypeEnum}` }) => {
|
||||
},
|
||||
[FnTypeEnum.nextQuestion]: {
|
||||
icon: '/imgs/app/nextQuestion-icon.svg',
|
||||
title: t('core.app.Question Guide'),
|
||||
desc: t('core.app.Question Guide Tip'),
|
||||
title: t('common:core.app.Question Guide'),
|
||||
desc: t('common:core.app.Question Guide Tip'),
|
||||
imgUrl: '/imgs/app/nextQuestion.svg'
|
||||
},
|
||||
[FnTypeEnum.tts]: {
|
||||
icon: '/imgs/app/tts-icon.svg',
|
||||
title: t('core.app.TTS'),
|
||||
desc: t('core.app.TTS Tip'),
|
||||
title: t('common:core.app.TTS'),
|
||||
desc: t('common:core.app.TTS Tip'),
|
||||
imgUrl: '/imgs/app/tts.svg'
|
||||
},
|
||||
[FnTypeEnum.variable]: {
|
||||
icon: '/imgs/app/variable-icon.svg',
|
||||
title: t('core.module.Variable'),
|
||||
desc: t('core.app.tip.variableTip'),
|
||||
title: t('common:core.module.Variable'),
|
||||
desc: t('common:core.app.tip.variableTip'),
|
||||
imgUrl: '/imgs/app/variable.svg'
|
||||
},
|
||||
[FnTypeEnum.welcome]: {
|
||||
icon: '/imgs/app/welcome-icon.svg',
|
||||
title: t('core.app.Welcome Text'),
|
||||
desc: t('core.app.tip.welcomeTextTip'),
|
||||
title: t('common:core.app.Welcome Text'),
|
||||
desc: t('common:core.app.tip.welcomeTextTip'),
|
||||
imgUrl: '/imgs/app/welcome.svg'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ const VariableEdit = ({
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/variable'} w={'20px'} />
|
||||
<FormLabel ml={2} fontWeight={'medium'}>
|
||||
{t('core.module.Variable')}
|
||||
{t('common:core.module.Variable')}
|
||||
</FormLabel>
|
||||
<ChatFunctionTip type={'variable'} />
|
||||
<Box flex={1} />
|
||||
@@ -112,7 +112,7 @@ const VariableEdit = ({
|
||||
onOpenEdit();
|
||||
}}
|
||||
>
|
||||
{t('common.Add New')}
|
||||
{t('common:common.Add New')}
|
||||
</Button>
|
||||
</Flex>
|
||||
{formatVariables.length > 0 && (
|
||||
@@ -127,9 +127,9 @@ const VariableEdit = ({
|
||||
w={'18px !important'}
|
||||
p={0}
|
||||
/>
|
||||
<Th fontSize={'mini'}>{t('core.module.variable.variable name')}</Th>
|
||||
<Th fontSize={'mini'}>{t('core.module.variable.key')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common.Require Input')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.module.variable.variable name')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.module.variable.key')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:common.Require Input')}</Th>
|
||||
<Th fontSize={'mini'} borderRadius={'none !important'}></Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
@@ -171,7 +171,7 @@ const VariableEdit = ({
|
||||
)}
|
||||
<MyModal
|
||||
iconSrc="core/app/simpleMode/variable"
|
||||
title={t('core.module.Variable Setting')}
|
||||
title={t('common:core.module.Variable Setting')}
|
||||
isOpen={isOpenEdit}
|
||||
onClose={onCloseEdit}
|
||||
maxW={['90vw', '500px']}
|
||||
@@ -179,29 +179,29 @@ const VariableEdit = ({
|
||||
<ModalBody>
|
||||
{variableType !== VariableInputEnum.custom && (
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel w={'70px'}>{t('common.Require Input')}</FormLabel>
|
||||
<FormLabel w={'70px'}>{t('common:common.Require Input')}</FormLabel>
|
||||
<Switch {...registerEdit('variable.required')} />
|
||||
</Flex>
|
||||
)}
|
||||
<Flex mt={5} alignItems={'center'}>
|
||||
<FormLabel w={'80px'}>{t('core.module.variable.variable name')}</FormLabel>
|
||||
<FormLabel w={'80px'}>{t('common:core.module.variable.variable name')}</FormLabel>
|
||||
<Input
|
||||
{...registerEdit('variable.label', {
|
||||
required: t('core.module.variable.variable name is required')
|
||||
required: t('common:core.module.variable.variable name is required')
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
<Flex mt={5} alignItems={'center'}>
|
||||
<FormLabel w={'80px'}>{t('core.module.variable.key')}</FormLabel>
|
||||
<FormLabel w={'80px'}>{t('common:core.module.variable.key')}</FormLabel>
|
||||
<Input
|
||||
{...registerEdit('variable.key', {
|
||||
required: t('core.module.variable.key is required')
|
||||
required: t('common:core.module.variable.key is required')
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
||||
<FormLabel mt={5} mb={2}>
|
||||
{t('core.workflow.Variable.Variable type')}
|
||||
{t('common:core.workflow.Variable.Variable type')}
|
||||
</FormLabel>
|
||||
<MyRadio
|
||||
gridGap={4}
|
||||
@@ -226,7 +226,7 @@ const VariableEdit = ({
|
||||
{variableType === VariableInputEnum.input && (
|
||||
<>
|
||||
<FormLabel mt={5} mb={2}>
|
||||
{t('core.module.variable.text max length')}
|
||||
{t('common:core.module.variable.text max length')}
|
||||
</FormLabel>
|
||||
<Box>
|
||||
<NumberInput max={500} min={1} step={1} position={'relative'}>
|
||||
@@ -250,7 +250,7 @@ const VariableEdit = ({
|
||||
{variableType === VariableInputEnum.select && (
|
||||
<>
|
||||
<Box mt={5} mb={2}>
|
||||
{t('core.module.variable.variable options')}
|
||||
{t('common:core.module.variable.variable options')}
|
||||
</Box>
|
||||
<Box>
|
||||
{selectEnums.map((item, i) => (
|
||||
@@ -258,7 +258,9 @@ const VariableEdit = ({
|
||||
<FormControl>
|
||||
<Input
|
||||
{...registerEdit(`variable.enums.${i}.value`, {
|
||||
required: t('core.module.variable.variable option is value is required')
|
||||
required: t(
|
||||
'common:core.module.variable.variable option is value is required'
|
||||
)
|
||||
})}
|
||||
/>
|
||||
</FormControl>
|
||||
@@ -285,7 +287,7 @@ const VariableEdit = ({
|
||||
bg={'myGray.100 !important'}
|
||||
onClick={() => appendEnums({ value: '' })}
|
||||
>
|
||||
{t('core.module.variable add option')}
|
||||
{t('common:core.module.variable add option')}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
@@ -293,7 +295,7 @@ const VariableEdit = ({
|
||||
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onCloseEdit}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleSubmitEdit(({ variable }) => {
|
||||
@@ -303,7 +305,7 @@ const VariableEdit = ({
|
||||
if (enums.length === 0) {
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('core.module.variable.variable option is required')
|
||||
title: t('common:core.module.variable.variable option is required')
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -323,7 +325,9 @@ const VariableEdit = ({
|
||||
onCloseEdit();
|
||||
})}
|
||||
>
|
||||
{getValuesEdit('variable.id') ? t('common.Confirm Update') : t('common.Add New')}
|
||||
{getValuesEdit('variable.id')
|
||||
? t('common:common.Confirm Update')
|
||||
: t('common:common.Add New')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -13,7 +13,7 @@ const WelcomeTextConfig = (props: TextareaProps) => {
|
||||
<>
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/chat'} w={'20px'} />
|
||||
<FormLabel ml={2}>{t('core.app.Welcome Text')}</FormLabel>
|
||||
<FormLabel ml={2}>{t('common:core.app.Welcome Text')}</FormLabel>
|
||||
<ChatFunctionTip type={'welcome'} />
|
||||
</Flex>
|
||||
<MyTextarea
|
||||
@@ -21,7 +21,7 @@ const WelcomeTextConfig = (props: TextareaProps) => {
|
||||
bg={'myWhite.400'}
|
||||
rows={6}
|
||||
fontSize={'sm'}
|
||||
placeholder={t('core.app.tip.welcomeTextTip')}
|
||||
placeholder={t('common:core.app.tip.welcomeTextTip')}
|
||||
{...props}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -26,17 +26,17 @@ const WhisperConfig = ({
|
||||
|
||||
const formLabel = useMemo(() => {
|
||||
if (!isOpenWhisper) {
|
||||
return t('core.app.whisper.Close');
|
||||
return t('common:core.app.whisper.Close');
|
||||
}
|
||||
return t('core.app.whisper.Open');
|
||||
return t('common:core.app.whisper.Open');
|
||||
}, [t, isOpenWhisper]);
|
||||
|
||||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/whisper'} mr={2} w={'20px'} />
|
||||
<FormLabel>{t('core.app.Whisper')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.Whisper')}</FormLabel>
|
||||
<Box flex={1} />
|
||||
<MyTooltip label={t('core.app.Config whisper')}>
|
||||
<MyTooltip label={t('common:core.app.Config whisper')}>
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
iconSpacing={1}
|
||||
@@ -48,14 +48,14 @@ const WhisperConfig = ({
|
||||
</Button>
|
||||
</MyTooltip>
|
||||
<MyModal
|
||||
title={t('core.app.Whisper config')}
|
||||
title={t('common:core.app.Whisper config')}
|
||||
iconSrc="core/app/simpleMode/whisper"
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
>
|
||||
<ModalBody px={[5, 16]} py={[4, 8]}>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.whisper.Switch')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.whisper.Switch')}</FormLabel>
|
||||
<Switch
|
||||
isChecked={isOpenWhisper}
|
||||
onChange={(e) => {
|
||||
@@ -68,8 +68,8 @@ const WhisperConfig = ({
|
||||
</Flex>
|
||||
{isOpenWhisper && (
|
||||
<Flex mt={8} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.whisper.Auto send')}</FormLabel>
|
||||
<QuestionTip label={t('core.app.whisper.Auto send tip')} />
|
||||
<FormLabel>{t('common:core.app.whisper.Auto send')}</FormLabel>
|
||||
<QuestionTip label={t('common:core.app.whisper.Auto send tip')} />
|
||||
<Box flex={'1 0 0'} />
|
||||
<Switch
|
||||
isChecked={value.autoSend}
|
||||
@@ -85,8 +85,8 @@ const WhisperConfig = ({
|
||||
{isOpenWhisper && isAutoSend && (
|
||||
<>
|
||||
<Flex mt={8} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.whisper.Auto tts response')}</FormLabel>
|
||||
<QuestionTip label={t('core.app.whisper.Auto tts response tip')} />
|
||||
<FormLabel>{t('common:core.app.whisper.Auto tts response')}</FormLabel>
|
||||
<QuestionTip label={t('common:core.app.whisper.Auto tts response tip')} />
|
||||
<Box flex={'1 0 0'} />
|
||||
<Switch
|
||||
isChecked={value.autoTTSResponse}
|
||||
@@ -100,7 +100,7 @@ const WhisperConfig = ({
|
||||
</Flex>
|
||||
{!isOpenAudio && (
|
||||
<Box mt={1} color={'myGray.600'} fontSize={'sm'}>
|
||||
{t('core.app.whisper.Not tts tip')}
|
||||
{t('common:core.app.whisper.Not tts tip')}
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -95,7 +95,7 @@ const ChatInput = ({
|
||||
}
|
||||
}
|
||||
},
|
||||
errorToast: t('common.Upload File Failed')
|
||||
errorToast: t('common:common.Upload File Failed')
|
||||
});
|
||||
const onSelectFile = useCallback(
|
||||
async (files: File[]) => {
|
||||
@@ -257,7 +257,7 @@ const ChatInput = ({
|
||||
visibility={isSpeaking && isTransCription ? 'visible' : 'hidden'}
|
||||
>
|
||||
<Spinner size={'sm'} mr={4} />
|
||||
{t('core.chat.Converting to text')}
|
||||
{t('common:core.chat.Converting to text')}
|
||||
</Flex>
|
||||
|
||||
{/* file preview */}
|
||||
@@ -336,7 +336,7 @@ const ChatInput = ({
|
||||
onOpenSelectFile();
|
||||
}}
|
||||
>
|
||||
<MyTooltip label={t('core.chat.Select Image')}>
|
||||
<MyTooltip label={t('common:core.chat.Select Image')}>
|
||||
<MyIcon name={'core/chat/fileSelect'} w={'18px'} color={'myGray.600'} />
|
||||
</MyTooltip>
|
||||
<File onSelect={onSelectFile} />
|
||||
@@ -353,7 +353,9 @@ const ChatInput = ({
|
||||
_focusVisible={{
|
||||
border: 'none'
|
||||
}}
|
||||
placeholder={isSpeaking ? t('core.chat.Speaking') : t('core.chat.Type a message')}
|
||||
placeholder={
|
||||
isSpeaking ? t('common:core.chat.Speaking') : t('common:core.chat.Type a message')
|
||||
}
|
||||
resize={'none'}
|
||||
rows={1}
|
||||
height={'22px'}
|
||||
@@ -430,7 +432,7 @@ const ChatInput = ({
|
||||
}}
|
||||
/>
|
||||
{isSpeaking && (
|
||||
<MyTooltip label={t('core.chat.Cancel Speak')}>
|
||||
<MyTooltip label={t('common:core.chat.Cancel Speak')}>
|
||||
<Flex
|
||||
mr={2}
|
||||
alignItems={'center'}
|
||||
@@ -451,7 +453,11 @@ const ChatInput = ({
|
||||
</Flex>
|
||||
</MyTooltip>
|
||||
)}
|
||||
<MyTooltip label={isSpeaking ? t('core.chat.Finish Speak') : t('core.chat.Record')}>
|
||||
<MyTooltip
|
||||
label={
|
||||
isSpeaking ? t('common:core.chat.Finish Speak') : t('common:core.chat.Record')
|
||||
}
|
||||
>
|
||||
<Flex
|
||||
mr={2}
|
||||
alignItems={'center'}
|
||||
@@ -513,7 +519,7 @@ const ChatInput = ({
|
||||
color={'gray.500'}
|
||||
/>
|
||||
) : (
|
||||
<MyTooltip label={t('core.chat.Send Message')}>
|
||||
<MyTooltip label={t('common:core.chat.Send Message')}>
|
||||
<MyIcon
|
||||
name={'core/chat/sendFill'}
|
||||
width={['18px', '20px']}
|
||||
|
||||
@@ -94,7 +94,7 @@ export default function InputGuideBox({
|
||||
<Box fontSize={'sm'} flex={'1 0 0'}>
|
||||
<HighlightText rawText={item} matchText={text} />
|
||||
</Box>
|
||||
<MyTooltip label={t('core.chat.markdown.Send Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Send Question')}>
|
||||
<MyIcon
|
||||
className="send-icon"
|
||||
display={'none'}
|
||||
|
||||
@@ -79,7 +79,7 @@ const ChatController = ({
|
||||
}
|
||||
})}
|
||||
>
|
||||
<MyTooltip label={t('common.Copy')}>
|
||||
<MyTooltip label={t('common:common.Copy')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'copy'}
|
||||
@@ -90,7 +90,7 @@ const ChatController = ({
|
||||
{!!onDelete && !isChatting && (
|
||||
<>
|
||||
{onRetry && (
|
||||
<MyTooltip label={t('core.chat.retry')}>
|
||||
<MyTooltip label={t('common:core.chat.retry')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'common/retryLight'}
|
||||
@@ -99,7 +99,7 @@ const ChatController = ({
|
||||
/>
|
||||
</MyTooltip>
|
||||
)}
|
||||
<MyTooltip label={t('common.Delete')}>
|
||||
<MyTooltip label={t('common:common.Delete')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'delete'}
|
||||
@@ -116,7 +116,7 @@ const ChatController = ({
|
||||
if (isPlayingChat && audioPlaying) {
|
||||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyTooltip label={t('core.chat.tts.Stop Speech')}>
|
||||
<MyTooltip label={t('common:core.chat.tts.Stop Speech')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
borderRight={'none'}
|
||||
@@ -136,13 +136,13 @@ const ChatController = ({
|
||||
}
|
||||
if (isPlayingChat && audioLoading) {
|
||||
return (
|
||||
<MyTooltip label={t('common.Loading')}>
|
||||
<MyTooltip label={t('common:common.Loading')}>
|
||||
<MyIcon {...controlIconStyle} name={'common/loading'} />
|
||||
</MyTooltip>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<MyTooltip label={t('core.app.TTS start')}>
|
||||
<MyTooltip label={t('common:core.app.TTS start')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'common/voiceLight'}
|
||||
@@ -171,7 +171,7 @@ const ChatController = ({
|
||||
);
|
||||
})()}
|
||||
{!!onMark && (
|
||||
<MyTooltip label={t('core.chat.Mark')}>
|
||||
<MyTooltip label={t('common:core.chat.Mark')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'core/app/markLight'}
|
||||
@@ -183,7 +183,7 @@ const ChatController = ({
|
||||
{chat.obj === ChatRoleEnum.AI && (
|
||||
<>
|
||||
{!!onCloseUserLike && chat.userGoodFeedback && (
|
||||
<MyTooltip label={t('core.chat.feedback.Close User Like')}>
|
||||
<MyTooltip label={t('common:core.chat.feedback.Close User Like')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
color={'white'}
|
||||
@@ -195,7 +195,7 @@ const ChatController = ({
|
||||
</MyTooltip>
|
||||
)}
|
||||
{!!onReadUserDislike && chat.userBadFeedback && (
|
||||
<MyTooltip label={t('core.chat.feedback.Read User dislike')}>
|
||||
<MyTooltip label={t('common:core.chat.feedback.Read User dislike')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
color={'white'}
|
||||
|
||||
@@ -31,7 +31,7 @@ const FeedbackModal = ({
|
||||
|
||||
const { mutate, isLoading } = useRequest({
|
||||
mutationFn: async () => {
|
||||
const val = ref.current?.value || t('core.chat.feedback.No Content');
|
||||
const val = ref.current?.value || t('common:core.chat.feedback.No Content');
|
||||
return updateChatUserFeedback({
|
||||
appId,
|
||||
chatId,
|
||||
@@ -44,10 +44,10 @@ const FeedbackModal = ({
|
||||
});
|
||||
},
|
||||
onSuccess() {
|
||||
onSuccess(ref.current?.value || t('core.chat.feedback.No Content'));
|
||||
onSuccess(ref.current?.value || t('common:core.chat.feedback.No Content'));
|
||||
},
|
||||
successToast: t('core.chat.Feedback Success'),
|
||||
errorToast: t('core.chat.Feedback Failed')
|
||||
successToast: t('common:core.chat.Feedback Success'),
|
||||
errorToast: t('common:core.chat.Feedback Failed')
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -55,17 +55,17 @@ const FeedbackModal = ({
|
||||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/badAnswer.svg"
|
||||
title={t('core.chat.Feedback Modal')}
|
||||
title={t('common:core.chat.Feedback Modal')}
|
||||
>
|
||||
<ModalBody>
|
||||
<Textarea ref={ref} rows={10} placeholder={t('core.chat.Feedback Modal Tip')} />
|
||||
<Textarea ref={ref} rows={10} placeholder={t('common:core.chat.Feedback Modal Tip')} />
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={2} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button isLoading={isLoading} onClick={mutate}>
|
||||
{t('core.chat.Feedback Submit')}
|
||||
{t('common:core.chat.Feedback Submit')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -51,7 +51,7 @@ const QuoteModal = ({
|
||||
<>{t('core.chat.Quote Amount', { amount: rawSearch.length })}</>
|
||||
)}
|
||||
<Box fontSize={'xs'} color={'myGray.500'} fontWeight={'normal'}>
|
||||
{t('core.chat.quote.Quote Tip')}
|
||||
{t('common:core.chat.quote.Quote Tip')}
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@ const ReadFeedbackModal = ({
|
||||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/readFeedback.svg"
|
||||
title={t('core.chat.Feedback Modal')}
|
||||
title={t('common:core.chat.Feedback Modal')}
|
||||
>
|
||||
<ModalBody>{content}</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button mr={2} onClick={onCloseFeedback}>
|
||||
{t('core.chat.feedback.Feedback Close')}
|
||||
{t('common:core.chat.feedback.Feedback Close')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -102,10 +102,10 @@ const ResponseTags = ({
|
||||
<>
|
||||
{sourceList.length > 0 && (
|
||||
<>
|
||||
<ChatBoxDivider icon="core/chat/quoteFill" text={t('core.chat.Quote')} />
|
||||
<ChatBoxDivider icon="core/chat/quoteFill" text={t('common:core.chat.Quote')} />
|
||||
<Flex alignItems={'center'} flexWrap={'wrap'} gap={2}>
|
||||
{sourceList.map((item) => (
|
||||
<MyTooltip key={item.collectionId} label={t('core.chat.quote.Read Quote')}>
|
||||
<MyTooltip key={item.collectionId} label={t('common:core.chat.quote.Read Quote')}>
|
||||
<Flex
|
||||
alignItems={'center'}
|
||||
fontSize={'xs'}
|
||||
@@ -186,14 +186,14 @@ const ResponseTags = ({
|
||||
</MyTag>
|
||||
</MyTooltip>
|
||||
)}
|
||||
<MyTooltip label={t('core.chat.response.Read complete response tips')}>
|
||||
<MyTooltip label={t('common:core.chat.response.Read complete response tips')}>
|
||||
<MyTag
|
||||
colorSchema="gray"
|
||||
type="borderSolid"
|
||||
cursor={'pointer'}
|
||||
onClick={onOpenWholeModal}
|
||||
>
|
||||
{t('core.chat.response.Read complete response')}
|
||||
{t('common:core.chat.response.Read complete response')}
|
||||
</MyTag>
|
||||
</MyTooltip>
|
||||
</Flex>
|
||||
|
||||
@@ -45,7 +45,7 @@ const SelectMarkCollection = ({
|
||||
onClose={onClose}
|
||||
setParentId={setParentId}
|
||||
isLoading={isFetching}
|
||||
tips={t('core.chat.Select dataset Desc')}
|
||||
tips={t('common:core.chat.Select dataset Desc')}
|
||||
>
|
||||
<ModalBody flex={'1 0 0'} overflowY={'auto'}>
|
||||
<Grid
|
||||
@@ -100,7 +100,7 @@ const SelectMarkCollection = ({
|
||||
<SelectCollections
|
||||
datasetId={adminMarkData.datasetId}
|
||||
type={'collection'}
|
||||
title={t('dataset.collections.Select One Collection To Store')}
|
||||
title={t('common:dataset.collections.Select One Collection To Store')}
|
||||
onClose={onClose}
|
||||
onChange={({ collectionIds }) => {
|
||||
setAdminMarkData({
|
||||
@@ -120,7 +120,7 @@ const SelectMarkCollection = ({
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t('common.Last Step')}
|
||||
{t('common:common.Last Step')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ const VariableInput = ({
|
||||
chatForm.setValue('chatStarted', true);
|
||||
})}
|
||||
>
|
||||
{t('core.chat.Start Chat')}
|
||||
{t('common:core.chat.Start Chat')}
|
||||
</Button>
|
||||
)}
|
||||
</Card>
|
||||
|
||||
@@ -814,7 +814,7 @@ const ChatBox = (
|
||||
|
||||
return {
|
||||
status: chatContent.status || 'loading',
|
||||
name: t(chatContent.moduleName || '') || t('common.Loading')
|
||||
name: t(chatContent.moduleName || '') || t('common:common.Loading')
|
||||
};
|
||||
}, [chatHistories, isChatting, t]);
|
||||
|
||||
@@ -935,11 +935,13 @@ const ChatBox = (
|
||||
<Box>
|
||||
<ChatBoxDivider
|
||||
icon={'core/app/customFeedback'}
|
||||
text={t('core.app.feedback.Custom feedback')}
|
||||
text={t('common:core.app.feedback.Custom feedback')}
|
||||
/>
|
||||
{item.customFeedbacks.map((text, i) => (
|
||||
<Box key={`${text}${i}`}>
|
||||
<MyTooltip label={t('core.app.feedback.close custom feedback')}>
|
||||
<MyTooltip
|
||||
label={t('common:core.app.feedback.close custom feedback')}
|
||||
>
|
||||
<Checkbox onChange={onCloseCustomFeedback(item, i)}>
|
||||
{text}
|
||||
</Checkbox>
|
||||
@@ -953,7 +955,7 @@ const ChatBox = (
|
||||
<Box fontSize={'sm'}>
|
||||
<ChatBoxDivider
|
||||
icon="core/app/markLight"
|
||||
text={t('core.chat.Admin Mark Content')}
|
||||
text={t('common:core.chat.Admin Mark Content')}
|
||||
/>
|
||||
<Box whiteSpace={'pre-wrap'}>
|
||||
<Box color={'black'}>{item.adminFeedback.q}</Box>
|
||||
|
||||
@@ -58,7 +58,7 @@ const RenderInput = () => {
|
||||
handleSubmit(onSubmit)();
|
||||
}}
|
||||
>
|
||||
{histories.length > 0 ? t('common.Restart') : t('common.Run')}
|
||||
{histories.length > 0 ? t('common:common.Restart') : t('common:common.Run')}
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
|
||||
@@ -96,7 +96,7 @@ const WholeResponseModal = ({
|
||||
iconSrc="/imgs/modal/wholeRecord.svg"
|
||||
title={
|
||||
<Flex alignItems={'center'}>
|
||||
{t('core.chat.response.Complete Response')}
|
||||
{t('common:core.chat.response.Complete Response')}
|
||||
<QuestionTip ml={2} label={'从左往右,为各个模块的响应顺序'}></QuestionTip>
|
||||
</Flex>
|
||||
}
|
||||
@@ -175,27 +175,33 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
})}
|
||||
>
|
||||
<>
|
||||
<Row label={t('core.chat.response.module name')} value={t(activeModule.moduleName)} />
|
||||
<Row
|
||||
label={t('common:core.chat.response.module name')}
|
||||
value={t(activeModule.moduleName)}
|
||||
/>
|
||||
{activeModule?.totalPoints !== undefined && (
|
||||
<Row
|
||||
label={t('support.wallet.usage.Total points')}
|
||||
label={t('common:support.wallet.usage.Total points')}
|
||||
value={formatNumber(activeModule.totalPoints)}
|
||||
/>
|
||||
)}
|
||||
<Row
|
||||
label={t('core.chat.response.module time')}
|
||||
label={t('common:core.chat.response.module time')}
|
||||
value={`${activeModule?.runningTime || 0}s`}
|
||||
/>
|
||||
<Row label={t('core.chat.response.module model')} value={activeModule?.model} />
|
||||
<Row label={t('core.chat.response.module tokens')} value={`${activeModule?.tokens}`} />
|
||||
<Row label={t('common:core.chat.response.module model')} value={activeModule?.model} />
|
||||
<Row
|
||||
label={t('core.chat.response.Tool call tokens')}
|
||||
label={t('common:core.chat.response.module tokens')}
|
||||
value={`${activeModule?.tokens}`}
|
||||
/>
|
||||
<Row
|
||||
label={t('common:core.chat.response.Tool call tokens')}
|
||||
value={`${activeModule?.toolCallTokens}`}
|
||||
/>
|
||||
|
||||
<Row label={t('core.chat.response.module query')} value={activeModule?.query} />
|
||||
<Row label={t('common:core.chat.response.module query')} value={activeModule?.query} />
|
||||
<Row
|
||||
label={t('core.chat.response.context total length')}
|
||||
label={t('common:core.chat.response.context total length')}
|
||||
value={activeModule?.contextTotalLen}
|
||||
/>
|
||||
<Row label={workflowT('response.Error')} value={activeModule?.error} />
|
||||
@@ -204,12 +210,15 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
{/* ai chat */}
|
||||
<>
|
||||
<Row
|
||||
label={t('core.chat.response.module temperature')}
|
||||
label={t('common:core.chat.response.module temperature')}
|
||||
value={activeModule?.temperature}
|
||||
/>
|
||||
<Row label={t('core.chat.response.module maxToken')} value={activeModule?.maxToken} />
|
||||
<Row
|
||||
label={t('core.chat.response.module historyPreview')}
|
||||
label={t('common:core.chat.response.module maxToken')}
|
||||
value={activeModule?.maxToken}
|
||||
/>
|
||||
<Row
|
||||
label={t('common:core.chat.response.module historyPreview')}
|
||||
rawDom={
|
||||
activeModule.historyPreview ? (
|
||||
<Box px={3} py={2} border={theme.borders.base} borderRadius={'md'}>
|
||||
@@ -239,31 +248,31 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
<>
|
||||
{activeModule?.searchMode && (
|
||||
<Row
|
||||
label={t('core.dataset.search.search mode')}
|
||||
label={t('common:core.dataset.search.search mode')}
|
||||
// @ts-ignore
|
||||
value={t(DatasetSearchModeMap[activeModule.searchMode]?.title)}
|
||||
/>
|
||||
)}
|
||||
<Row
|
||||
label={t('core.chat.response.module similarity')}
|
||||
label={t('common:core.chat.response.module similarity')}
|
||||
value={activeModule?.similarity}
|
||||
/>
|
||||
<Row label={t('core.chat.response.module limit')} value={activeModule?.limit} />
|
||||
<Row label={t('common:core.chat.response.module limit')} value={activeModule?.limit} />
|
||||
<Row
|
||||
label={t('core.chat.response.search using reRank')}
|
||||
label={t('common:core.chat.response.search using reRank')}
|
||||
value={`${activeModule?.searchUsingReRank}`}
|
||||
/>
|
||||
<Row
|
||||
label={t('core.chat.response.Extension model')}
|
||||
label={t('common:core.chat.response.Extension model')}
|
||||
value={activeModule?.extensionModel}
|
||||
/>
|
||||
<Row
|
||||
label={t('support.wallet.usage.Extension result')}
|
||||
label={t('common:support.wallet.usage.Extension result')}
|
||||
value={`${activeModule?.extensionResult}`}
|
||||
/>
|
||||
{activeModule.quoteList && activeModule.quoteList.length > 0 && (
|
||||
<Row
|
||||
label={t('core.chat.response.module quoteList')}
|
||||
label={t('common:core.chat.response.module quoteList')}
|
||||
rawDom={<QuoteList showDetail={showDetail} rawSearch={activeModule.quoteList} />}
|
||||
/>
|
||||
)}
|
||||
@@ -271,9 +280,12 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
|
||||
{/* classify question */}
|
||||
<>
|
||||
<Row label={t('core.chat.response.module cq result')} value={activeModule?.cqResult} />
|
||||
<Row
|
||||
label={t('core.chat.response.module cq')}
|
||||
label={t('common:core.chat.response.module cq result')}
|
||||
value={activeModule?.cqResult}
|
||||
/>
|
||||
<Row
|
||||
label={t('common:core.chat.response.module cq')}
|
||||
value={(() => {
|
||||
if (!activeModule?.cqList) return '';
|
||||
return activeModule.cqList.map((item) => `* ${item.value}`).join('\n');
|
||||
@@ -284,7 +296,7 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
{/* if-else */}
|
||||
<>
|
||||
<Row
|
||||
label={t('core.chat.response.module if else Result')}
|
||||
label={t('common:core.chat.response.module if else Result')}
|
||||
value={activeModule?.ifElseResult}
|
||||
/>
|
||||
</>
|
||||
@@ -292,11 +304,11 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
{/* extract */}
|
||||
<>
|
||||
<Row
|
||||
label={t('core.chat.response.module extract description')}
|
||||
label={t('common:core.chat.response.module extract description')}
|
||||
value={activeModule?.extractDescription}
|
||||
/>
|
||||
<Row
|
||||
label={t('core.chat.response.module extract result')}
|
||||
label={t('common:core.chat.response.module extract result')}
|
||||
value={activeModule?.extractResult}
|
||||
/>
|
||||
</>
|
||||
@@ -307,17 +319,20 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
<Row label={'Params'} value={activeModule?.params} />
|
||||
<Row label={'Body'} value={activeModule?.body} />
|
||||
<Row
|
||||
label={t('core.chat.response.module http result')}
|
||||
label={t('common:core.chat.response.module http result')}
|
||||
value={activeModule?.httpResult}
|
||||
/>
|
||||
</>
|
||||
|
||||
{/* plugin */}
|
||||
<>
|
||||
<Row label={t('core.chat.response.plugin output')} value={activeModule?.pluginOutput} />
|
||||
<Row
|
||||
label={t('common:core.chat.response.plugin output')}
|
||||
value={activeModule?.pluginOutput}
|
||||
/>
|
||||
{activeModule?.pluginDetail && activeModule?.pluginDetail.length > 0 && (
|
||||
<Row
|
||||
label={t('core.chat.response.Plugin response detail')}
|
||||
label={t('common:core.chat.response.Plugin response detail')}
|
||||
rawDom={
|
||||
<ResponseBox response={activeModule.pluginDetail} showDetail={showDetail} />
|
||||
}
|
||||
@@ -326,12 +341,15 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
</>
|
||||
|
||||
{/* text output */}
|
||||
<Row label={t('core.chat.response.text output')} value={activeModule?.textOutput} />
|
||||
<Row
|
||||
label={t('common:core.chat.response.text output')}
|
||||
value={activeModule?.textOutput}
|
||||
/>
|
||||
|
||||
{/* tool call */}
|
||||
{activeModule?.toolDetail && activeModule?.toolDetail.length > 0 && (
|
||||
<Row
|
||||
label={t('core.chat.response.Tool call response detail')}
|
||||
label={t('common:core.chat.response.Tool call response detail')}
|
||||
rawDom={<ResponseBox response={activeModule.toolDetail} showDetail={showDetail} />}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -209,7 +209,7 @@ const QuoteItem = ({
|
||||
color={'myGray.500'}
|
||||
fontSize={'xs'}
|
||||
>
|
||||
<MyTooltip label={t('core.dataset.Quote Length')}>
|
||||
<MyTooltip label={t('common:core.dataset.Quote Length')}>
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name="common/text/t" w={'14px'} mr={1} color={'myGray.500'} />
|
||||
{quoteItem.q.length + (quoteItem.a?.length || 0)}
|
||||
@@ -225,7 +225,7 @@ const QuoteItem = ({
|
||||
/>
|
||||
<Box flex={1} />
|
||||
{quoteItem.id && (
|
||||
<MyTooltip label={t('core.dataset.data.Edit')}>
|
||||
<MyTooltip label={t('common:core.dataset.data.Edit')}>
|
||||
<Box
|
||||
className="hover-data"
|
||||
visibility={'hidden'}
|
||||
@@ -261,7 +261,7 @@ const QuoteItem = ({
|
||||
color={'primary.500'}
|
||||
href={`/dataset/detail?datasetId=${quoteItem.datasetId}¤tTab=dataCard&collectionId=${quoteItem.collectionId}`}
|
||||
>
|
||||
{t('core.dataset.Go Dataset')}
|
||||
{t('common:core.dataset.Go Dataset')}
|
||||
<MyIcon name={'common/rightArrowLight'} w={'10px'} />
|
||||
</Link>
|
||||
)}
|
||||
|
||||
@@ -54,7 +54,7 @@ const RawSourceBox = ({
|
||||
className={props.className ?? 'textEllipsis'}
|
||||
wordBreak={'break-all'}
|
||||
>
|
||||
{sourceName || t('common.UnKnow Source')}
|
||||
{sourceName || t('common:common.UnKnow Source')}
|
||||
</Box>
|
||||
</Box>
|
||||
</MyTooltip>
|
||||
|
||||
@@ -49,13 +49,13 @@ const SearchParamsTip = ({
|
||||
<Table fontSize={'xs'} overflow={'overlay'}>
|
||||
<Thead>
|
||||
<Tr bg={'transparent !important'}>
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.search mode')}</Th>
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.Max Tokens')}</Th>
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.Min Similarity')}</Th>
|
||||
{hasReRankModel && <Th fontSize={'mini'}>{t('core.dataset.search.ReRank')}</Th>}
|
||||
<Th fontSize={'mini'}>{t('core.module.template.Query extension')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.search mode')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.Max Tokens')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.Min Similarity')}</Th>
|
||||
{hasReRankModel && <Th fontSize={'mini'}>{t('common:core.dataset.search.ReRank')}</Th>}
|
||||
<Th fontSize={'mini'}>{t('common:core.module.template.Query extension')}</Th>
|
||||
{hasEmptyResponseMode && (
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.Empty result response')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.Empty result response')}</Th>
|
||||
)}
|
||||
</Tr>
|
||||
</Thead>
|
||||
@@ -75,7 +75,7 @@ const SearchParamsTip = ({
|
||||
{limit}
|
||||
</Td>
|
||||
<Td pt={0} pb={2}>
|
||||
{hasSimilarityMode ? similarity : t('core.dataset.search.Nonsupport')}
|
||||
{hasSimilarityMode ? similarity : t('common:core.dataset.search.Nonsupport')}
|
||||
</Td>
|
||||
{hasReRankModel && (
|
||||
<Td pt={0} pb={2}>
|
||||
|
||||
@@ -41,7 +41,7 @@ const DatasetSelectContainer = ({
|
||||
parentId: path.parentId,
|
||||
parentName: path.parentName
|
||||
}))}
|
||||
FirstPathDom={t('core.chat.Select dataset')}
|
||||
FirstPathDom={t('common:core.chat.Select dataset')}
|
||||
onClick={(e) => {
|
||||
setParentId(e);
|
||||
}}
|
||||
|
||||
@@ -96,7 +96,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
<Box flex={1}>
|
||||
<Flex alignItems={'flex-end'}>
|
||||
<Box color={'myGray.900'} fontSize={'lg'}>
|
||||
{t('support.openapi.Api manager')}
|
||||
{t('common:support.openapi.Api manager')}
|
||||
</Box>
|
||||
{feConfigs?.docUrl && (
|
||||
<Link
|
||||
@@ -106,7 +106,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
color={'primary.500'}
|
||||
fontSize={'sm'}
|
||||
>
|
||||
{t('common.Read document')}
|
||||
{t('common:common.Read document')}
|
||||
</Link>
|
||||
)}
|
||||
</Flex>
|
||||
@@ -122,10 +122,10 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
borderRadius={'md'}
|
||||
cursor={'pointer'}
|
||||
userSelect={'none'}
|
||||
onClick={() => copyData(baseUrl, t('support.openapi.Copy success'))}
|
||||
onClick={() => copyData(baseUrl, t('common:support.openapi.Copy success'))}
|
||||
>
|
||||
<Box border={theme.borders.md} px={2} borderRadius={'md'} fontSize={'xs'}>
|
||||
{t('support.openapi.Api baseurl')}
|
||||
{t('common:support.openapi.Api baseurl')}
|
||||
</Box>
|
||||
<Box ml={2} fontSize={'sm'}>
|
||||
{baseUrl}
|
||||
@@ -143,7 +143,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
})
|
||||
}
|
||||
>
|
||||
{t('New Create')}
|
||||
{t('common:New Create')}
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
@@ -151,17 +151,17 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{t('Name')}</Th>
|
||||
<Th>{t('common:Name')}</Th>
|
||||
<Th>Api Key</Th>
|
||||
<Th>{t('support.outlink.Usage points')}</Th>
|
||||
<Th>{t('common:support.outlink.Usage points')}</Th>
|
||||
{feConfigs?.isPlus && (
|
||||
<>
|
||||
<Th>{t('common.Expired Time')}</Th>
|
||||
<Th>{t('common:common.Expired Time')}</Th>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Th>{t('common.Create Time')}</Th>
|
||||
<Th>{t('common.Last use time')}</Th>
|
||||
<Th>{t('common:common.Create Time')}</Th>
|
||||
<Th>{t('common:common.Last use time')}</Th>
|
||||
<Th />
|
||||
</Tr>
|
||||
</Thead>
|
||||
@@ -174,7 +174,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
{Math.round(usagePoints)}/
|
||||
{feConfigs?.isPlus && limit?.maxUsagePoints && limit?.maxUsagePoints > -1
|
||||
? `${limit?.maxUsagePoints}`
|
||||
: t('common.Unlimited')}
|
||||
: t('common:common.Unlimited')}
|
||||
</Td>
|
||||
{feConfigs?.isPlus && (
|
||||
<>
|
||||
@@ -189,7 +189,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
<Td whiteSpace={'pre-wrap'}>
|
||||
{lastUsedTime
|
||||
? dayjs(lastUsedTime).format('YYYY/MM/DD\nHH:mm:ss')
|
||||
: t('common.Un used')}
|
||||
: t('common:common.Un used')}
|
||||
</Td>
|
||||
<Td>
|
||||
<MyMenu
|
||||
@@ -207,7 +207,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
{
|
||||
children: [
|
||||
{
|
||||
label: t('common.Edit'),
|
||||
label: t('common:common.Edit'),
|
||||
icon: 'edit',
|
||||
onClick: () =>
|
||||
setEditData({
|
||||
@@ -218,7 +218,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
})
|
||||
},
|
||||
{
|
||||
label: t('common.Delete'),
|
||||
label: t('common:common.Delete'),
|
||||
icon: 'delete',
|
||||
type: 'danger',
|
||||
onClick: () => openConfirm(() => onclickRemove(_id))()
|
||||
@@ -256,9 +256,9 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
iconSrc="/imgs/modal/key.svg"
|
||||
title={
|
||||
<Box>
|
||||
<Box fontWeight={'bold'}>{t('support.openapi.New api key')}</Box>
|
||||
<Box fontWeight={'bold'}>{t('common:support.openapi.New api key')}</Box>
|
||||
<Box fontSize={'xs'} color={'myGray.600'}>
|
||||
{t('support.openapi.New api key tip')}
|
||||
{t('common:support.openapi.New api key tip')}
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
@@ -281,7 +281,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant="whiteBase" onClick={() => setApiKey('')}>
|
||||
{t('common.OK')}
|
||||
{t('common:common.OK')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
@@ -338,12 +338,12 @@ function EditKeyModal({
|
||||
>
|
||||
<ModalBody>
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel flex={'0 0 90px'}>{t('Name')}</FormLabel>
|
||||
<FormLabel flex={'0 0 90px'}>{t('common:Name')}</FormLabel>
|
||||
<Input
|
||||
placeholder={publishT('key alias') || 'key alias'}
|
||||
maxLength={20}
|
||||
{...register('name', {
|
||||
required: t('common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
@@ -351,8 +351,11 @@ function EditKeyModal({
|
||||
<>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<FormLabel display={'flex'} flex={'0 0 90px'} alignItems={'center'}>
|
||||
{t('support.outlink.Max usage points')}
|
||||
<QuestionTip ml={1} label={t('support.outlink.Max usage points tip')}></QuestionTip>
|
||||
{t('common:support.outlink.Max usage points')}
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('common:support.outlink.Max usage points tip')}
|
||||
></QuestionTip>
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register('limit.maxUsagePoints', {
|
||||
@@ -364,7 +367,7 @@ function EditKeyModal({
|
||||
/>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<FormLabel flex={'0 0 90px'}>{t('common.Expired Time')}</FormLabel>
|
||||
<FormLabel flex={'0 0 90px'}>{t('common:common.Expired Time')}</FormLabel>
|
||||
<Input
|
||||
type="datetime-local"
|
||||
defaultValue={
|
||||
@@ -383,14 +386,14 @@ function EditKeyModal({
|
||||
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
isLoading={creating || updating}
|
||||
onClick={submitShareChat((data) => (isEdit ? onclickUpdate(data) : onclickCreate(data)))}
|
||||
>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -55,7 +55,7 @@ const LafAccountModal = ({
|
||||
const token = await postLafPat2Token(pat);
|
||||
setValue('token', token);
|
||||
},
|
||||
errorToast: t('plugin.Invalid Env')
|
||||
errorToast: t('common:plugin.Invalid Env')
|
||||
});
|
||||
|
||||
const { data: appListData = [] } = useQuery(
|
||||
@@ -91,18 +91,18 @@ const LafAccountModal = ({
|
||||
initUserInfo();
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.Update Success'),
|
||||
errorToast: t('common.Update Failed')
|
||||
successToast: t('common:common.Update Success'),
|
||||
errorToast: t('common:common.Update Failed')
|
||||
});
|
||||
|
||||
return (
|
||||
<MyModal isOpen iconSrc="/imgs/workflow/laf.png" title={t('user.Laf Account Setting')}>
|
||||
<MyModal isOpen iconSrc="/imgs/workflow/laf.png" title={t('common:user.Laf Account Setting')}>
|
||||
<ModalBody>
|
||||
<Box fontSize={'sm'} color={'myGray.500'}>
|
||||
<Box>{t('support.user.Laf account intro')}</Box>
|
||||
<Box>{t('common:support.user.Laf account intro')}</Box>
|
||||
<Box textDecoration={'underline'}>
|
||||
<Link href={getDocPath('/docs/workflow/modules/laf/')} isExternal>
|
||||
{t('support.user.Laf account course')}
|
||||
{t('common:support.user.Laf account course')}
|
||||
</Link>
|
||||
</Box>
|
||||
<Box>
|
||||
@@ -121,7 +121,7 @@ const LafAccountModal = ({
|
||||
flex={'1 0 0'}
|
||||
size={'sm'}
|
||||
{...register('pat')}
|
||||
placeholder={t('plugin.Enter PAT')}
|
||||
placeholder={t('common:plugin.Enter PAT')}
|
||||
/>
|
||||
<Button
|
||||
ml={2}
|
||||
@@ -151,7 +151,7 @@ const LafAccountModal = ({
|
||||
</Flex>
|
||||
{!!lafToken && (
|
||||
<Flex alignItems={'center'} mt={5}>
|
||||
<Box flex={'0 0 70px'}>{t('plugin.Currentapp')}</Box>
|
||||
<Box flex={'0 0 70px'}>{t('common:plugin.Currentapp')}</Box>
|
||||
<MySelect
|
||||
minW={'200px'}
|
||||
list={
|
||||
@@ -162,7 +162,7 @@ const LafAccountModal = ({
|
||||
value: app.appid
|
||||
})) || []
|
||||
}
|
||||
placeholder={t('plugin.App')}
|
||||
placeholder={t('common:plugin.App')}
|
||||
value={watch('appid')}
|
||||
onchange={(e) => {
|
||||
setValue('appid', e);
|
||||
@@ -180,11 +180,11 @@ const LafAccountModal = ({
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
{appid && (
|
||||
<Button ml={3} isLoading={isUpdating} onClick={handleSubmit((data) => onSubmit(data))}>
|
||||
{t('common.Update')}
|
||||
{t('common:common.Update')}
|
||||
</Button>
|
||||
)}
|
||||
</ModalFooter>
|
||||
|
||||
@@ -48,7 +48,7 @@ const ConfigPerModal = ({
|
||||
isOpen
|
||||
iconSrc="/imgs/modal/key.svg"
|
||||
onClose={onClose}
|
||||
title={t('permission.Permission config')}
|
||||
title={t('common:permission.Permission config')}
|
||||
>
|
||||
<ModalBody>
|
||||
<HStack>
|
||||
@@ -61,7 +61,7 @@ const ConfigPerModal = ({
|
||||
</Box>
|
||||
)}
|
||||
<Box mt={5}>
|
||||
<Box fontSize={'sm'}>{t('permission.Default permission')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:permission.Default permission')}</Box>
|
||||
<DefaultPermissionList
|
||||
mt="1"
|
||||
per={defaultPer.value}
|
||||
@@ -87,7 +87,7 @@ const ConfigPerModal = ({
|
||||
justifyContent="space-between"
|
||||
w="full"
|
||||
>
|
||||
<Box fontSize={'sm'}>{t('permission.Collaborator')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:permission.Collaborator')}</Box>
|
||||
<Flex flexDirection="row" gap="2">
|
||||
<Button
|
||||
size="sm"
|
||||
@@ -95,7 +95,7 @@ const ConfigPerModal = ({
|
||||
leftIcon={<MyIcon w="4" name="common/settingLight" />}
|
||||
onClick={onOpenManageModal}
|
||||
>
|
||||
{t('permission.Manage')}
|
||||
{t('common:permission.Manage')}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
@@ -103,7 +103,7 @@ const ConfigPerModal = ({
|
||||
leftIcon={<MyIcon w="4" name="support/permission/collaborator" />}
|
||||
onClick={onOpenAddMember}
|
||||
>
|
||||
{t('common.Add')}
|
||||
{t('common:common.Add')}
|
||||
</Button>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
@@ -71,7 +71,7 @@ function AddMemberModal({ onClose }: AddModalPropsType) {
|
||||
permission: selectedPermission
|
||||
});
|
||||
},
|
||||
successToast: t('common.Add Success'),
|
||||
successToast: t('common:common.Add Success'),
|
||||
errorToast: 'Error',
|
||||
onSuccess() {
|
||||
onClose();
|
||||
|
||||
@@ -21,7 +21,7 @@ const MemberListCard = ({ tagStyle, ...props }: MemberListCardProps) => {
|
||||
<MyBox isLoading={isFetchingCollaborator} userSelect={'none'} {...props}>
|
||||
{collaboratorList?.length === 0 ? (
|
||||
<Box p={3} color="myGray.600" fontSize={'xs'} textAlign={'center'}>
|
||||
{t('permission.Not collaborator')}
|
||||
{t('common:permission.Not collaborator')}
|
||||
</Box>
|
||||
) : (
|
||||
<Flex gap="2" flexWrap={'wrap'}>
|
||||
|
||||
@@ -251,7 +251,7 @@ function PermissionSelect({
|
||||
}}
|
||||
>
|
||||
<MyIcon name="delete" w="20px" color="red.600" />
|
||||
<Box color="red.600">{t('common.Remove')}</Box>
|
||||
<Box color="red.600">{t('common:common.Remove')}</Box>
|
||||
</HStack>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -19,7 +19,7 @@ const PermissionTag = ({
|
||||
const Per = new Permission({ per: permission.value });
|
||||
|
||||
const commonLabel = (() => {
|
||||
if (permission.isOwner) return t('permission.Owner');
|
||||
if (permission.isOwner) return t('common:permission.Owner');
|
||||
if (permission.hasManagePer) return PermissionList['manage'].name;
|
||||
if (permission.hasWritePer) return PermissionList['write'].name;
|
||||
if (permission.hasReadPer) return PermissionList['read'].name;
|
||||
|
||||
@@ -18,14 +18,14 @@ const PermissionRadio = ({
|
||||
list={[
|
||||
{
|
||||
icon: 'support/permission/privateLight',
|
||||
title: t('permission.Private'),
|
||||
desc: t('permission.Private Tip'),
|
||||
title: t('common:permission.Private'),
|
||||
desc: t('common:permission.Private Tip'),
|
||||
value: PermissionTypeEnum.private
|
||||
},
|
||||
{
|
||||
icon: 'support/permission/publicLight',
|
||||
title: t('permission.Public'),
|
||||
desc: t('permission.Public Tip'),
|
||||
title: t('common:permission.Public'),
|
||||
desc: t('common:permission.Public Tip'),
|
||||
value: PermissionTypeEnum.public
|
||||
}
|
||||
]}
|
||||
|
||||
@@ -30,12 +30,16 @@ const SystemMsgModal = ({}: {}) => {
|
||||
}, [data, onClose, setSysMsgReadId]);
|
||||
|
||||
return (
|
||||
<MyModal isOpen={isOpen} iconSrc={LOGO_ICON} title={t('support.user.inform.System message')}>
|
||||
<MyModal
|
||||
isOpen={isOpen}
|
||||
iconSrc={LOGO_ICON}
|
||||
title={t('common:support.user.inform.System message')}
|
||||
>
|
||||
<ModalBody overflow={'auto'}>
|
||||
<Markdown source={data?.content} />
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button onClick={onclickRead}>{t('support.inform.Read')}</Button>
|
||||
<Button onClick={onclickRead}>{t('common:support.inform.Read')}</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
);
|
||||
|
||||
@@ -35,7 +35,7 @@ function TeamCard() {
|
||||
const { feConfigs } = useSystemStore();
|
||||
|
||||
const { ConfirmModal: ConfirmLeaveTeamModal, openConfirm: openLeaveConfirm } = useConfirm({
|
||||
content: t('user.team.member.Confirm Leave')
|
||||
content: t('common:user.team.member.Confirm Leave')
|
||||
});
|
||||
const { mutate: onLeaveTeam, isLoading: isLoadingLeaveTeam } = useRequest({
|
||||
mutationFn: async (teamId?: string) => {
|
||||
@@ -49,7 +49,7 @@ function TeamCard() {
|
||||
onSuccess() {
|
||||
refetchTeams();
|
||||
},
|
||||
errorToast: t('user.team.Leave Team Failed')
|
||||
errorToast: t('common:user.team.Leave Team Failed')
|
||||
});
|
||||
|
||||
const {
|
||||
@@ -65,7 +65,7 @@ function TeamCard() {
|
||||
icon: 'support/team/memberLight',
|
||||
label: (
|
||||
<Flex alignItems={'center'}>
|
||||
<Box ml={1}>{t('user.team.Member')}</Box>
|
||||
<Box ml={1}>{t('common:user.team.Member')}</Box>
|
||||
<Box ml={2} bg={'myGray.100'} borderRadius={'20px'} px={3} fontSize={'xs'}>
|
||||
{members.length}
|
||||
</Box>
|
||||
@@ -75,7 +75,7 @@ function TeamCard() {
|
||||
},
|
||||
{
|
||||
icon: 'support/team/key',
|
||||
label: t('common.Role'),
|
||||
label: t('common:common.Role'),
|
||||
value: TabListEnum.permission
|
||||
}
|
||||
],
|
||||
@@ -155,7 +155,7 @@ function TeamCard() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t('user.team.Invite Member')}
|
||||
{t('common:user.team.Invite Member')}
|
||||
</Button>
|
||||
)}
|
||||
{userInfo?.team.permission.hasManagePer && feConfigs?.show_team_chat && (
|
||||
@@ -169,7 +169,7 @@ function TeamCard() {
|
||||
onOpenTeamTagsAsync();
|
||||
}}
|
||||
>
|
||||
{t('user.team.Team Tags Async')}
|
||||
{t('common:user.team.Team Tags Async')}
|
||||
</Button>
|
||||
)}
|
||||
{!userInfo?.team.permission.isOwner && (
|
||||
@@ -184,7 +184,7 @@ function TeamCard() {
|
||||
openLeaveConfirm(() => onLeaveTeam(userInfo?.team?.teamId))();
|
||||
}}
|
||||
>
|
||||
{t('user.team.Leave Team')}
|
||||
{t('common:user.team.Leave Team')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
@@ -29,7 +29,7 @@ function TeamList() {
|
||||
borderBottom={'1.5px solid rgba(0, 0, 0, 0.05)'}
|
||||
>
|
||||
<Box flex={['0 0 auto', 1]} fontSize={['sm', 'md']}>
|
||||
{t('common.Team')}
|
||||
{t('common:common.Team')}
|
||||
</Box>
|
||||
{/* if there is no team */}
|
||||
{myTeams.length < 1 && (
|
||||
@@ -90,7 +90,7 @@ function TeamList() {
|
||||
variant={'whitePrimary'}
|
||||
onClick={() => onSwitchTeam(team.teamId)}
|
||||
>
|
||||
{t('user.team.Check Team')}
|
||||
{t('common:user.team.Check Team')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
@@ -59,7 +59,7 @@ function EditModal({
|
||||
setValue('avatar', src);
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: getErrText(err, t('common.Select File Failed')),
|
||||
title: getErrText(err, t('common:common.Select File Failed')),
|
||||
status: 'warning'
|
||||
});
|
||||
}
|
||||
@@ -75,8 +75,8 @@ function EditModal({
|
||||
onSuccess();
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.Create Success'),
|
||||
errorToast: t('common.Create Failed')
|
||||
successToast: t('common:common.Create Success'),
|
||||
errorToast: t('common:common.Create Failed')
|
||||
});
|
||||
const { mutate: onclickUpdate, isLoading: updating } = useRequest({
|
||||
mutationFn: async (data: EditTeamFormDataType) => {
|
||||
@@ -90,8 +90,8 @@ function EditModal({
|
||||
onSuccess();
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.Update Success'),
|
||||
errorToast: t('common.Update Failed')
|
||||
successToast: t('common:common.Update Success'),
|
||||
errorToast: t('common:common.Update Failed')
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -99,14 +99,14 @@ function EditModal({
|
||||
isOpen
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/team.svg"
|
||||
title={defaultData.id ? t('user.team.Update Team') : t('user.team.Create Team')}
|
||||
title={defaultData.id ? t('common:user.team.Update Team') : t('common:user.team.Create Team')}
|
||||
>
|
||||
<ModalBody>
|
||||
<Box color={'myGray.800'} fontWeight={'bold'}>
|
||||
{t('user.team.Set Name')}
|
||||
{t('common:user.team.Set Name')}
|
||||
</Box>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<MyTooltip label={t('common.Set Avatar')}>
|
||||
<MyTooltip label={t('common:common.Set Avatar')}>
|
||||
<Avatar
|
||||
flexShrink={0}
|
||||
src={avatar}
|
||||
@@ -123,9 +123,9 @@ function EditModal({
|
||||
autoFocus
|
||||
bg={'myWhite.600'}
|
||||
maxLength={20}
|
||||
placeholder={t('user.team.Team Name')}
|
||||
placeholder={t('common:user.team.Team Name')}
|
||||
{...register('name', {
|
||||
required: t('common.Please Input Name')
|
||||
required: t('common:common.Please Input Name')
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
@@ -136,10 +136,10 @@ function EditModal({
|
||||
<>
|
||||
<Box flex={1} />
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button isLoading={updating} onClick={handleSubmit((data) => onclickUpdate(data))}>
|
||||
{t('common.Confirm Update')}
|
||||
{t('common:common.Confirm Update')}
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
@@ -148,7 +148,7 @@ function EditModal({
|
||||
isLoading={creating}
|
||||
onClick={handleSubmit((data) => onclickCreate(data))}
|
||||
>
|
||||
{t('common.Confirm Create')}
|
||||
{t('common:common.Confirm Create')}
|
||||
</Button>
|
||||
)}
|
||||
</ModalFooter>
|
||||
|
||||
@@ -28,7 +28,7 @@ const InviteModal = ({
|
||||
const { t } = useTranslation();
|
||||
const { userT } = useI18n();
|
||||
const { ConfirmModal, openConfirm } = useConfirm({
|
||||
title: t('user.team.Invite Member Result Tip'),
|
||||
title: t('common:user.team.Invite Member Result Tip'),
|
||||
showCancel: false
|
||||
});
|
||||
const { userInfo } = useUserStore();
|
||||
@@ -82,7 +82,7 @@ const InviteModal = ({
|
||||
</Box>
|
||||
)();
|
||||
},
|
||||
errorToast: t('user.team.Invite Member Failed Tip')
|
||||
errorToast: t('common:user.team.Invite Member Failed Tip')
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -91,9 +91,9 @@ const InviteModal = ({
|
||||
iconSrc="/imgs/modal/team.svg"
|
||||
title={
|
||||
<Box>
|
||||
<Box>{t('user.team.Invite Member')}</Box>
|
||||
<Box>{t('common:user.team.Invite Member')}</Box>
|
||||
<Box color={'myGray.500'} fontSize={'xs'} fontWeight={'normal'}>
|
||||
{t('user.team.Invite Member Tips')}
|
||||
{t('common:user.team.Invite Member Tips')}
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
@@ -102,7 +102,7 @@ const InviteModal = ({
|
||||
>
|
||||
<ModalCloseButton onClick={onClose} />
|
||||
<ModalBody>
|
||||
<Box mb={2}>{t('user.Account')}</Box>
|
||||
<Box mb={2}>{t('common:user.Account')}</Box>
|
||||
<TagTextarea defaultValues={inviteUsernames} onUpdate={setInviteUsernames} />
|
||||
<Box mt={4}>
|
||||
<MySelect list={inviteTypes} value={selectedInviteType} onchange={setSelectInviteType} />
|
||||
@@ -116,7 +116,7 @@ const InviteModal = ({
|
||||
isLoading={isLoading}
|
||||
onClick={onInvite}
|
||||
>
|
||||
{t('user.team.Confirm Invite')}
|
||||
{t('common:user.team.Confirm Invite')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
<ConfirmModal />
|
||||
|
||||
@@ -44,10 +44,10 @@ function MemberTable() {
|
||||
<Table overflow={'unset'}>
|
||||
<Thead bg={'myWhite.400'}>
|
||||
<Tr>
|
||||
<Th borderRadius={'none !important'}>{t('common.Username')}</Th>
|
||||
<Th>{t('common.Permission')}</Th>
|
||||
<Th>{t('common.Status')}</Th>
|
||||
<Th borderRadius={'none !important'}>{t('common.Action')}</Th>
|
||||
<Th borderRadius={'none !important'}>{t('common:common.Username')}</Th>
|
||||
<Th>{t('common:common.Permission')}</Th>
|
||||
<Th>{t('common:common.Status')}</Th>
|
||||
<Th borderRadius={'none !important'}>{t('common:common.Action')}</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
|
||||
@@ -154,7 +154,7 @@ function AddManagerModal({ onClose, onSuccess }: { onClose: () => void; onSucces
|
||||
</ModalBody>
|
||||
<ModalFooter alignItems="flex-end">
|
||||
<Button h={'30px'} isLoading={isLoading} onClick={submit}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -49,7 +49,7 @@ function PermissionManage() {
|
||||
>
|
||||
<Flex>
|
||||
<Box fontSize={['sm', 'md']} fontWeight={'bold'} alignItems={'center'}>
|
||||
{t('user.team.role.Admin')}
|
||||
{t('common:user.team.role.Admin')}
|
||||
</Box>
|
||||
<Box
|
||||
fontSize={['xs']}
|
||||
|
||||
@@ -102,7 +102,7 @@ export const TeamModalContextProvider = ({ children }: { children: ReactNode })
|
||||
await putSwitchTeam(teamId);
|
||||
return initUserInfo();
|
||||
},
|
||||
errorToast: t('user.team.Switch Team Failed')
|
||||
errorToast: t('common:user.team.Switch Team Failed')
|
||||
});
|
||||
|
||||
const isLoading = isLoadingTeams || isSwitchingTeam || loadingMembers || isUpdatingPer;
|
||||
|
||||
@@ -38,12 +38,12 @@ const TeamMenu = () => {
|
||||
} else {
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('common.system.Commercial version function')
|
||||
title: t('common:common.system.Commercial version function')
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
<MyTooltip label={t('user.team.Select Team')}>
|
||||
<MyTooltip label={t('common:user.team.Select Team')}>
|
||||
<Flex w={'100%'} alignItems={'center'}>
|
||||
{userInfo?.team ? (
|
||||
<>
|
||||
@@ -53,7 +53,7 @@ const TeamMenu = () => {
|
||||
) : (
|
||||
<>
|
||||
<Box w={'8px'} h={'8px'} mr={3} borderRadius={'50%'} bg={'#67c13b'} />
|
||||
{t('user.team.Personal Team')}
|
||||
{t('common:user.team.Personal Team')}
|
||||
</>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
@@ -63,14 +63,14 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
||||
initUserInfo();
|
||||
onClose();
|
||||
},
|
||||
errorToast: t('common.Create Failed')
|
||||
errorToast: t('common:common.Create Failed')
|
||||
});
|
||||
const { mutate: onclickTagAsync, isLoading: isSyncing } = useRequest({
|
||||
mutationFn: (data: FormType) => loadTeamTagsByDomain(data.teamDomain),
|
||||
onSuccess(res) {
|
||||
replaceTeamTags(res);
|
||||
},
|
||||
successToast: t('support.user.team.Team Tags Async Success')
|
||||
successToast: t('common:support.user.team.Team Tags Async Success')
|
||||
});
|
||||
|
||||
useQuery(['getTeamsTags'], getTeamsTags, {
|
||||
@@ -103,7 +103,7 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
||||
<ModalBody style={{ padding: '10rpx' }}>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<Box mb={2} fontWeight="semibold">
|
||||
{t('同步链接')}
|
||||
{t('common:同步链接')}
|
||||
</Box>
|
||||
<Input
|
||||
flex={1}
|
||||
@@ -118,7 +118,7 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
||||
</Flex>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<Box mb={2} fontWeight="semibold">
|
||||
{t('分享链接')}
|
||||
{t('common:分享链接')}
|
||||
</Box>
|
||||
{/* code */}
|
||||
<Box ml={4} borderRadius={'md'} overflow={'hidden'}>
|
||||
@@ -143,7 +143,7 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
||||
</Flex>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<Box mb={2} fontWeight="semibold">
|
||||
{t('标签列表')}
|
||||
{t('common:标签列表')}
|
||||
</Box>
|
||||
<HStack
|
||||
ml={4}
|
||||
@@ -187,10 +187,10 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
||||
</ModalBody>
|
||||
<ModalFooter mb={2}>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button isLoading={isUpdating} onClick={handleSubmit((data) => onclickUpdate(data))}>
|
||||
{t('user.team.Tags Async')}
|
||||
{t('common:user.team.Tags Async')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -35,7 +35,7 @@ const UpdateInviteModal = () => {
|
||||
onSuccess() {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('user.team.invite.Accepted')
|
||||
title: t('common:user.team.invite.Accepted')
|
||||
});
|
||||
refetch();
|
||||
}
|
||||
@@ -45,7 +45,7 @@ const UpdateInviteModal = () => {
|
||||
onSuccess() {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('user.team.invite.Reject')
|
||||
title: t('common:user.team.invite.Reject')
|
||||
});
|
||||
refetch();
|
||||
}
|
||||
@@ -57,7 +57,7 @@ const UpdateInviteModal = () => {
|
||||
iconSrc="/imgs/modal/team.svg"
|
||||
title={
|
||||
<Box>
|
||||
<Box>{t('user.team.Processing invitations')}</Box>
|
||||
<Box>{t('common:user.team.Processing invitations')}</Box>
|
||||
<Box fontWeight={'normal'} fontSize={'sm'} color={'myGray.500'}>
|
||||
{t('user.team.Processing invitations Tips', { amount: inviteList?.length })}
|
||||
</Box>
|
||||
@@ -94,11 +94,11 @@ const UpdateInviteModal = () => {
|
||||
status: TeamMemberStatusEnum.active
|
||||
}),
|
||||
undefined,
|
||||
t('user.team.invite.Accept Confirm')
|
||||
t('common:user.team.invite.Accept Confirm')
|
||||
)();
|
||||
}}
|
||||
>
|
||||
{t('user.team.invite.accept')}
|
||||
{t('common:user.team.invite.accept')}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
@@ -114,17 +114,17 @@ const UpdateInviteModal = () => {
|
||||
status: TeamMemberStatusEnum.reject
|
||||
}),
|
||||
undefined,
|
||||
t('user.team.invite.Reject Confirm')
|
||||
t('common:user.team.invite.Reject Confirm')
|
||||
)();
|
||||
}}
|
||||
>
|
||||
{t('user.team.invite.reject')}
|
||||
{t('common:user.team.invite.reject')}
|
||||
</Button>
|
||||
</Flex>
|
||||
))}
|
||||
</ModalBody>
|
||||
<ModalFooter justifyContent={'center'}>
|
||||
<Box>{t('user.team.invite.Deal Width Footer Tip')}</Box>
|
||||
<Box>{t('common:user.team.invite.Deal Width Footer Tip')}</Box>
|
||||
</ModalFooter>
|
||||
|
||||
<ConfirmModal />
|
||||
|
||||
@@ -13,11 +13,11 @@ const NotSufficientModal = () => {
|
||||
const onClose = () => setIsNotSufficientModal(false);
|
||||
|
||||
return (
|
||||
<MyModal isOpen iconSrc="common/confirm/deleteTip" title={t('common.Warning')}>
|
||||
<ModalBody>{t('support.wallet.Not sufficient')}</ModalBody>
|
||||
<MyModal isOpen iconSrc="common/confirm/deleteTip" title={t('common:common.Warning')}>
|
||||
<ModalBody>{t('common:support.wallet.Not sufficient')}</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={2} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
@@ -25,7 +25,7 @@ const NotSufficientModal = () => {
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
{t('support.wallet.To read plan')}
|
||||
{t('common:support.wallet.To read plan')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
||||
@@ -71,7 +71,7 @@ const QRCodePayModal = ({
|
||||
);
|
||||
|
||||
return (
|
||||
<MyModal isOpen title={t('user.Pay')} iconSrc="/imgs/modal/pay.svg">
|
||||
<MyModal isOpen title={t('common:user.Pay')} iconSrc="/imgs/modal/pay.svg">
|
||||
<ModalBody textAlign={'center'}>
|
||||
<Box mb={3}>请微信扫码支付: {readPrice}元,请勿关闭页面</Box>
|
||||
<Box id={'payQRCode'} display={'inline-block'} h={'128px'}></Box>
|
||||
|
||||
@@ -94,7 +94,7 @@ const StandardPlanContentList = ({
|
||||
</Box>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('support.wallet.subscription.AI points click to read tip')}
|
||||
label={t('common:support.wallet.subscription.AI points click to read tip')}
|
||||
onClick={() => {
|
||||
router.push(AI_POINT_USAGE_CARD_ROUTE);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user