From 982325d0663b9dd89b6b5302aeb157ef2e874f0c Mon Sep 17 00:00:00 2001 From: jingyang <72259332+zjy365@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:27:51 +0800 Subject: [PATCH] fix i18next.d.ts (#2064) * fix i18next.d.ts * feat: packages web i18n * delete file --- .../common/DateRangePicker/index.tsx | 4 +- .../web/components/common/EmptyTip/index.tsx | 2 +- .../common/MyModal/EditFolderModal.tsx | 10 ++--- .../common/MyPopover/PopoverConfirm.tsx | 4 +- .../common/MySelect/MultipleRowSelect.tsx | 6 ++- .../web/components/common/Radio/LeftRadio.tsx | 6 +-- .../components/common/Tabs/LightRowTabs.tsx | 2 +- .../common/Textarea/CodeEditor/index.tsx | 4 +- .../common/Textarea/JsonEditor/index.tsx | 2 +- .../common/Textarea/PromptEditor/index.tsx | 2 +- .../core/workflow/NodeInputSelect.tsx | 32 +++++++-------- packages/web/core/workflow/constants.ts | 8 ++-- packages/web/hooks/useBeforeunload.ts | 2 +- packages/web/hooks/useConfirm.tsx | 10 ++--- packages/web/hooks/useEditTextarea.tsx | 4 +- packages/web/hooks/useRequest.tsx | 4 +- packages/web/hooks/useScrollPagination.tsx | 2 +- packages/web/i18n/en/common.json | 9 +++- packages/web/i18n/zh/common.json | 9 +++- packages/web/types/i18next.d.ts | 38 +++++++++++++++++ .../src/components/common/MyRadio/index.tsx | 4 +- .../src/components/core/app/VariableEdit.tsx | 4 +- .../core/chat/ChatContainer/ChatBox/index.tsx | 4 +- .../components/renderPluginInput.tsx | 4 +- .../chat/components/WholeResponseModal.tsx | 4 +- .../src/components/core/dataset/QuoteItem.tsx | 8 ++-- .../core/dataset/SearchParamsTip.tsx | 2 +- .../src/components/support/apikey/Table.tsx | 2 +- .../support/permission/IconText/index.tsx | 2 +- .../MemberManager/PermissionSelect.tsx | 2 +- .../components/MemberTable.tsx | 2 +- .../support/user/team/TeamTagModal/index.tsx | 6 +-- .../pages/account/components/BillTable.tsx | 16 ++++---- .../app/src/pages/account/components/Info.tsx | 2 +- .../pages/account/components/UsageDetail.tsx | 6 +-- .../pages/account/components/UsageTable.tsx | 6 +-- .../components/standardDetailModal.tsx | 5 ++- .../app/detail/components/Logs/index.tsx | 2 +- .../Publish/FeiShu/FeiShuEditModal.tsx | 12 +++--- .../components/Publish/FeiShu/index.tsx | 2 +- .../detail/components/Publish/Link/index.tsx | 2 +- .../SimpleApp/components/ToolSelectModal.tsx | 10 ++--- .../app/detail/components/TagsEditModal.tsx | 2 +- .../Flow/NodeTemplatesModal.tsx | 12 +++--- .../Flow/hooks/useDebug.tsx | 6 +-- .../Flow/nodes/NodeDatasetConcat.tsx | 2 +- .../Flow/nodes/NodeIfElse/ListItem.tsx | 2 +- .../nodes/NodePluginIO/InputEditModal.tsx | 2 +- .../Flow/nodes/NodePluginIO/PluginInput.tsx | 4 +- .../Flow/nodes/NodePluginIO/PluginOutput.tsx | 2 +- .../Flow/nodes/NodeVariableUpdate.tsx | 2 +- .../Flow/nodes/render/NodeCard.tsx | 4 +- .../render/RenderInput/FieldEditModal.tsx | 2 +- .../Flow/nodes/render/RenderInput/Label.tsx | 4 +- .../templates/DynamicInputs/index.tsx | 4 +- .../RenderInput/templates/Reference.tsx | 6 +-- .../render/RenderInput/templates/Textarea.tsx | 4 +- .../render/RenderOutput/FieldEditModal.tsx | 2 +- .../Flow/nodes/render/RenderOutput/Label.tsx | 4 +- .../Flow/nodes/render/RenderOutput/index.tsx | 2 +- .../pages/app/list/components/CreateModal.tsx | 4 +- .../list/components/HttpPluginEditModal.tsx | 2 +- .../components/CollectionCard/Header.tsx | 2 +- .../components/CollectionCard/index.tsx | 6 +-- .../dataset/detail/components/DataCard.tsx | 4 +- .../Import/commonProgress/DataProcess.tsx | 4 +- .../detail/components/InputDataModal.tsx | 4 +- .../pages/dataset/detail/components/Test.tsx | 6 +-- .../app/src/pages/dataset/detail/index.tsx | 2 +- .../login/components/LoginForm/WechatForm.tsx | 2 +- .../pages/login/components/RegisterForm.tsx | 2 +- .../src/pages/price/components/Standard.tsx | 4 +- projects/app/src/types/i18next.d.ts | 41 ------------------- .../app/src/web/common/hooks/useRequest.tsx | 2 +- projects/app/src/web/common/utils/i18n.ts | 2 +- 75 files changed, 216 insertions(+), 204 deletions(-) create mode 100644 packages/web/types/i18next.d.ts delete mode 100644 projects/app/src/types/i18next.d.ts diff --git a/packages/web/components/common/DateRangePicker/index.tsx b/packages/web/components/common/DateRangePicker/index.tsx index 4fc096c8631..30fe8c989e5 100644 --- a/packages/web/components/common/DateRangePicker/index.tsx +++ b/packages/web/components/common/DateRangePicker/index.tsx @@ -103,7 +103,7 @@ const DateRangePicker = ({ mr={2} onClick={() => setShowSelected(false)} > - {t('common.Close')} + {t('common:common.Close')} } diff --git a/packages/web/components/common/EmptyTip/index.tsx b/packages/web/components/common/EmptyTip/index.tsx index fd78c844048..80b06955826 100644 --- a/packages/web/components/common/EmptyTip/index.tsx +++ b/packages/web/components/common/EmptyTip/index.tsx @@ -13,7 +13,7 @@ const EmptyTip = ({ text, ...props }: Props) => { - {text || t('common.empty.Common Tip')} + {text || t('common:common.empty.Common Tip')} ); diff --git a/packages/web/components/common/MyModal/EditFolderModal.tsx b/packages/web/components/common/MyModal/EditFolderModal.tsx index c368761284e..bc8dfdda913 100644 --- a/packages/web/components/common/MyModal/EditFolderModal.tsx +++ b/packages/web/components/common/MyModal/EditFolderModal.tsx @@ -41,10 +41,10 @@ const EditFolderModal = ({ () => isEdit ? { - title: t('dataset.Edit Folder') + title: t('common:dataset.Edit Folder') } : { - title: t('dataset.Create Folder') + title: t('common:dataset.Create Folder') }, [isEdit, t] ); @@ -67,7 +67,7 @@ const EditFolderModal = ({ - {t('common.Input name')} + {t('common:common.Input name')} - {t('common.Input folder description')} + {t('common:common.Input folder description')}