Skip to content

Commit 275d734

Browse files
committed
feat: i18n
1 parent 9494bd9 commit 275d734

File tree

4 files changed

+276
-58
lines changed

4 files changed

+276
-58
lines changed

ui/src/locales/lang/en_US/views/application.ts

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,71 @@ export default {
137137
designated_answer:
138138
'Hello, I am XXX Assistant. My knowledge base only contains information related to XXX products. Please rephrase your question.',
139139
defaultPrompt1:
140-
'The content inside the parentheses () represents the user\'s question. Based on the context, please speculate and complete the user\'s question ({question}). The requirement is to output a completed question and place it',
140+
"The content inside the parentheses () represents the user's question. Based on the context, please speculate and complete the user's question ({question}). The requirement is to output a completed question and place it",
141141
defaultPrompt2: 'tag',
142142
copy: 'copy'
143143
}
144+
},
145+
applicationAccess: {
146+
title: 'Application Access',
147+
wecom: 'WeCom',
148+
wecomTip: 'Create WeCom intelligent applications',
149+
dingtalk: 'DingTalk',
150+
dingtalkTip: 'Create DingTalk intelligent applications',
151+
wechat: 'WeChat',
152+
wechatTip: 'Create WeChat intelligent applications',
153+
lark: 'Lark',
154+
larkTip: 'Create Lark intelligent applications',
155+
setting: 'Setting',
156+
info: 'Application Information',
157+
callback: 'Callback Address',
158+
callbackTip: 'Please fill in the callback address',
159+
wecomPlatform: 'WeCom Open Platform',
160+
wechatPlatform: 'WeChat Open Platform',
161+
dingtalkPlatform: 'DingTalk Open Platform',
162+
larkPlatform: 'Lark Open Platform',
163+
wecomSetting: {
164+
title: 'WeCom Configuration',
165+
cropId: 'Crop ID',
166+
cropIdPlaceholder: 'Please enter Crop ID',
167+
agentIdPlaceholder: 'Please enter Agent ID',
168+
secretPlaceholder: 'Please enter Secret',
169+
tokenPlaceholder: 'Please enter Token',
170+
encodingAesKeyPlaceholder: 'Please enter EncodingAESKey',
171+
authenticationSuccessful: 'Authentication successful',
172+
urlInfo:
173+
'-Application management-Self-built-Created application-Receive messages-Set the "URL" received by the API'
174+
},
175+
dingtalkSetting: {
176+
title: 'DingTalk Configuration',
177+
clientIdPlaceholder: 'Please enter Client ID',
178+
clientSecretPlaceholder: 'Please enter Client Secret',
179+
urlInfo:
180+
'-On the robot page, set the "Message Receiving Mode" to HTTP mode, and fill in the above URL into the "Message Receiving Address"'
181+
},
182+
wechatSetting: {
183+
title: 'WeChat Configuration',
184+
appId: 'APP ID',
185+
appIdPlaceholder: 'Please enter APP ID',
186+
appSecret: 'APP SECRET',
187+
appSecretPlaceholder: 'Please enter APP SECRET',
188+
token: 'TOKEN',
189+
tokenPlaceholder: 'Please enter TOKEN',
190+
aesKey: 'Message Encryption Key',
191+
aesKeyPlaceholder: 'Please enter the message encryption key',
192+
urlInfo:
193+
'-Settings and Development-Basic Configuration-"Server Address URL" in Server Configuration'
194+
},
195+
larkSetting: {
196+
title: 'Lark Configuration',
197+
appIdPlaceholder: 'Please enter App ID',
198+
appSecretPlaceholder: 'Please enter App Secret',
199+
verificationTokenPlaceholder: 'Please enter Verification Token',
200+
urlInfo:
201+
'-Events and callbacks - event configuration - configure the "request address" of the subscription method'
202+
},
203+
saveErrorMessage: 'Saving failed, please check your input or try again later',
204+
loadingErrorMessage: 'Failed to load configuration, please check your input or try again later',
205+
copyUrl: 'Copy the link and fill it in'
144206
}
145207
}

