feat: i18n
This commit is contained in:
parent
d9c6b6bdb6
commit
f44f910c80
@ -1,17 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menu-item-container flex-center h-full" :class="isActive ? 'active' : ''"
|
<div
|
||||||
@click="router.push({ name: menu.name })">
|
class="menu-item-container flex-center h-full"
|
||||||
|
:class="isActive ? 'active' : ''"
|
||||||
|
@click="router.push({ name: menu.name })"
|
||||||
|
>
|
||||||
<!-- <div class="icon">
|
<!-- <div class="icon">
|
||||||
<AppIcon :iconName="menu.meta ? (menu.meta.icon as string) : '404'" />
|
<AppIcon :iconName="menu.meta ? (menu.meta.icon as string) : '404'" />
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{{
|
{{ menu.meta?.title }}
|
||||||
$te(`layout.MenuItem.${String(props.menu.name)}`)
|
|
||||||
? $t(`layout.MenuItem.${String(props.menu.name)}`)
|
|
||||||
: menu.meta?.title
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@ -2,12 +2,6 @@ export default {
|
|||||||
github: 'Project address',
|
github: 'Project address',
|
||||||
wiki: 'User manual',
|
wiki: 'User manual',
|
||||||
forum: 'Forum for help',
|
forum: 'Forum for help',
|
||||||
MenuItem: {
|
|
||||||
application: 'Application',
|
|
||||||
dataset: 'Knowledge',
|
|
||||||
setting: 'System settings',
|
|
||||||
function_lib: 'function library'
|
|
||||||
},
|
|
||||||
avatar: {
|
avatar: {
|
||||||
about: 'About',
|
about: 'About',
|
||||||
logout: 'Logout',
|
logout: 'Logout',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
title: "404",
|
title: "404",
|
||||||
message: "Unable to Access Application",
|
message: "Unable to Access APP",
|
||||||
operate: "Back to Home",
|
operate: "Back to Home",
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
export default {
|
export default {
|
||||||
title: 'Overview',
|
title: 'Overview',
|
||||||
appInfo: {
|
appInfo: {
|
||||||
header: 'Application Info',
|
header: 'APP Info',
|
||||||
publicAccessLink: 'Public Access Link',
|
publicAccessLink: 'Public Access Link',
|
||||||
openText: 'On',
|
openText: 'On',
|
||||||
closeText: 'Off',
|
closeText: 'Off',
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export default {
|
|||||||
onlyRight: 'Only allow connections from the right anchor point',
|
onlyRight: 'Only allow connections from the right anchor point',
|
||||||
notRecyclable: 'Cannot create a loop connection',
|
notRecyclable: 'Cannot create a loop connection',
|
||||||
onlyLeft: 'Only allow connections to the left anchor point',
|
onlyLeft: 'Only allow connections to the left anchor point',
|
||||||
applicationNodeError: 'This application is unavailable',
|
applicationNodeError: 'This APP is unavailable',
|
||||||
functionNodeError: 'This function is unavailable',
|
functionNodeError: 'This function is unavailable',
|
||||||
repeatedNodeError: 'Node name already exists!',
|
repeatedNodeError: 'Node name already exists!',
|
||||||
cannotCopy: 'Cannot be copied',
|
cannotCopy: 'Cannot be copied',
|
||||||
@ -246,7 +246,7 @@ Please output an optimized question.`,
|
|||||||
text: 'Execute custom scripts to achieve data processing'
|
text: 'Execute custom scripts to achieve data processing'
|
||||||
},
|
},
|
||||||
applicationNode: {
|
applicationNode: {
|
||||||
label: 'Application Node'
|
label: 'APP Node'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
compare: {
|
compare: {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
export default {
|
export default {
|
||||||
title: 'Applications',
|
title: 'APP',
|
||||||
createApplication: 'Create Application',
|
createApplication: 'Create APP',
|
||||||
importApplication: 'Import Application',
|
importApplication: 'Import APP',
|
||||||
copyApplication: 'Copy Application',
|
copyApplication: 'Copy APP',
|
||||||
workflow: 'WORKFLOW',
|
workflow: 'WORKFLOW',
|
||||||
simple: 'SIMPLE',
|
simple: 'SIMPLE',
|
||||||
searchBar: {
|
searchBar: {
|
||||||
@ -13,37 +13,37 @@ export default {
|
|||||||
demo: 'Demo'
|
demo: 'Demo'
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
confirmTitle: 'Are you sure you want to delete this application?',
|
confirmTitle: 'Are you sure you want to delete this APP?',
|
||||||
confirmMessage:
|
confirmMessage:
|
||||||
'Deleting this application will no longer provide its services. Please proceed with caution.'
|
'Deleting this APP will no longer provide its services. Please proceed with caution.'
|
||||||
},
|
},
|
||||||
tip: {
|
tip: {
|
||||||
ExportError: 'Export Failed',
|
ExportError: 'Export Failed',
|
||||||
professionalMessage:
|
professionalMessage:
|
||||||
'The Community Edition supports up to 5 applications. If you need more applications, please upgrade to the Professional Edition.',
|
'The Community Edition supports up to 5 APP. If you need more APP, please upgrade to the Professional Edition.',
|
||||||
saveErrorMessage: 'Saving failed, please check your input or try again later',
|
saveErrorMessage: 'Saving failed, please check your input or try again later',
|
||||||
loadingErrorMessage: 'Failed to load configuration, please check your input or try again later'
|
loadingErrorMessage: 'Failed to load configuration, please check your input or try again later'
|
||||||
},
|
},
|
||||||
|
|
||||||
applicationForm: {
|
applicationForm: {
|
||||||
title: {
|
title: {
|
||||||
info: 'Application Information',
|
info: 'APP Information',
|
||||||
appTest: 'Debug Preview',
|
appTest: 'Debug Preview',
|
||||||
copy: 'copy'
|
copy: 'copy'
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
appName: {
|
appName: {
|
||||||
label: 'Application Name',
|
label: 'APP Name',
|
||||||
placeholder: 'Please enter the application name',
|
placeholder: 'Please enter the APP name',
|
||||||
requiredMessage: 'Application name is required'
|
requiredMessage: 'APP name is required'
|
||||||
},
|
},
|
||||||
appDescription: {
|
appDescription: {
|
||||||
label: 'Application Description',
|
label: 'APP Description',
|
||||||
placeholder:
|
placeholder:
|
||||||
'Describe the application scenario and use, e.g.: XXX assistant answering user questions about XXX product usage'
|
'Describe the APP scenario and use, e.g.: XXX assistant answering user questions about XXX product usage'
|
||||||
},
|
},
|
||||||
appType: {
|
appType: {
|
||||||
label: 'Please select the application type',
|
label: 'Please select the APP type',
|
||||||
simplePlaceholder: 'Suitable for beginners to create assistant.',
|
simplePlaceholder: 'Suitable for beginners to create assistant.',
|
||||||
workflowPlaceholder: 'Suitable for advanced users to customize the workflow of assistant'
|
workflowPlaceholder: 'Suitable for advanced users to customize the workflow of assistant'
|
||||||
},
|
},
|
||||||
@ -140,17 +140,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
applicationAccess: {
|
applicationAccess: {
|
||||||
title: 'Application Access',
|
title: 'APP Access',
|
||||||
wecom: 'WeCom',
|
wecom: 'WeCom',
|
||||||
wecomTip: 'Create WeCom intelligent applications',
|
wecomTip: 'Create WeCom intelligent APP',
|
||||||
dingtalk: 'DingTalk',
|
dingtalk: 'DingTalk',
|
||||||
dingtalkTip: 'Create DingTalk intelligent applications',
|
dingtalkTip: 'Create DingTalk intelligent APP',
|
||||||
wechat: 'WeChat',
|
wechat: 'WeChat',
|
||||||
wechatTip: 'Create WeChat intelligent applications',
|
wechatTip: 'Create WeChat intelligent APP',
|
||||||
lark: 'Lark',
|
lark: 'Lark',
|
||||||
larkTip: 'Create Lark intelligent applications',
|
larkTip: 'Create Lark intelligent APP',
|
||||||
setting: 'Setting',
|
setting: 'Setting',
|
||||||
info: 'Application Information',
|
info: 'APP Information',
|
||||||
callback: 'Callback Address',
|
callback: 'Callback Address',
|
||||||
callbackTip: 'Please fill in the callback address',
|
callbackTip: 'Please fill in the callback address',
|
||||||
wecomPlatform: 'WeCom Open Platform',
|
wecomPlatform: 'WeCom Open Platform',
|
||||||
@ -167,7 +167,7 @@ export default {
|
|||||||
encodingAesKeyPlaceholder: 'Please enter EncodingAESKey',
|
encodingAesKeyPlaceholder: 'Please enter EncodingAESKey',
|
||||||
authenticationSuccessful: 'Authentication successful',
|
authenticationSuccessful: 'Authentication successful',
|
||||||
urlInfo:
|
urlInfo:
|
||||||
'-Application management-Self-built-Created application-Receive messages-Set the "URL" received by the API'
|
'-APP management-Self-built-Created APP-Receive messages-Set the "URL" received by the API'
|
||||||
},
|
},
|
||||||
dingtalkSetting: {
|
dingtalkSetting: {
|
||||||
title: 'DingTalk Configuration',
|
title: 'DingTalk Configuration',
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
export default {
|
export default {
|
||||||
title: 'Knowledge Base',
|
title: 'Knowledge',
|
||||||
createDataset: 'Create Knowledge Base',
|
createDataset: 'Create Knowledge',
|
||||||
general: 'General',
|
general: 'General',
|
||||||
web: 'Web Site',
|
web: 'Web Site',
|
||||||
relatedApplications: 'Related Applications',
|
relatedApplications: 'Related App',
|
||||||
searchBar: {
|
searchBar: {
|
||||||
placeholder: 'Search by name'
|
placeholder: 'Search by name'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
title: 'Function Library',
|
title: 'Function',
|
||||||
createFunction: 'Create Function',
|
createFunction: 'Create Function',
|
||||||
editFunction: 'Edit Function',
|
editFunction: 'Edit Function',
|
||||||
copyFunction: 'Copy Function',
|
copyFunction: 'Copy Function',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
title: 'System Settings',
|
title: 'System',
|
||||||
authentication: {
|
authentication: {
|
||||||
title: 'Login Authentication',
|
title: 'Login Authentication',
|
||||||
ldap: {
|
ldap: {
|
||||||
|
|||||||
@ -2,12 +2,6 @@ export default {
|
|||||||
github: '项目地址',
|
github: '项目地址',
|
||||||
wiki: '用户手册',
|
wiki: '用户手册',
|
||||||
forum: '论坛求助',
|
forum: '论坛求助',
|
||||||
MenuItem: {
|
|
||||||
application: '应用',
|
|
||||||
dataset: '知识库',
|
|
||||||
setting: '系统管理',
|
|
||||||
function_lib: '函数库'
|
|
||||||
},
|
|
||||||
avatar: {
|
avatar: {
|
||||||
about: '关于',
|
about: '关于',
|
||||||
logout: '退出',
|
logout: '退出',
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import paragraph from './paragraph';
|
|||||||
import problem from './problem';
|
import problem from './problem';
|
||||||
import log from './log';
|
import log from './log';
|
||||||
import applicationWorkflow from './application-workflow';
|
import applicationWorkflow from './application-workflow';
|
||||||
|
import login from './login';
|
||||||
export default {
|
export default {
|
||||||
notFound,
|
notFound,
|
||||||
application,
|
application,
|
||||||
@ -26,5 +27,6 @@ export default {
|
|||||||
paragraph,
|
paragraph,
|
||||||
problem,
|
problem,
|
||||||
log,
|
log,
|
||||||
applicationWorkflow
|
applicationWorkflow,
|
||||||
|
login
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,12 +2,6 @@ export default {
|
|||||||
github: '項目地址',
|
github: '項目地址',
|
||||||
wiki: '使用者手冊',
|
wiki: '使用者手冊',
|
||||||
forum: '論壇求助',
|
forum: '論壇求助',
|
||||||
MenuItem: {
|
|
||||||
application: '應用',
|
|
||||||
dataset: '知識庫',
|
|
||||||
setting: '系統管理',
|
|
||||||
function_lib: '函數庫'
|
|
||||||
},
|
|
||||||
avatar: {
|
avatar: {
|
||||||
about: '關於',
|
about: '關於',
|
||||||
logout: '退出',
|
logout: '退出',
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { t } from '@/locales'
|
|||||||
const applicationRouter = {
|
const applicationRouter = {
|
||||||
path: '/application',
|
path: '/application',
|
||||||
name: 'application',
|
name: 'application',
|
||||||
meta: { title: '应用', permission: 'APPLICATION:READ' },
|
meta: { title: t('views.application.title'), permission: 'APPLICATION:READ' },
|
||||||
redirect: '/application',
|
redirect: '/application',
|
||||||
component: () => import('@/layout/layout-template/AppLayout.vue'),
|
component: () => import('@/layout/layout-template/AppLayout.vue'),
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { t } from '@/locales'
|
|||||||
const datasetRouter = {
|
const datasetRouter = {
|
||||||
path: '/dataset',
|
path: '/dataset',
|
||||||
name: 'dataset',
|
name: 'dataset',
|
||||||
meta: { title: '知识库', permission: 'DATASET:READ' },
|
meta: { title: t('views.dataset.title'), permission: 'DATASET:READ' },
|
||||||
component: () => import('@/layout/layout-template/AppLayout.vue'),
|
component: () => import('@/layout/layout-template/AppLayout.vue'),
|
||||||
redirect: '/dataset',
|
redirect: '/dataset',
|
||||||
children: [
|
children: [
|
||||||
@ -23,7 +23,7 @@ const datasetRouter = {
|
|||||||
{
|
{
|
||||||
path: '/dataset/:id',
|
path: '/dataset/:id',
|
||||||
name: 'DatasetDetail',
|
name: 'DatasetDetail',
|
||||||
meta: { title: '文档', activeMenu: '/dataset' },
|
meta: { title: t('common.fileUpload.document'), activeMenu: '/dataset' },
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import Layout from '@/layout/layout-template/DetailLayout.vue'
|
import { t } from '@/locales'
|
||||||
const functionLibRouter = {
|
const functionLibRouter = {
|
||||||
path: '/function-lib',
|
path: '/function-lib',
|
||||||
name: 'function_lib',
|
name: 'function_lib',
|
||||||
meta: { title: '函数库', permission: 'APPLICATION:READ' },
|
meta: { title: t('views.functionLib.title'), permission: 'APPLICATION:READ' },
|
||||||
redirect: '/function-lib',
|
redirect: '/function-lib',
|
||||||
component: () => import('@/layout/layout-template/AppLayout.vue'),
|
component: () => import('@/layout/layout-template/AppLayout.vue'),
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { t } from '@/locales'
|
|||||||
const settingRouter = {
|
const settingRouter = {
|
||||||
path: '/setting',
|
path: '/setting',
|
||||||
name: 'setting',
|
name: 'setting',
|
||||||
meta: { icon: 'Setting', title: '系统设置', permission: 'SETTING:READ' },
|
meta: { icon: 'Setting', title: t('views.system.title'), permission: 'SETTING:READ' },
|
||||||
redirect: () => {
|
redirect: () => {
|
||||||
if (hasPermission(new Role('ADMIN'), 'AND')) {
|
if (hasPermission(new Role('ADMIN'), 'AND')) {
|
||||||
return '/user'
|
return '/user'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user