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