ui/src/locales/lang/zh_CN/views/application.ts

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,52 @@ export default {
146146
wechatTip: '打造公众号智能应用',
147147
lark: '飞书应用',
148148
larkTip: '打造飞书智能应用',
149-
setting: '配置'
149+
setting: '配置',
150+
info: '应用信息',
151+
callback: '回调地址',
152+
callbackTip: '请输入回调地址',
153+
wecomPlatform: '企业微信后台',
154+
wechatPlatform: '微信公众平台',
155+
dingtalkPlatform: '钉钉开放平台',
156+
larkPlatform: '飞书开放平台',
157+
wecomSetting: {
158+
title: '企业微信应用配置',
159+
cropId: '企业 ID',
160+
cropIdPlaceholder: '请输入企业 ID',
161+
agentIdPlaceholder: '请输入Agent ID',
162+
secretPlaceholder: '请输入Secret',
163+
tokenPlaceholder: '请输入Token',
164+
encodingAesKeyPlaceholder: '请输入EncodingAESKey',
165+
authenticationSuccessful: '认证成功',
166+
urlInfo: '-应用管理-自建-创建的应用-接收消息-设置 API 接收的 "URL" 中'
167+
},
168+
dingtalkSetting: {
169+
title: '钉钉应用配置',
170+
clientIdPlaceholder: '请输入Client ID',
171+
clientSecretPlaceholder: '请输入Client Secret',
172+
urlInfo: '-机器人页面,设置 "消息接收模式" 为 HTTP模式 ,并把上面URL填写到"消息接收地址"中'
173+
},
174+
wechatSetting: {
175+
title: '公众号应用配置',
176+
appId: '开发者ID (APP ID)',
177+
appIdPlaceholder: '请输入开发者ID (APP ID)',
178+
appSecret: '开发者密钥 (APP SECRET)',
179+
appSecretPlaceholder: '请输入开发者密钥 (APP SECRET)',
180+
token: '令牌 (TOKEN)',
181+
tokenPlaceholder: '请输入令牌 (TOKEN)',
182+
aesKey: '消息加解密密钥',
183+
aesKeyPlaceholder: '请输入消息加解密密钥',
184+
urlInfo: '-设置与开发-基本配置-服务器配置的 "服务器地址URL" 中'
185+
},
186+
larkSetting: {
187+
title: '飞书应用配置',
188+
appIdPlaceholder: '请输入App ID',
189+
appSecretPlaceholder: '请输入App Secret',
190+
verificationTokenPlaceholder: '请输入Verification Token',
191+
urlInfo: '-事件与回调-事件配置-配置订阅方式的 "请求地址" 中'
192+
},
193+
saveErrorMessage: '保存失败,请检查输入或稍后再试',
194+
loadingErrorMessage: '加载配置失败,请检查输入或稍后再试',
195+
copyUrl: '复制链接填入到'
150196
}
151197
}

ui/src/views/application/ApplicationAccess.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,38 +48,39 @@ import AccessSettingDrawer from './component/AccessSettingDrawer.vue'
4848
import applicationApi from '@/api/application'
4949
import { MsgSuccess } from '@/utils/message'
5050
import { useRoute } from 'vue-router'
51+
import { t } from '@/locales'
5152
5253
// 平台数据
5354
const platforms = reactive([
5455
{
5556
key: 'wecom',
5657
logoSrc: new URL(`../../assets/logo_wechat-work.svg`, import.meta.url).href,
57-
name: '企业微信应用',
58-
description: '打造企业微信智能应用',
58+
name: t('views.application.applicationAccess.wecom'),
59+
description: t('views.application.applicationAccess.wecomTip'),
5960
isActive: false,
6061
exists: false
6162
},
6263
{
6364
key: 'dingtalk',
6465
logoSrc: new URL(`../../assets/logo_dingtalk.svg`, import.meta.url).href,
65-
name: '钉钉应用',
66-
description: '打造钉钉智能应用',
66+
name: t('views.application.applicationAccess.dingtalk'),
67+
description: t('views.application.applicationAccess.dingtalkTip'),
6768
isActive: false,
6869
exists: false
6970
},
7071
{
7172
key: 'wechat',
7273
logoSrc: new URL(`../../assets/logo_wechat.svg`, import.meta.url).href,
73-
name: '公众号',
74-
description: '打造公众号智能应用',
74+
name: t('views.application.applicationAccess.wechat'),
75+
description: t('views.application.applicationAccess.wechatTip'),
7576
isActive: false,
7677
exists: false
7778
},
7879
{
7980
key: 'feishu',
8081
logoSrc: new URL(`../../assets/logo_lark.svg`, import.meta.url).href,
81-
name: '飞书应用',
82-
description: '打造飞书智能应用',
82+
name: t('views.application.applicationAccess.lark'),
83+
description: t('views.application.applicationAccess.larkTip'),
8384
isActive: false,
8485
exists: false
8586
}
@@ -117,7 +118,7 @@ function changeStatus(type: string, value: boolean) {
117118
status: value
118119
}
119120
applicationApi.updatePlatformStatus(id, data).then(() => {
120-
MsgSuccess('操作成功')
121+
MsgSuccess(t('login.ldap.saveSuccess'))
121122
})
122123
}
123124

0 commit comments

Comments
 (0)