perf: i18n Personal Settings -> Profile

This commit is contained in:
Bai
2024-05-09 15:29:10 +08:00
parent ef7db30658
commit ad7527c4ae
5 changed files with 31 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
<template>
<IBox :fa="fa" :title="$tc('QuickUpdate')" v-bind="$attrs">
<IBox :fa="fa" :title="title" v-bind="$attrs">
<div v-for="action of actions" :key="action.title" class="quick-actions">
<table>
<ActionItem v-if="action.has === undefined || action.has" :action="action" />

View File

@@ -9,11 +9,11 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="profile">
<svg-icon class="icon" icon-class="attestation" />
{{ $t('Profile') }}
{{ $t('YourProfile') }}
</el-dropdown-item>
<el-dropdown-item command="UserSetting">
<svg-icon class="icon" icon-class="preference" />
{{ $t('UserSetting') }}
{{ $t('YourPreference') }}
</el-dropdown-item>
<el-dropdown-item v-if="$hasPerm('authentication.view_accesskey')" command="apiKey">
<svg-icon class="icon" icon-class="key" />

View File

@@ -7,7 +7,7 @@ export default {
redirect: '/profile/info',
component: Layout,
meta: {
title: i18n.t('UserProfile'),
title: i18n.t('PersonalSettings'),
icon: 'personal',
view: 'profile',
type: 'view',
@@ -21,7 +21,7 @@ export default {
name: 'ProfileInfo',
component: () => import('@/views/profile/ProfileInfo'),
meta: {
title: i18n.t('UserInformation'),
title: i18n.t('Profile'),
icon: 'attestation',
permissions: []
}

View File

@@ -51,7 +51,7 @@ export default {
currentEdit: '',
authQuickActions: [
{
title: this.$t('SetWeCom'),
title: this.$t('WeComOAuth'),
attrs: {
type: 'primary',
label: this.getLabel('wecom'),
@@ -68,7 +68,7 @@ export default {
}
},
{
title: this.$t('SetDingTalk'),
title: this.$t('DingTalkOAuth'),
attrs: {
type: 'primary',
label: this.getLabel('dingtalk'),
@@ -85,7 +85,7 @@ export default {
}
},
{
title: this.$t('SetFeiShu'),
title: this.$t('FeiShuOAuth'),
attrs: {
type: 'primary',
label: this.getLabel('feishu'),
@@ -102,7 +102,7 @@ export default {
}
},
{
title: this.$t('SetLark'),
title: this.$t('LarkOAuth'),
attrs: {
type: 'primary',
label: this.getLabel('lark'),
@@ -119,7 +119,7 @@ export default {
}
},
{
title: this.$t('SetSlack'),
title: this.$t('SlackOAuth'),
attrs: {
type: 'primary',
label: this.getLabel('slack'),
@@ -260,7 +260,7 @@ export default {
}
},
{
title: this.$t('Slack'),
title: 'Slack',
type: 'switch',
attrs: {
name: 'slack',
@@ -277,13 +277,21 @@ export default {
computed: {
detailCardItems() {
return [
{
value: this.object.name,
key: this.$t('Name')
},
{
value: this.object.username,
key: this.$t('Username')
},
{
value: this.object.name,
key: this.$t('Name')
value: this.object.email,
key: this.$t('Email')
},
{
value: this.object.groups.map(item => item.name).join(' '),
key: this.$t('UserGroups')
},
{
value: this.object.system_roles.map(item => item.display_name).join(' '),
@@ -293,20 +301,12 @@ export default {
value: this.object.org_roles.map(item => item.display_name).join(' '),
key: this.$t('OrgRoles')
},
{
value: this.object.email,
key: this.$t('Email')
},
{
value: this.object.is_active,
key: this.$t('IsActive')
},
{
value: this.object,
key: 'SSHKey',
key: 'SSH Key',
formatter: (item, val) => {
const comment = val.public_key_comment
const md5 = val.public_key_hash_md5
const comment = val.public_key_comment || '-'
const md5 = val.public_key_hash_md5 || '-'
return <span>{comment} <br/> {md5}</span>
}
},
@@ -319,8 +319,8 @@ export default {
key: this.$t('Source')
},
{
value: toSafeLocalDateStr(this.object.date_joined),
key: (this.$t('DateJoined'))
value: this.object.is_active,
key: this.$t('IsActive')
},
{
value: toSafeLocalDateStr(this.object.last_login),
@@ -331,12 +331,12 @@ export default {
key: this.$t('DatePasswordLastUpdated')
},
{
value: toSafeLocalDateStr(this.object.date_expired),
key: this.$t('DateExpired')
value: toSafeLocalDateStr(this.object.date_joined),
key: (this.$t('DateJoined'))
},
{
value: this.object.groups.map(item => item.name).join(' '),
key: this.$t('UserGroups')
value: toSafeLocalDateStr(this.object.date_expired),
key: this.$t('DateExpired')
},
{
value: this.object.comment,

View File

@@ -18,7 +18,7 @@ export default {
data() {
const ajaxUrl = '/api/v1/authentication/temp-tokens/'
return {
helpMessage: this.$t('TempPassword'),
helpMessage: this.$t('TempPasswordTip'),
tableConfig: {
hasSelection: true,
url: ajaxUrl,