fix: Translate fixed name
parent
6faa72d0b7
commit
3a267ac074
|
|
@ -43,7 +43,7 @@
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<AppIcon iconName="app-folder" style="font-size: 20px"></AppIcon>
|
<AppIcon iconName="app-folder" style="font-size: 20px"></AppIcon>
|
||||||
<span class="ml-8 ellipsis tree-label" style="max-width: 110px" :title="node.label">{{
|
<span class="ml-8 ellipsis tree-label" style="max-width: 110px" :title="node.label">{{
|
||||||
node.label
|
i18n_name(node.label)
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -103,6 +103,7 @@ import { onBeforeRouteLeave } from 'vue-router'
|
||||||
import type { TreeInstance } from 'element-plus'
|
import type { TreeInstance } from 'element-plus'
|
||||||
import CreateFolderDialog from '@/components/folder-tree/CreateFolderDialog.vue'
|
import CreateFolderDialog from '@/components/folder-tree/CreateFolderDialog.vue'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import folderApi from '@/api/folder'
|
import folderApi from '@/api/folder'
|
||||||
import { EditionConst } from '@/utils/permission/data'
|
import { EditionConst } from '@/utils/permission/data'
|
||||||
import { hasPermission } from '@/utils/permission/index'
|
import { hasPermission } from '@/utils/permission/index'
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<el-button text style="font-size: 14px" class="workspace-dropdown__button">
|
<el-button text style="font-size: 14px" class="workspace-dropdown__button">
|
||||||
<AppIcon iconName="app-workspace" style="font-size: 18px"></AppIcon>
|
<AppIcon iconName="app-workspace" style="font-size: 18px"></AppIcon>
|
||||||
<span class="ellipsis" style="max-width: 155px" :title="currentWorkspace?.name">
|
<span class="ellipsis" style="max-width: 155px" :title="currentWorkspace?.name">
|
||||||
{{ currentWorkspace?.name }}
|
{{ i18n_name(currentWorkspace?.name) }}
|
||||||
</span>
|
</span>
|
||||||
<el-icon class="el-icon--right">
|
<el-icon class="el-icon--right">
|
||||||
<CaretBottom />
|
<CaretBottom />
|
||||||
|
|
@ -55,6 +55,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { watch, ref } from 'vue'
|
import { watch, ref } from 'vue'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import type { WorkspaceItem } from '@/api/type/workspace'
|
import type { WorkspaceItem } from '@/api/type/workspace'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,10 @@ export default {
|
||||||
authorize: 'Authorized',
|
authorize: 'Authorized',
|
||||||
inner_admin: 'System Admin',
|
inner_admin: 'System Admin',
|
||||||
inner_wsm: 'Workspace Manager',
|
inner_wsm: 'Workspace Manager',
|
||||||
inner_user: 'Common User',
|
inner_user: 'Regular User',
|
||||||
|
root: 'Root Directory',
|
||||||
|
default_workspace: 'Default Workspace',
|
||||||
|
default_user_group: 'Default User Group',
|
||||||
},
|
},
|
||||||
time: {
|
time: {
|
||||||
daysLater: 'days later',
|
daysLater: 'days later',
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,9 @@ export default {
|
||||||
inner_admin: '系统管理员',
|
inner_admin: '系统管理员',
|
||||||
inner_wsm: '工作空间管理员',
|
inner_wsm: '工作空间管理员',
|
||||||
inner_user: '普通用户',
|
inner_user: '普通用户',
|
||||||
|
root: '根目录',
|
||||||
|
default_workspace: '默认工作空间',
|
||||||
|
default_user_group: '默认用户组',
|
||||||
},
|
},
|
||||||
time: {
|
time: {
|
||||||
daysLater: '天后',
|
daysLater: '天后',
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ export default {
|
||||||
inner_admin: '系統管理員',
|
inner_admin: '系統管理員',
|
||||||
inner_wsm: '工作空間管理員',
|
inner_wsm: '工作空間管理員',
|
||||||
inner_user: '普通用戶',
|
inner_user: '普通用戶',
|
||||||
|
root: '根目錄',
|
||||||
|
default_workspace: '預設工作空間',
|
||||||
|
default_user_group: '預設使用者群組',
|
||||||
},
|
},
|
||||||
time: {
|
time: {
|
||||||
daysLater: '天後',
|
daysLater: '天後',
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import {nanoid} from 'nanoid'
|
import {nanoid} from 'nanoid'
|
||||||
|
import {t} from '@/locales'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数字处理
|
* 数字处理
|
||||||
|
|
@ -85,6 +86,22 @@ export function downloadByURL(url: string, name: string) {
|
||||||
document.body.removeChild(a)
|
document.body.removeChild(a)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 替换固定数据国际化
|
||||||
|
const i18n_default_name_map:any = {
|
||||||
|
"系统管理员": 'layout.about.inner_admin',
|
||||||
|
"工作空间管理员": 'layout.about.inner_wsm',
|
||||||
|
"普通用户": 'layout.about.inner_user',
|
||||||
|
"根目录": 'layout.about.root',
|
||||||
|
"默认工作空间": 'layout.about.default_workspace',
|
||||||
|
"默认用户组": 'layout.about.default_user_group',
|
||||||
|
}
|
||||||
|
|
||||||
|
export function i18n_name(name: string) {
|
||||||
|
const key = i18n_default_name_map[name]
|
||||||
|
return key ? t(key) : name
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 截取文件名
|
// 截取文件名
|
||||||
export function cutFilename(filename: string, num: number) {
|
export function cutFilename(filename: string, num: number) {
|
||||||
const lastIndex = filename.lastIndexOf('.')
|
const lastIndex = filename.lastIndexOf('.')
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary lighter" size="small">
|
<el-text class="color-secondary lighter" size="small">
|
||||||
{{ $t('common.creator') }}: {{ item.nick_name }}
|
{{ $t('common.creator') }}: {{ i18n_name(item.nick_name) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
</CardBox>
|
</CardBox>
|
||||||
|
|
@ -197,7 +197,7 @@
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary lighter" size="small">
|
<el-text class="color-secondary lighter" size="small">
|
||||||
<auto-tooltip :content="item.username">
|
<auto-tooltip :content="item.username">
|
||||||
{{ $t('common.creator') }}: {{ item.nick_name }}
|
{{ $t('common.creator') }}: {{ i18n_name(item.nick_name) }}
|
||||||
</auto-tooltip>
|
</auto-tooltip>
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -330,6 +330,7 @@ import ApplicationApi from '@/api/application/application'
|
||||||
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { isWorkFlow } from '@/utils/application'
|
import { isWorkFlow } from '@/utils/application'
|
||||||
import { resetUrl } from '@/utils/common'
|
import { resetUrl } from '@/utils/common'
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary lighter" size="small">
|
<el-text class="color-secondary lighter" size="small">
|
||||||
{{ $t('common.creator') }}: {{ item.nick_name }}
|
{{ $t('common.creator') }}: {{ i18n_name(item.nick_name) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
</CardBox>
|
</CardBox>
|
||||||
|
|
@ -190,7 +190,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary lighter" size="small">
|
<el-text class="color-secondary lighter" size="small">
|
||||||
{{ $t('common.creator') }}: {{ item.nick_name }}
|
{{ $t('common.creator') }}: {{ i18n_name(item.nick_name) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
<template #tag>
|
<template #tag>
|
||||||
|
|
@ -361,6 +361,7 @@ import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import { numberFormat } from '@/utils/common'
|
import { numberFormat } from '@/utils/common'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import { SourceTypeEnum } from '@/enums/common'
|
import { SourceTypeEnum } from '@/enums/common'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
import permissionMap from '@/permission'
|
import permissionMap from '@/permission'
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary lighter" size="small">
|
<el-text class="color-secondary lighter" size="small">
|
||||||
{{ $t('common.creator') }}: {{ model.nick_name }}
|
{{ $t('common.creator') }}: {{ i18n_name(model.nick_name) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
<template #tag>
|
<template #tag>
|
||||||
|
|
@ -145,6 +145,7 @@ import AuthorizedWorkspace from '@/views/system-shared/AuthorizedWorkspaceDialog
|
||||||
import ResourceAuthorizationDrawer from '@/components/resource-authorization-drawer/index.vue'
|
import ResourceAuthorizationDrawer from '@/components/resource-authorization-drawer/index.vue'
|
||||||
import { SourceTypeEnum } from '@/enums/common'
|
import { SourceTypeEnum } from '@/enums/common'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import permissionMap from '@/permission'
|
import permissionMap from '@/permission'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="ellipsis" :title="row.name">{{ row.name }}</span>
|
<span class="ellipsis" :title="row.name">{{ i18n_name(row.name) }}</span>
|
||||||
<div @click.stop v-show="mouseId === row.id">
|
<div @click.stop v-show="mouseId === row.id">
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
<!-- 右边 -->
|
<!-- 右边 -->
|
||||||
<div class="user-right" v-loading="rightLoading">
|
<div class="user-right" v-loading="rightLoading">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<h4 class="medium ellipsis" :title="current?.name">{{ current?.name }}</h4>
|
<h4 class="medium ellipsis" :title="current?.name">{{ i18n_name(current?.name as string) }}</h4>
|
||||||
<el-divider direction="vertical" class="mr-8 ml-8" />
|
<el-divider direction="vertical" class="mr-8 ml-8" />
|
||||||
<AppIcon
|
<AppIcon
|
||||||
iconName="app-workspace"
|
iconName="app-workspace"
|
||||||
|
|
@ -269,6 +269,7 @@
|
||||||
import { onMounted, ref, watch, reactive } from 'vue'
|
import { onMounted, ref, watch, reactive } from 'vue'
|
||||||
import SystemGroupApi from '@/api/system/user-group'
|
import SystemGroupApi from '@/api/system/user-group'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import type { ChatUserGroupUserItem } from '@/api/type/systemChatUser'
|
import type { ChatUserGroupUserItem } from '@/api/type/systemChatUser'
|
||||||
import CreateOrUpdateGroupDialog from './component/CreateOrUpdateGroupDialog.vue'
|
import CreateOrUpdateGroupDialog from './component/CreateOrUpdateGroupDialog.vue'
|
||||||
import CreateGroupUserDialog from './component/CreateGroupUserDialog.vue'
|
import CreateGroupUserDialog from './component/CreateGroupUserDialog.vue'
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
@mouseleave="mouseId = ''"
|
@mouseleave="mouseId = ''"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span class="ellipsis-1" :title="row.role_name">{{ row.role_name }}</span>
|
<span class="ellipsis-1" :title="row.role_name">{{ i18n_name(row.role_name) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
<div class="flex-between mb-16">
|
<div class="flex-between mb-16">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<h4>
|
<h4>
|
||||||
{{ currentRole?.role_name }}
|
{{ i18n_name(currentRole?.role_name as string) }}
|
||||||
</h4>
|
</h4>
|
||||||
<span
|
<span
|
||||||
v-if="currentRole?.type && !currentRole.internal"
|
v-if="currentRole?.type && !currentRole.internal"
|
||||||
|
|
@ -155,6 +155,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import PermissionConfiguration from './component/PermissionConfiguration.vue'
|
import PermissionConfiguration from './component/PermissionConfiguration.vue'
|
||||||
import Member from './component/Member.vue'
|
import Member from './component/Member.vue'
|
||||||
import CreateOrUpdateRoleDialog from './component/CreateOrUpdateRoleDialog.vue'
|
import CreateOrUpdateRoleDialog from './component/CreateOrUpdateRoleDialog.vue'
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="ellipsis" :title="row.name">{{ row.name }}</span>
|
<span class="ellipsis" :title="row.name">{{ i18n_name(row.name) }}</span>
|
||||||
<div @click.stop v-show="mouseId === row.id">
|
<div @click.stop v-show="mouseId === row.id">
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
<!-- 右边 -->
|
<!-- 右边 -->
|
||||||
<div class="workspace-right p-24" v-loading="loading">
|
<div class="workspace-right p-24" v-loading="loading">
|
||||||
<div class="flex align-center mb-16">
|
<div class="flex align-center mb-16">
|
||||||
<h4 class="medium">{{ currentWorkspace?.name }}</h4>
|
<h4 class="medium">{{ i18n_name(currentWorkspace?.name as string) }}</h4>
|
||||||
<el-divider direction="vertical" class="mr-8 ml-8" />
|
<el-divider direction="vertical" class="mr-8 ml-8" />
|
||||||
<el-icon class="color-input-placeholder"><UserFilled /></el-icon>
|
<el-icon class="color-input-placeholder"><UserFilled /></el-icon>
|
||||||
<span class="color-input-placeholder ml-4">
|
<span class="color-input-placeholder ml-4">
|
||||||
|
|
@ -106,6 +106,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import Member from './component/Member.vue'
|
import Member from './component/Member.vue'
|
||||||
import CreateOrUpdateWorkspaceDialog from './component/CreateOrUpdateWorkspaceDialog.vue'
|
import CreateOrUpdateWorkspaceDialog from './component/CreateOrUpdateWorkspaceDialog.vue'
|
||||||
import type { WorkspaceItem } from '@/api/type/workspace'
|
import type { WorkspaceItem } from '@/api/type/workspace'
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary lighter" size="small">
|
<el-text class="color-secondary lighter" size="small">
|
||||||
{{ $t('common.creator') }}: {{ item.nick_name }}
|
{{ $t('common.creator') }}: {{ i18n_name(item.nick_name) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
</CardBox>
|
</CardBox>
|
||||||
|
|
@ -186,7 +186,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary lighter" size="small">
|
<el-text class="color-secondary lighter" size="small">
|
||||||
{{ $t('common.creator') }}: {{ item.nick_name }}
|
{{ $t('common.creator') }}: {{ i18n_name(item.nick_name) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
<template #tag="{ hoverShow }">
|
<template #tag="{ hoverShow }">
|
||||||
|
|
@ -383,6 +383,7 @@ import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
import permissionMap from '@/permission'
|
import permissionMap from '@/permission'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
import { i18n_name } from '@/utils/common'
|
||||||
import ToolStoreApi from '@/api/tool/store.ts'
|
import ToolStoreApi from '@/api/tool/store.ts'
|
||||||
import ToolStoreDescDrawer from "@/views/tool/component/ToolStoreDescDrawer.vue";
|
import ToolStoreDescDrawer from "@/views/tool/component/ToolStoreDescDrawer.vue";
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue