mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 18:48:55 +00:00
fix i18next.d.ts (#2064)
* fix i18next.d.ts * feat: packages web i18n * delete file
This commit is contained in:
@@ -83,11 +83,11 @@ const MyRadio = ({
|
||||
)}
|
||||
<Box pr={hiddenCircle ? 0 : 2} flex={'1 0 0'}>
|
||||
<Box fontSize={'sm'} color={'myGray.800'}>
|
||||
{typeof item.title === 'string' ? t(item.title) : item.title}
|
||||
{typeof item.title === 'string' ? t(item.title as any) : item.title}
|
||||
</Box>
|
||||
{!!item.desc && (
|
||||
<Box fontSize={'mini'} color={'myGray.500'} lineHeight={1.2}>
|
||||
{t(item.desc)}
|
||||
{t(item.desc as any)}
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
|
@@ -52,7 +52,7 @@ const VariableEdit = ({
|
||||
const VariableTypeList = useMemo(
|
||||
() =>
|
||||
Object.entries(variableMap).map(([key, value]) => ({
|
||||
title: t(value.title),
|
||||
title: t(value.title as any),
|
||||
icon: value.icon,
|
||||
value: key
|
||||
})),
|
||||
@@ -219,7 +219,7 @@ const VariableEdit = ({
|
||||
{/* desc */}
|
||||
{variableMap[variableType]?.desc && (
|
||||
<Box mt={2} fontSize={'sm'} color={'myGray.500'} whiteSpace={'pre-wrap'}>
|
||||
{t(variableMap[variableType].desc)}
|
||||
{t(variableMap[variableType].desc as any)}
|
||||
</Box>
|
||||
)}
|
||||
|
||||
|
@@ -510,7 +510,7 @@ const ChatBox = (
|
||||
autoTTSResponse && splitText2Audio(responseText, true);
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: t(getErrText(err, 'core.chat.error.Chat error')),
|
||||
title: t(getErrText(err, 'core.chat.error.Chat error') as any),
|
||||
status: 'error',
|
||||
duration: 5000,
|
||||
isClosable: true
|
||||
@@ -814,7 +814,7 @@ const ChatBox = (
|
||||
|
||||
return {
|
||||
status: chatContent.status || 'loading',
|
||||
name: t(chatContent.moduleName || '') || t('common:common.Loading')
|
||||
name: t(chatContent.moduleName || ('' as any)) || t('common:common.Loading')
|
||||
};
|
||||
}, [chatHistories, isChatting, t]);
|
||||
|
||||
|
@@ -50,7 +50,7 @@ const RenderPluginInput = ({
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
isDisabled={isDisabled}
|
||||
placeholder={t(placeholder)}
|
||||
placeholder={t(placeholder as any)}
|
||||
bg={'myGray.50'}
|
||||
isInvalid={isInvalid}
|
||||
/>
|
||||
@@ -88,7 +88,7 @@ const RenderPluginInput = ({
|
||||
return (
|
||||
<JsonEditor
|
||||
bg={'myGray.50'}
|
||||
placeholder={t(placeholder || '')}
|
||||
placeholder={t(placeholder || ('' as any))}
|
||||
resize
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
|
@@ -136,7 +136,7 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
alt={''}
|
||||
w={['14px', '16px']}
|
||||
/>
|
||||
{t(item.moduleName)}
|
||||
{t(item.moduleName as any)}
|
||||
</Flex>
|
||||
),
|
||||
value: `${i}`
|
||||
@@ -177,7 +177,7 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
<>
|
||||
<Row
|
||||
label={t('common:core.chat.response.module name')}
|
||||
value={t(activeModule.moduleName)}
|
||||
value={t(activeModule.moduleName as any)}
|
||||
/>
|
||||
{activeModule?.totalPoints !== undefined && (
|
||||
<Row
|
||||
|
@@ -112,7 +112,7 @@ const QuoteItem = ({
|
||||
{score?.primaryScore && (
|
||||
<>
|
||||
{canViewSource ? (
|
||||
<MyTooltip label={t(SearchScoreTypeMap[score.primaryScore.type]?.desc)}>
|
||||
<MyTooltip label={t(SearchScoreTypeMap[score.primaryScore.type]?.desc as any)}>
|
||||
<Flex
|
||||
px={'12px'}
|
||||
py={'5px'}
|
||||
@@ -132,7 +132,7 @@ const QuoteItem = ({
|
||||
mx={2}
|
||||
/>
|
||||
<Box>
|
||||
{t(SearchScoreTypeMap[score.primaryScore.type]?.label)}
|
||||
{t(SearchScoreTypeMap[score.primaryScore.type]?.label as any)}
|
||||
{SearchScoreTypeMap[score.primaryScore.type]?.showScore
|
||||
? ` ${score.primaryScore.value.toFixed(4)}`
|
||||
: ''}
|
||||
@@ -159,7 +159,7 @@ const QuoteItem = ({
|
||||
)}
|
||||
{canViewSource &&
|
||||
score.secondaryScore.map((item, i) => (
|
||||
<MyTooltip key={item.type} label={t(SearchScoreTypeMap[item.type]?.desc)}>
|
||||
<MyTooltip key={item.type} label={t(SearchScoreTypeMap[item.type]?.desc as any)}>
|
||||
<Box fontSize={'xs'}>
|
||||
<Flex alignItems={'flex-start'} lineHeight={1.2} mb={1}>
|
||||
<Box
|
||||
@@ -172,7 +172,7 @@ const QuoteItem = ({
|
||||
<Box transform={'scale(0.9)'}>#{item.index + 1}</Box>
|
||||
</Box>
|
||||
<Box transform={'scale(0.9)'}>
|
||||
{t(SearchScoreTypeMap[item.type]?.label)}: {item.value.toFixed(4)}
|
||||
{t(SearchScoreTypeMap[item.type]?.label as any)}: {item.value.toFixed(4)}
|
||||
</Box>
|
||||
</Flex>
|
||||
<Box h={'4px'}>
|
||||
|
@@ -68,7 +68,7 @@ const SearchParamsTip = ({
|
||||
w={'12px'}
|
||||
mr={'1px'}
|
||||
/>
|
||||
{t(DatasetSearchModeMap[searchMode]?.title)}
|
||||
{t(DatasetSearchModeMap[searchMode]?.title as any)}
|
||||
</Flex>
|
||||
</Td>
|
||||
<Td pt={0} pb={2}>
|
||||
|
@@ -343,7 +343,7 @@ function EditKeyModal({
|
||||
placeholder={publishT('key alias') || 'key alias'}
|
||||
maxLength={20}
|
||||
{...register('name', {
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.name_is_empty') || 'name_is_empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
@@ -34,7 +34,7 @@ const PermissionIconText = ({
|
||||
return PermissionTypeMap[per] ? (
|
||||
<HStack spacing={1} fontSize={fontSize} {...props}>
|
||||
<MyIcon name={PermissionTypeMap[per]?.iconLight as any} w={w} color={iconColor} />
|
||||
<Box lineHeight={1}>{t(PermissionTypeMap[per]?.label)}</Box>
|
||||
<Box lineHeight={1}>{t(PermissionTypeMap[per]?.label as any)}</Box>
|
||||
</HStack>
|
||||
) : null;
|
||||
};
|
||||
|
@@ -189,7 +189,7 @@ function PermissionSelect({
|
||||
<Box ml={4}>
|
||||
<Box>{item.name}</Box>
|
||||
<Box color={'myGray.500'} fontSize={'mini'}>
|
||||
{t(item.description)}
|
||||
{t(item.description as any)}
|
||||
</Box>
|
||||
</Box>
|
||||
</Flex>
|
||||
|
@@ -68,7 +68,7 @@ function MemberTable() {
|
||||
/>
|
||||
</Td>
|
||||
<Td color={TeamMemberStatusMap[item.status].color}>
|
||||
{t(TeamMemberStatusMap[item.status]?.label || '')}
|
||||
{t(TeamMemberStatusMap[item.status]?.label || ('' as any))}
|
||||
</Td>
|
||||
<Td>
|
||||
{userInfo?.team.permission.hasManagePer &&
|
||||
|
@@ -103,7 +103,7 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
||||
<ModalBody style={{ padding: '10rpx' }}>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<Box mb={2} fontWeight="semibold">
|
||||
{t('common:同步链接')}
|
||||
{t('common:sync_link')}
|
||||
</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('common:分享链接')}
|
||||
{t('common:share_link')}
|
||||
</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('common:标签列表')}
|
||||
{t('common:tag_list')}
|
||||
</Box>
|
||||
<HStack
|
||||
ml={4}
|
||||
|
Reference in New Issue
Block a user