Browse Source

fix: i18n for Share view in share modal

pull/6512/head
Muhammed Mustafa 12 months ago
parent
commit
aab84ec815
  1. 12
      packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
  2. 14
      packages/nc-gui/components/dlg/share-and-collaborate/View.vue
  3. 2
      packages/nc-gui/components/general/ColorPicker.vue
  4. 4
      packages/nc-gui/components/general/CopyUrl.vue
  5. 13
      packages/nc-gui/lang/en.json

12
packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue

@ -268,7 +268,7 @@ const isPublicShareDisabled = computed(() => {
<div class="flex flex-col py-2 px-3 mb-1">
<div class="flex flex-col w-full mt-2.5 px-3 py-2.5 border-gray-200 border-1 rounded-md gap-y-2">
<div class="flex flex-row w-full justify-between py-0.5">
<div class="flex" :style="{ fontWeight: 500 }">Enable public viewing</div>
<div class="flex" :style="{ fontWeight: 500 }">{{ $t('activity.enabledPublicViewing') }}</div>
<a-switch
data-testid="share-view-toggle"
:checked="isPublicShared"
@ -284,7 +284,7 @@ const isPublicShareDisabled = computed(() => {
</div>
<div class="flex flex-col justify-between mt-1 py-2 px-3 bg-gray-50 rounded-md">
<div class="flex flex-row justify-between">
<div class="flex text-black">Restrict access with password</div>
<div class="flex text-black">{{ $t('activity.restrictAccessWithPassword') }}</div>
<a-switch
data-testid="share-password-toggle"
:checked="passwordProtected"
@ -317,7 +317,7 @@ const isPublicShareDisabled = computed(() => {
"
class="flex flex-row justify-between"
>
<div class="flex text-black">Allow Download</div>
<div class="flex text-black">{{ $t('activity.allowDownload') }}</div>
<a-switch
v-model:checked="allowCSVDownload"
data-testid="share-download-toggle"
@ -328,14 +328,14 @@ const isPublicShareDisabled = computed(() => {
<div v-if="activeView?.type === ViewTypes.FORM" class="flex flex-row justify-between">
<!-- use RTL orientation in form - todo: i18n -->
<div class="text-black">Survey Mode</div>
<div class="text-black">{{ $t('activity.surveyMode') }}</div>
<a-switch v-model:checked="surveyMode" data-testid="nc-modal-share-view__surveyMode">
<!-- todo i18n -->
</a-switch>
</div>
<div v-if="activeView?.type === ViewTypes.FORM" class="flex flex-row justify-between">
<!-- use RTL orientation in form - todo: i18n -->
<div class="text-black">RTL Orientation</div>
<div class="text-black">{{ $t('activity.rtlOrientation') }}</div>
<a-switch v-model:checked="withRTL" data-testid="nc-modal-share-view__RTL">
<!-- todo i18n -->
</a-switch>
@ -343,7 +343,7 @@ const isPublicShareDisabled = computed(() => {
<div v-if="activeView?.type === ViewTypes.FORM" class="flex flex-col justify-between gap-y-1 bg-gray-50 rounded-md">
<!-- todo: i18n -->
<div class="flex flex-row justify-between">
<div class="text-black">Use Theme</div>
<div class="text-black">{{ $t('activity.useTheme') }}</div>
<a-switch
data-testid="share-theme-toggle"
:checked="viewTheme"

14
packages/nc-gui/components/dlg/share-and-collaborate/View.vue

@ -133,16 +133,16 @@ watch(showShareModal, (val) => {
</div>
<div v-else class="flex flex-col px-1">
<div class="flex flex-row justify-between items-center pb-1 mx-4 mt-3">
<div class="flex text-base font-medium">Share</div>
<div class="flex text-base font-medium">{{ $t('activity.share') }}</div>
</div>
<div v-if="isViewToolbar" class="share-view">
<div v-if="isViewToolbar && activeView" class="share-view">
<div class="flex flex-row items-center gap-x-2 px-4 pt-3 pb-3 select-none">
<component
:is="viewIcons[view?.type]?.icon"
class="nc-view-icon group-hover"
:style="{ color: viewIcons[view?.type]?.color }"
/>
<div>Share View</div>
<div>{{ $t('activity.shareView') }}</div>
<div
class="max-w-79/100 ml-2 px-2 py-0.5 rounded-md bg-gray-100 capitalize text-ellipsis overflow-hidden"
:style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap' }"
@ -156,7 +156,7 @@ watch(showShareModal, (val) => {
<div class="flex flex-row items-center gap-x-2 px-4 pt-3 pb-3 select-none">
<GeneralProjectIcon :type="project.type" class="nc-view-icon group-hover" />
<div>Share Base</div>
<div>{{ $t('activity.shareBase.label') }}</div>
<div
class="max-w-79/100 ml-2 px-2 py-0.5 rounded-md bg-gray-100 capitalize text-ellipsis overflow-hidden"
:style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap' }"
@ -167,13 +167,15 @@ watch(showShareModal, (val) => {
<LazyDlgShareAndCollaborateShareBase />
</div>
<div class="flex flex-row justify-end mx-3 mt-1 mb-2 pt-4 gap-x-2">
<NcButton type="secondary" data-testid="docs-cancel-btn" @click="showShareModal = false"> Close </NcButton>
<NcButton type="secondary" data-testid="docs-cancel-btn" @click="showShareModal = false">
{{ $t('general.close') }}
</NcButton>
<NcButton
data-testid="docs-share-manage-access"
type="secondary"
:loading="isOpeningManageAccess"
@click="openManageAccess"
>Manage project access</NcButton
>{{ $t('activity.manageProjectAccess') }}</NcButton
>
<!-- <a-button

2
packages/nc-gui/components/general/ColorPicker.vue

@ -63,7 +63,7 @@ watch(picked, (n, _o) => {
@click="isPickerOn = !isPickerOn"
>
<GeneralTooltip>
<template #title>More colors</template>
<template #title>{{ $t('activity.moreColors') }}</template>
<GeneralIcon class="mt-1.5" :icon="isPickerOn ? 'minus' : 'plus'" />
</GeneralTooltip>
</button>

4
packages/nc-gui/components/general/CopyUrl.vue

@ -56,8 +56,8 @@ const copyUrl = async () => {
<MdiCheck v-if="isCopied.link" class="h-3.5" />
<MdiContentCopy v-else class="h-3.5" />
<div class="flex text-xs" :style="{ fontWeight: 500 }">
<template v-if="isCopied.link"> Link Copied </template>
<template v-else> Copy Link </template>
<template v-if="isCopied.link"> {{ $t('activity.copiedLink') }} </template>
<template v-else> {{ $t('activity.copyUrl') }} </template>
</div>
</div>
</div>

13
packages/nc-gui/lang/en.json

@ -452,6 +452,17 @@
"zoomInToViewColumns": "Zoom in to view columns"
},
"activity": {
"enabledPublicViewing": "Enable public viewing",
"restrictAccessWithPassword": "Restrict access with password",
"manageProjectAccess": "Manage Project Access",
"allowDownload": "Allow Download",
"surveyMode": "Survey Mode",
"rtlOrientation": "RTL Orientation",
"useTheme": "Use Theme",
"copyLink": "Copy Link",
"copiedLink": "Link Copied",
"copyUrl": "Copy URL",
"moreColors": "More Colors",
"moveProject": "Move Project",
"createProject": "Create Project",
"importProject": "Import Project",
@ -491,6 +502,7 @@
"groupBy": "Group By",
"addSubGroup": "Add subgroup",
"shareBase": {
"label": "Share base",
"disable": "Disable shared base",
"enable": "Anyone with the link",
"link": "Shared base link"
@ -556,7 +568,6 @@
"createKanban": "Create Kanban View",
"createForm": "Create Form View",
"showSystemFields": "Show system fields",
"copyUrl": "Copy URL",
"openTab": "Open new tab",
"iFrame": "Copy embeddable HTML code",
"addWebhook": "Add New Webhook",

Loading…
Cancel
Save