I18n Translations (#2267)

* rebase

* i18n-1

* add error info i18n

* fix

* fix

* refactor: 删除error.json

* delete useI18n
This commit is contained in:
papapatrick
2024-08-05 18:42:21 +08:00
committed by GitHub
parent 025d405fe2
commit 10dcdb5491
107 changed files with 1128 additions and 416 deletions

View File

@@ -3,7 +3,7 @@ import MyModal from '@fastgpt/web/components/common/MyModal';
import { Box, Button, Flex, Grid, useTheme } from '@chakra-ui/react';
import { PromptTemplateItem } from '@fastgpt/global/core/ai/type.d';
import { ModalBody, ModalFooter } from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
const PromptTemplate = ({
title,
templates,
@@ -17,7 +17,7 @@ const PromptTemplate = ({
}) => {
const theme = useTheme();
const [selectTemplateTitle, setSelectTemplateTitle] = useState<PromptTemplateItem>();
const { t } = useTranslation();
return (
<MyModal isOpen title={title} onClose={onClose} iconSrc="/imgs/modal/prompt.svg">
<ModalBody h="100%" w={'600px'} maxW={'90vw'} overflowY={'auto'}>
@@ -55,7 +55,7 @@ const PromptTemplate = ({
onClose();
}}
>
{t('common:confirm_choice')}
</Button>
</ModalFooter>
</MyModal>