mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-20 02:34:52 +00:00
perf: i18n (#4740)
* feat: login limit time config * doc * perf: code * i18n update * update lock * fix: ts * update package
This commit is contained in:
@@ -118,7 +118,7 @@ const DateRangePicker = ({
|
||||
mr={2}
|
||||
onClick={() => setShowSelected(false)}
|
||||
>
|
||||
{t('common:common.Close')}
|
||||
{t('common:Close')}
|
||||
</Button>
|
||||
<Button
|
||||
size={'sm'}
|
||||
@@ -127,7 +127,7 @@ const DateRangePicker = ({
|
||||
setShowSelected(false);
|
||||
}}
|
||||
>
|
||||
{t('common:common.Confirm')}
|
||||
{t('common:Confirm')}
|
||||
</Button>
|
||||
</Flex>
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ const EmptyTip = ({ text, iconSize = '48px', ...props }: Props) => {
|
||||
<Flex mt={5} flexDirection={'column'} alignItems={'center'} py={'10vh'} {...props}>
|
||||
<MyIcon name="empty" w={iconSize} h={iconSize} color={'transparent'} />
|
||||
<Box mt={2} color={'myGray.500'} fontSize={'sm'}>
|
||||
{text || t('common:common.empty.Common Tip')}
|
||||
{text || t('common:no_more_data')}
|
||||
</Box>
|
||||
</Flex>
|
||||
);
|
||||
|
@@ -67,7 +67,7 @@ const EditFolderModal = ({
|
||||
<MyModal isOpen onClose={onClose} iconSrc="common/folderFill" title={typeMap.title}>
|
||||
<ModalBody>
|
||||
<Box>
|
||||
<FormLabel mb={1}>{t('common:common.Input name')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:input_name')}</FormLabel>
|
||||
<Input
|
||||
{...register('name', { required: true })}
|
||||
bg={'myGray.50'}
|
||||
@@ -76,13 +76,13 @@ const EditFolderModal = ({
|
||||
/>
|
||||
</Box>
|
||||
<Box mt={4}>
|
||||
<FormLabel mb={1}>{t('common:common.Input folder description')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:folder_description')}</FormLabel>
|
||||
<Textarea {...register('intro')} bg={'myGray.50'} maxLength={200} />
|
||||
</Box>
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button isLoading={loading} onClick={handleSubmit(onSave)} px={6}>
|
||||
{t('common:common.Confirm')}
|
||||
{t('common:Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
@@ -87,11 +87,11 @@ const PopoverConfirm = ({
|
||||
<HStack mt={1} justifyContent={'flex-end'}>
|
||||
{showCancel && (
|
||||
<Button variant={'whiteBase'} size="sm" onClick={onClose}>
|
||||
{cancelText || t('common:common.Cancel')}
|
||||
{cancelText || t('common:Cancel')}
|
||||
</Button>
|
||||
)}
|
||||
<Button isLoading={loading} variant={map.variant} size="sm" onClick={onclickConfirm}>
|
||||
{confirmText || t('common:common.Confirm')}
|
||||
{confirmText || t('common:Confirm')}
|
||||
</Button>
|
||||
</HStack>
|
||||
</PopoverContent>
|
||||
|
@@ -47,7 +47,7 @@ export const cronString2Label = (
|
||||
) => {
|
||||
const cronField = cronString2Fields(cronString);
|
||||
if (!cronField) {
|
||||
return t('common:common.Not open');
|
||||
return t('common:not_open');
|
||||
}
|
||||
|
||||
if (cronField[0] === 'month') {
|
||||
@@ -82,7 +82,7 @@ export const cronString2Label = (
|
||||
});
|
||||
}
|
||||
|
||||
return t('common:common.Not open');
|
||||
return t('common:not_open');
|
||||
};
|
||||
|
||||
const CronSelector = ({
|
||||
|
@@ -136,11 +136,7 @@ export const MultipleRowSelect = ({
|
||||
);
|
||||
})}
|
||||
{list.length === 0 && (
|
||||
<EmptyTip
|
||||
text={emptyTip ?? t('common:common.MultipleRowSelect.No data')}
|
||||
pt={1}
|
||||
pb={3}
|
||||
/>
|
||||
<EmptyTip text={emptyTip ?? t('common:no_select_data')} pt={1} pb={3} />
|
||||
)}
|
||||
</Box>
|
||||
{children.length > 0 && <RenderList list={children} index={index + 1} />}
|
||||
@@ -331,11 +327,7 @@ export const MultipleRowArraySelect = ({
|
||||
);
|
||||
})}
|
||||
{list.length === 0 && (
|
||||
<EmptyTip
|
||||
text={emptyTip ?? t('common:common.MultipleRowSelect.No data')}
|
||||
pt={1}
|
||||
pb={3}
|
||||
/>
|
||||
<EmptyTip text={emptyTip ?? t('common:no_select_data')} pt={1} pb={3} />
|
||||
)}
|
||||
</Box>
|
||||
{children.length > 0 && <RenderList list={children} index={index + 1} />}
|
||||
|
@@ -180,7 +180,7 @@ const MultipleSelect = <T = any,>({
|
||||
>
|
||||
{isSelectAll ? (
|
||||
<Box fontSize={'mini'} color={'myGray.900'}>
|
||||
{t('common:common.All')}
|
||||
{t('common:All')}
|
||||
</Box>
|
||||
) : (
|
||||
list
|
||||
@@ -249,7 +249,7 @@ const MultipleSelect = <T = any,>({
|
||||
{...menuItemStyles}
|
||||
>
|
||||
<Checkbox isChecked={isSelectAll} />
|
||||
<Box flex={'1 0 0'}>{t('common:common.All')}</Box>
|
||||
<Box flex={'1 0 0'}>{t('common:All')}</Box>
|
||||
</MenuItem>
|
||||
|
||||
<MyDivider my={1} />
|
||||
|
@@ -43,7 +43,7 @@ const CodeEditor = (props: Props) => {
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button mr={2} onClick={onClose} px={6}>
|
||||
{t('common:common.Confirm')}
|
||||
{t('common:Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
@@ -101,7 +101,7 @@ const CustomPromptEditor = ({
|
||||
px={2}
|
||||
onClick={() => setValue(defaultPrompt)}
|
||||
>
|
||||
{t('common:common.Reset')}
|
||||
{t('common:Reset')}
|
||||
</Button>
|
||||
</HStack>
|
||||
|
||||
@@ -137,7 +137,7 @@ const CustomPromptEditor = ({
|
||||
<ModalFooter>
|
||||
<Flex gap={3}>
|
||||
<Button variant={'whiteBase'} fontWeight={'medium'} onClick={onClose} w={20}>
|
||||
{t('common:common.Close')}
|
||||
{t('common:Close')}
|
||||
</Button>
|
||||
<Button
|
||||
fontWeight={'medium'}
|
||||
@@ -147,7 +147,7 @@ const CustomPromptEditor = ({
|
||||
}}
|
||||
w={20}
|
||||
>
|
||||
{t('common:common.Confirm')}
|
||||
{t('common:Confirm')}
|
||||
</Button>
|
||||
</Flex>
|
||||
</ModalFooter>
|
||||
|
@@ -178,7 +178,7 @@ const JSONEditor = ({
|
||||
} catch (error) {
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('common:common.jsonEditor.Parse error')
|
||||
title: t('common:jsonEditor.Parse error')
|
||||
});
|
||||
}
|
||||
}, [value]);
|
||||
|
@@ -86,7 +86,7 @@ const PromptEditor = ({
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button mr={2} onClick={onClose} px={6}>
|
||||
{t('common:common.Confirm')}
|
||||
{t('common:Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
Reference in New Issue
Block a user