perf: i18n (#4740)

* feat: login limit time config

* doc

* perf: code

* i18n update

* update lock

* fix: ts

* update package
This commit is contained in:
Archer
2025-05-05 16:16:59 +08:00
committed by GitHub
parent fdd4e9edbd
commit 864eff47c7
229 changed files with 1128 additions and 1293 deletions

View File

@@ -91,8 +91,8 @@ const Header = ({ hasTrainingData }: { hasTrainingData: boolean }) => {
onSuccess() {
getData(pageNum);
},
successToast: t('common:common.Create Success'),
errorToast: t('common:common.Create Failed')
successToast: t('common:create_success'),
errorToast: t('common:create_failed')
}
);
@@ -155,7 +155,7 @@ const Header = ({ hasTrainingData }: { hasTrainingData: boolean }) => {
flex={1}
size={'sm'}
h={'36px'}
placeholder={t('common:common.Search') || ''}
placeholder={t('common:Search') || ''}
value={searchText}
leftIcon={
<MyIcon

View File

@@ -71,8 +71,8 @@ const TagManageModal = ({ onClose }: { onClose: () => void }) => {
setSearchTagKey('');
loadAllDatasetTags();
},
successToast: t('common:common.Delete Success'),
errorToast: t('common:common.Delete Failed')
successToast: t('common:delete_success'),
errorToast: t('common:delete_failed')
}
);
@@ -114,8 +114,8 @@ const TagManageModal = ({ onClose }: { onClose: () => void }) => {
onFinally() {
getData(pageNum);
},
successToast: t('common:common.Save Success'),
errorToast: t('common:common.Save Failed')
successToast: t('common:save_success'),
errorToast: t('common:save_failed')
}
);
@@ -211,7 +211,7 @@ const TagManageModal = ({ onClose }: { onClose: () => void }) => {
setNewTag('');
}}
>
{t('dataset:tag.Add New')}
{t('dataset:tag.add_new')}
</Button>
</Flex>
<Flex px={8} w={'full'}>
@@ -464,7 +464,7 @@ const AddTagToCollections = ({
}
<Box flex={'1 0 0'}></Box>
<MyInput
placeholder={t('common:common.Search')}
placeholder={t('common:Search')}
w={'200px'}
mr={2}
onChange={(e) => {
@@ -482,7 +482,7 @@ const AddTagToCollections = ({
setOriginCollections(selectedCollections);
}}
>
{t('common:common.Save')}
{t('common:Save')}
</Button>
</Flex>
<ScrollListCollections

View File

@@ -429,7 +429,7 @@ const EditView = ({
)}
<Flex justifyContent={'flex-end'} gap={4}>
<Button variant={'outline'} onClick={onCancel}>
{t('common:common.Cancel')}
{t('common:Cancel')}
</Button>
<Button variant={'primary'} onClick={handleSubmit(onSave)}>
{t('dataset:dataset.ReTrain')}

View File

@@ -134,7 +134,7 @@ const WebsiteConfigModal = ({
textDecoration={'underline'}
color={'blue.700'}
>
{t('common:common.course.Read Course')}
{t('common:read_course')}
</Link>
)}
</Box>
@@ -149,7 +149,7 @@ const WebsiteConfigModal = ({
</Box>
<Box mt={3}>
<Box>
{t('common:core.dataset.website.Selector')}({t('common:common.choosable')})
{t('common:core.dataset.website.Selector')}({t('common:choosable')})
</Box>
<Input {...websiteInfoForm('selector')} placeholder="body .content #document" />
</Box>
@@ -161,7 +161,7 @@ const WebsiteConfigModal = ({
{activeStep == 0 && (
<>
<Button variant={'whiteBase'} onClick={onClose}>
{t('common:common.Close')}
{t('common:Close')}
</Button>
<Button
ml={2}
@@ -171,20 +171,20 @@ const WebsiteConfigModal = ({
if (!strIsLink(data.url)) {
return toast({
status: 'warning',
title: t('common:common.link.UnValid')
title: t('common:link.UnValid')
});
}
goToNext();
})}
>
{t('common:common.Next Step')}
{t('common:next_step')}
</Button>
</>
)}
{activeStep == 1 && (
<>
<Button variant={'whiteBase'} onClick={goToPrevious}>
{t('common:common.Last Step')}
{t('common:last_step')}
</Button>
<Button
ml={2}
@@ -250,7 +250,7 @@ const PromptTextarea = ({
onClose();
}}
>
{t('common:common.Confirm')}
{t('common:Confirm')}
</Button>
</ModalFooter>
</MyModal>

View File

@@ -117,7 +117,7 @@ const CollectionCard = () => {
onSuccess() {
getData(pageNum);
},
successToast: t('common:common.Update Success')
successToast: t('common:update_success')
}
);
@@ -135,8 +135,8 @@ const CollectionCard = () => {
onSuccess() {
getData(pageNum);
},
successToast: t('common:common.Delete Success'),
errorToast: t('common:common.Delete Failed')
successToast: t('common:delete_success'),
errorToast: t('common:delete_failed')
}
);
@@ -203,11 +203,11 @@ const CollectionCard = () => {
<Table variant={'simple'} draggable={false}>
<Thead draggable={false}>
<Tr>
<Th py={4}>{t('common:common.Name')}</Th>
<Th py={4}>{t('common:Name')}</Th>
<Th py={4}>{t('dataset:collection.training_type')}</Th>
<Th py={4}>{t('dataset:collection_data_count')}</Th>
<Th py={4}>{t('dataset:collection.Create update time')}</Th>
<Th py={4}>{t('common:common.Status')}</Th>
<Th py={4}>{t('common:Status')}</Th>
<Th py={4}>{t('dataset:Enable')}</Th>
<Th py={4} />
</Tr>
@@ -246,10 +246,7 @@ const CollectionCard = () => {
<Td minW={'150px'} maxW={['200px', '300px']} draggable py={2}>
<Flex alignItems={'center'}>
<MyIcon name={collection.icon as any} w={'1.25rem'} mr={2} />
<MyTooltip
label={t('common:common.folder.Drag Tip')}
shouldWrapChildren={false}
>
<MyTooltip label={t('common:click_drag_tip')} shouldWrapChildren={false}>
<Box color={'myGray.900'} fontWeight={'500'} className="textEllipsis">
{collection.name}
</Box>
@@ -400,7 +397,7 @@ const CollectionCard = () => {
w={'0.9rem'}
_hover={{ color: 'red.600' }}
/>
<Box>{t('common:common.Delete')}</Box>
<Box>{t('common:Delete')}</Box>
</Flex>
),
type: 'danger',
@@ -458,7 +455,7 @@ const CollectionCard = () => {
setMoveCollectionData(undefined);
toast({
status: 'success',
title: t('common:common.folder.Move Success')
title: t('common:move_success')
});
}}
/>