diff --git a/client/web/plugins/com.msgbyte.integration/src/IntegrationPanel.tsx b/client/web/plugins/com.msgbyte.integration/src/IntegrationPanel.tsx
index d1254cc2..b850c319 100644
--- a/client/web/plugins/com.msgbyte.integration/src/IntegrationPanel.tsx
+++ b/client/web/plugins/com.msgbyte.integration/src/IntegrationPanel.tsx
@@ -1,4 +1,4 @@
-import React, { useCallback, useState } from 'react';
+import React, { useState } from 'react';
import { Avatar, Button, Input, UserName } from '@capital/component';
import styled from 'styled-components';
import type { OpenAppInfo } from 'types';
@@ -9,6 +9,7 @@ import {
useGroupIdContext,
showSuccessToasts,
} from '@capital/common';
+import { Translate } from './translate';
const Tip = styled.div`
color: #999;
@@ -51,7 +52,7 @@ const IntegrationPanel: React.FC = React.memo(() => {
});
if (!data) {
- showErrorToasts('没找到该应用');
+ showErrorToasts(Translate.notFoundApp);
return;
}
@@ -69,11 +70,11 @@ const IntegrationPanel: React.FC = React.memo(() => {
return (
-
目前仅支持通过应用ID手动添加
+
{Translate.onlyAllowManualAddition}
setAppId(e.target.value)}
/>
@@ -83,7 +84,7 @@ const IntegrationPanel: React.FC = React.memo(() => {
loading={loading}
onClick={handleQueryApp}
>
- 查询
+ {Translate.search}
@@ -101,7 +102,7 @@ const IntegrationPanel: React.FC = React.memo(() => {
{openAppInfo.appName}
{openAppInfo.appDesc}
- 开发者:
+ {Translate.developer}:
@@ -113,7 +114,7 @@ const IntegrationPanel: React.FC = React.memo(() => {
loading={addBotLoading}
onClick={handleAddBotIntoGroup}
>
- 添加应用机器人到群组
+ {Translate.addBot}
)}
diff --git a/client/web/plugins/com.msgbyte.integration/src/translate.ts b/client/web/plugins/com.msgbyte.integration/src/translate.ts
index eb605880..ad815a29 100644
--- a/client/web/plugins/com.msgbyte.integration/src/translate.ts
+++ b/client/web/plugins/com.msgbyte.integration/src/translate.ts
@@ -5,4 +5,28 @@ export const Translate = {
'zh-CN': '集成',
'en-US': 'Integration',
}),
+ notFoundApp: localTrans({
+ 'zh-CN': '没找到该应用',
+ 'en-US': 'Not found application',
+ }),
+ onlyAllowManualAddition: localTrans({
+ 'zh-CN': '目前仅支持通过应用ID手动添加',
+ 'en-US': 'Currently only supports manual addition via app ID',
+ }),
+ appId: localTrans({
+ 'zh-CN': '应用ID',
+ 'en-US': 'Application ID',
+ }),
+ search: localTrans({
+ 'zh-CN': '查询',
+ 'en-US': 'Search',
+ }),
+ developer: localTrans({
+ 'zh-CN': '开发者',
+ 'en-US': 'Developer',
+ }),
+ addBot: localTrans({
+ 'zh-CN': '添加应用机器人到群组',
+ 'en-US': 'Add app bot to group',
+ }),
};