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:
@@ -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