Browse Source

refactor: i18n- new user & shared view translation

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/1276/head
Raju Udava 3 years ago
parent
commit
192bddfc0c
  1. 6
      packages/nc-gui/components/auth/roles.vue
  2. 62
      packages/nc-gui/components/auth/userManagement.vue
  3. 72
      packages/nc-gui/components/base/shareBase.vue

6
packages/nc-gui/components/auth/roles.vue

@ -23,11 +23,11 @@
<!-- </v-toolbar-title>-->
<v-spacer />
<!-- tooltip="Reload roles" -->
<x-btn
v-ge="['roles','reload']"
outlined
tooltip="Reload roles"
:tooltip="$t('activity.reloadRoles')"
color="primary"
small
:disabled="loading"
@ -36,7 +36,7 @@
<v-icon small left>
refresh
</v-icon>
Reload
{{ $t('general.reload')}}
</x-btn>
<x-btn
v-ge="['roles','add new']"

62
packages/nc-gui/components/auth/userManagement.vue

@ -20,10 +20,11 @@
</v-text-field>
<v-spacer />
<!-- tooltip="Reload roles" -->
<x-btn
v-ge="['roles','reload']"
outlined
tooltip="Reload roles"
:tooltip="$t('activity.reloadRoles')"
color="primary"
small
:disabled="loading"
@ -33,13 +34,15 @@
<v-icon small left>
refresh
</v-icon>
Reload
<!-- Reload -->
{{ $t('general.reload')}}
</x-btn>
<!-- tooltip="Add new role" -->
<x-btn
v-if="_isUIAllowed('newUser')"
v-ge="['roles','add new']"
outlined
tooltip="Add new role"
:tooltip="$t('tooltip.addRole')"
color="primary"
small
:disabled="loading"
@ -48,7 +51,8 @@
<v-icon small left>
mdi-plus
</v-icon>
New User
<!-- New User -->
{{ $t('activity.newUser')}}
</x-btn>
</v-toolbar>
@ -91,17 +95,20 @@
<v-icon small>
mdi-email-outline
</v-icon>
Email
<!-- Email -->
{{ $t('labels.email')}}
</th>
<th class="font-weight-regular caption">
<v-icon small>
mdi-drama-masks
</v-icon>
Roles
<!-- Roles -->
{{ $t('objects.roles')}}
</th>
<th class="font-weight-regular caption">
<!-- <v-icon small class="mt-n1">mdi-cursor-default-outline</v-icon>-->
Actions
<!-- Actions -->
{{ $t('labels.actions')}}
</th>
</tr>
</thead>
@ -145,9 +152,10 @@
<!-- </v-edit-dialog>-->
</td>
<td>
<!-- tooltip="Edit User" -->
<x-icon
v-if="item.project_id"
tooltip="Edit User"
:tooltip="$t('activity.editUser')"
icon-class=""
color="primary"
small
@ -174,9 +182,10 @@
mdi-delete-forever-outline
</x-icon> -->
</span>
<!-- tooltip="Remove user from project" -->
<x-icon
v-else
tooltip="Remove user from project"
:tooltip="$t('activity.deleteUser')"
class="ml-2"
color="error"
small
@ -184,10 +193,11 @@
>
mdi-delete-outline
</x-icon>
<!-- tooltip="Resend invite email" -->
<x-icon
v-if="item.invite_token"
tooltip="Resend invite email"
:tooltip="$t('activity.resendInvite')"
icon-class="mt-n1"
color="primary"
small
@ -196,9 +206,10 @@
mdi-email-send-outline
</x-icon>
<!-- tooltip="Copy invite url" -->
<x-icon
v-if="item.invite_token"
tooltip="Copy invite url"
:tooltip="$t('activity.copyInviteURL')"
icon-class=""
color="primary"
small
@ -210,12 +221,13 @@
</tr>
</template>
</v-data-table>
<!-- tooltip="Add new user" -->
<div class="mt-10 text-center">
<x-btn
v-if="_isUIAllowed('newUser')"
v-ge="['roles','add new']"
outlined
tooltip="Add new user"
:tooltip="$t('msg.info.addUser')"
color="primary"
small
:disabled="loading"
@ -224,7 +236,8 @@
<v-icon small left>
mdi-plus
</v-icon>
New User
<!-- New User -->
{{ $t('activity.newUser') }}
</x-btn>
</div>
@ -313,7 +326,7 @@
<v-dialog v-model="userEditDialog" :width="invite_token ? 700 :700" @close="invite_token = null">
<v-card v-if="selectedUser" style="min-height: 100%">
<v-card-title>
Share : {{ $store.getters['project/GtrProjectName'] }}
{{ $t('activity.share') }} : {{ $store.getters['project/GtrProjectName'] }}
<!--
<h4 class="text-center text-capitalize mt-2 d-100 display-1">
<template v-if="invite_token">
@ -342,7 +355,8 @@
Edit User
</template>
<template v-else>
Invite Team
<!-- Invite Team -->
{{ $t('activity.inviteTeam') }}
</template>
</div>
<div class="pa-4 nc-invite-container">
@ -366,9 +380,10 @@
</v-alert>
<p class="caption grey--text mt-3">
Looks like you have not configured mailer yet! <br>Please copy above
invite
link and send it to
{{ $t('msg.info.userInviteNoSMTP') }}
<!-- Looks like you have not configured mailer yet! <br>Please copy above -->
<!-- invite -->
<!-- link and send it to -->
{{ invite_token && (invite_token.email || invite_token.emails && invite_token.emails.join(', ')) }}.
</p>
@ -407,7 +422,10 @@
@input="edited=true"
>
<template #label>
<span class="caption">Email</span>
<span class="caption">
<!-- Email -->
{{ $t('labels.email') }}
</span>
</template>
</v-text-field>
</v-col>
@ -442,6 +460,8 @@
</v-form>
<!-- </v-card-text>
<v-card-actions class="justify-center">-->
<!-- tooltip="Save Changes" -->
<div class="text-center mt-0">
<x-btn
v-ge="['rows','save']"
@ -454,7 +474,7 @@
<v-icon small left>
{{ selectedUser.id ? 'save' : 'mdi-send' }}
</v-icon>
{{ selectedUser.id ? 'Save' : 'Invite' }}
{{ selectedUser.id ? $t('general.save') : $t('activity.invite') }}
</x-btn>
</div>
</template>

72
packages/nc-gui/components/base/shareBase.vue

@ -3,23 +3,46 @@
<v-icon color="grey" small>
mdi-open-in-new
</v-icon>
<span class="grey--text caption">Shared base link</span>
<span class="grey--text caption">
<!-- Shared base link -->
{{ $t('activity.shareBase.link') }}
</span>
<div class="nc-container">
<v-chip v-if="base.enabled" :color="colors[4]" style="" class="rounded pl-1 pr-0 d-100 nc-url-chip pr-3">
<div class="nc-url-wrapper d-flex mx-1 align-center d-100">
<span class="nc-url flex-grow-1 caption ">{{ url }}</span>
<v-spacer />
<v-divider vertical />
<x-icon tooltip="reload" @click="recreate">
<!-- tooltip="reload" -->
<x-icon
:tooltip="$t('general.reload')"
@click="recreate"
>
mdi-reload
</x-icon>
<x-icon tooltip="copy URL" @click="copyUrl">
<!-- tooltip="copy URL" -->
<x-icon
:tooltip="$t('activity.copyUrl')"
@click="copyUrl"
>
mdi-content-copy
</x-icon>
<x-icon tooltip="open new tab" @click="navigateToSharedBase">
<!-- tooltip="open new tab" -->
<x-icon
:tooltip="$t('activity.openTab')"
@click="navigateToSharedBase"
>
mdi-open-in-new
</x-icon>
<x-icon tooltip="copy embeddable HTML code" @click="generateEmbeddableIframe">
<!-- tooltip="copy embeddable HTML code" -->
<x-icon
:tooltip="$t('activity.iFrame')"
@click="generateEmbeddableIframe"
>
mdi-xml
</x-icon>
</div>
@ -31,8 +54,14 @@
<template #activator="{on}">
<div class="my-2" v-on="on">
<div class="font-weight-bold nc-disable-shared-base">
<span v-if="base.enabled">Anyone with the link</span>
<span v-else>Disabled shared base</span>
<span v-if="base.enabled">
<!-- Anyone with the link -->
{{ $t('activity.shareBase.enable') }}
</span>
<span v-else>
<!-- Disable shared base -->
{{ $t('activity.shareBase.disable') }}
</span>
<v-icon small>
mdi-menu-down-outline
</v-icon>
@ -45,7 +74,10 @@
<v-icon small class="mr-1">
mdi-link-variant
</v-icon>
<span class="caption">Anyone with the link</span>
<span class="caption">
<!-- Anyone with the link -->
{{ $t('activity.shareBase.enable') }}
</span>
</v-list-item-title>
</v-list-item>
<v-list-item dense @click="disableSharedBase">
@ -53,18 +85,28 @@
<v-icon small class="mr-1">
mdi-link-variant-off
</v-icon>
<span class="caption">Disable shared base</span>
<span class="caption">
<!-- Disable shared base -->
{{ $t('activity.shareBase.link') }}
</span>
</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<div class=" caption">
<template v-if="base.enabled">
<span v-if="base.roles === 'editor'">Anyone on the internet with this link can edit</span>
<span v-else-if="base.roles === 'viewer'">Anyone on the internet with this link can view</span>
<span v-if="base.roles === 'editor'">
Anyone on the internet with this link can edit
<!-- {{ $t('msg.info.shareBasePrivate') }} -->
</span>
<span v-else-if="base.roles === 'viewer'">
<!-- Anyone on the internet with this link can view -->
{{ $t('msg.info.shareBasePublic') }}
</span>
</template>
<template v-else>
Generate publicly shareable readonly base
<!-- Generate publicly shareable readonly base -->
{{ $t('msg.info.shareBasePrivate') }}
</template>
</div>
</div>
@ -84,12 +126,14 @@
<v-list dense>
<v-list-item @click="createSharedBase('editor')">
<v-list-item-title>
Editor
<!-- Editor -->
{{ $t('objects.roleType.editor') }}
</v-list-item-title>
</v-list-item>
<v-list-item @click="createSharedBase('viewer')">
<v-list-item-title>
Viewer
<!-- Viewer -->
{{ $t('objects.roleType.viewer') }}
</v-list-item-title>
</v-list-item>
</v-list>

Loading…
Cancel
Save