Browse Source

fix: i18n for Webhooks

pull/6512/head
Muhammed Mustafa 1 year ago
parent
commit
cf49d6ceb1
  1. 30
      packages/nc-gui/components/smartsheet/details/Webhooks.vue
  2. 11
      packages/nc-gui/lang/en.json

30
packages/nc-gui/components/smartsheet/details/Webhooks.vue

@ -156,11 +156,11 @@ watch(
<GeneralIcon icon="arrowLeft" /> <GeneralIcon icon="arrowLeft" />
</NcButton> </NcButton>
<div class="flex flex-row ml-2"> <div class="flex flex-row ml-2">
<NuxtLink class="link" :to="webhookMainUrl">Webhooks</NuxtLink> <NuxtLink class="link" :to="webhookMainUrl">{{ $t('objects.webhooks') }}</NuxtLink>
</div> </div>
<template v-if="selectedHook || isDraftMode"> <template v-if="selectedHook || isDraftMode">
<div class="flex text-gray-400">/</div> <div class="flex text-gray-400">/</div>
<div class="flex link">{{ selectedHook ? selectedHook.title : 'Create' }}</div> <div class="flex link">{{ selectedHook ? selectedHook.title : $t('general.create') }}</div>
</template> </template>
<div <div
v-if="selectedHook" v-if="selectedHook"
@ -170,7 +170,7 @@ watch(
'bg-gray-100 text-gray-500': !selectedHook.active, 'bg-gray-100 text-gray-500': !selectedHook.active,
}" }"
> >
{{ selectedHook.active ? 'Active' : 'Inactive' }} {{ selectedHook.active ? $t('general.active') : $t('general.inactive') }}
</div> </div>
</div> </div>
<NcButton <NcButton
@ -182,7 +182,7 @@ watch(
@click="createWebhook()" @click="createWebhook()"
> >
<div class="flex flex-row items-center justify-between w-full text-brand-500"> <div class="flex flex-row items-center justify-between w-full text-brand-500">
<span class="ml-1">New Webhook</span> <span class="ml-1">{{ $t('activity.newWebhook') }}</span>
<GeneralIcon icon="plus" /> <GeneralIcon icon="plus" />
</div> </div>
</NcButton> </NcButton>
@ -190,24 +190,24 @@ watch(
<div v-if="!selectedHookId && !isDraftMode" class="flex flex-col h-full w-full items-center"> <div v-if="!selectedHookId && !isDraftMode" class="flex flex-col h-full w-full items-center">
<div v-if="hooks.length === 0" class="flex flex-col px-1.5 py-2.5 ml-1 h-full justify-center items-center gap-y-6"> <div v-if="hooks.length === 0" class="flex flex-col px-1.5 py-2.5 ml-1 h-full justify-center items-center gap-y-6">
<GeneralIcon icon="webhook" class="flex text-5xl h-10" style="-webkit-text-stroke: 0.5px" /> <GeneralIcon icon="webhook" class="flex text-5xl h-10" style="-webkit-text-stroke: 0.5px" />
<div class="flex text-gray-600 font-medium text-lg">Get started with web-hooks!</div> <div class="flex text-gray-600 font-medium text-lg">{{ $t('msg.createWebhookMsg1') }}</div>
<div class="flex flex-col items-center"> <div class="flex flex-col items-center">
<div class="flex">Create web-hooks to power you automations,</div> <div class="flex">{{ $t('msg.createWebhookMsg2') }}</div>
<div class="flex">Get notified as soon as there are changes in your data</div> <div class="flex">{{ $t('msg.createWebhookMsg3') }}</div>
</div> </div>
<NcButton v-e="['c:actions:webhook']" class="flex max-w-40" type="primary" @click="createWebhook()"> <NcButton v-e="['c:actions:webhook']" class="flex max-w-40" type="primary" @click="createWebhook()">
<div class="flex flex-row items-center justify-between w-full"> <div class="flex flex-row items-center justify-between w-full">
<span class="ml-1">New Webhook</span> <span class="ml-1">{{ $t('activity.newWebhook') }}</span>
<GeneralIcon icon="plus" /> <GeneralIcon icon="plus" />
</div> </div>
</NcButton> </NcButton>
</div> </div>
<div v-else class="flex flex-col pb-2 mt-3 mb-2.5 w-full max-w-200"> <div v-else class="flex flex-col pb-2 mt-3 mb-2.5 w-full max-w-200">
<div class="flex flex-row nc-view-sidebar-webhook-header pl-3 pr-2 !py-2.5"> <div class="flex flex-row nc-view-sidebar-webhook-header pl-3 pr-2 !py-2.5">
<div class="nc-view-sidebar-webhook-item-toggle header">Activate</div> <div class="nc-view-sidebar-webhook-item-toggle header">{{ $t('general.activate') }}</div>
<div class="nc-view-sidebar-webhook-item-title header">Title</div> <div class="nc-view-sidebar-webhook-item-title header">{{ $t('general.title') }}</div>
<div class="nc-view-sidebar-webhook-item-event header">Event</div> <div class="nc-view-sidebar-webhook-item-event header">{{ $t('general.event') }}</div>
<div class="nc-view-sidebar-webhook-item-action header">Action</div> <div class="nc-view-sidebar-webhook-item-action header">{{ $t('general.action') }}</div>
</div> </div>
<div v-for="hook in hooks" :key="hook.id" class="nc-view-sidebar-webhook-item"> <div v-for="hook in hooks" :key="hook.id" class="nc-view-sidebar-webhook-item">
<div <div
@ -255,13 +255,13 @@ watch(
:centered="false" :centered="false"
@click="copyWebhook(hook)" @click="copyWebhook(hook)"
> >
<template #loading> Duplicating </template> <template #loading> {{ $t('general.duplicating') }} </template>
<div class="flex items-center gap-x-1"><GeneralIcon icon="copy" /> Duplicate</div> <div class="flex items-center gap-x-1"><GeneralIcon icon="copy" /> {{ $t('general.duplicate') }}</div>
</NcButton> </NcButton>
<NcButton type="text" class="w-full !rounded-none" :centered="false" @click="openDeleteModal(hook.id!)"> <NcButton type="text" class="w-full !rounded-none" :centered="false" @click="openDeleteModal(hook.id!)">
<div class="flex items-center justify-start gap-x-1 !text-red-500"> <div class="flex items-center justify-start gap-x-1 !text-red-500">
<GeneralIcon icon="delete" /> <GeneralIcon icon="delete" />
Delete {{ $t('general.delete') }}
</div> </div>
</NcButton> </NcButton>
</div> </div>

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

@ -65,6 +65,9 @@
"details": "Details", "details": "Details",
"skip": "Skip", "skip": "Skip",
"duplicate": "Duplicate", "duplicate": "Duplicate",
"duplicating": "Duplicating",
"activate": "Activate",
"action": "Action",
"insert": "Insert", "insert": "Insert",
"delete": "Delete", "delete": "Delete",
"deleting": "Deleting", "deleting": "Deleting",
@ -134,7 +137,9 @@
"old": "Old", "old": "Old",
"data": "Data", "data": "Data",
"source": "Source", "source": "Source",
"destination": "Destination" "destination": "Destination",
"active": "Active",
"inactive": "Inactive"
}, },
"objects": { "objects": {
"workspace": "Workspace", "workspace": "Workspace",
@ -453,6 +458,7 @@
"zoomInToViewColumns": "Zoom in to view columns" "zoomInToViewColumns": "Zoom in to view columns"
}, },
"activity": { "activity": {
"newWebhook": "New Webhook",
"enablePublicAccess": "Enable Public Access", "enablePublicAccess": "Enable Public Access",
"editingAccess": "Editing access", "editingAccess": "Editing access",
"enabledPublicViewing": "Enable public viewing", "enabledPublicViewing": "Enable public viewing",
@ -678,6 +684,9 @@
"selectField": "Select field" "selectField": "Select field"
}, },
"msg": { "msg": {
"createWebhookMsg1": "Get started with web-hooks!",
"createWebhookMsg2": "Create web-hooks to power you automations,",
"createWebhookMsg3": "Get notified as soon as there are changes in your data",
"areYouSureUWantTo": "Are you sure you want to delete the following", "areYouSureUWantTo": "Are you sure you want to delete the following",
"idColumnRequired": "ID column is required, you can rename this later if required.", "idColumnRequired": "ID column is required, you can rename this later if required.",
"warning": { "warning": {

Loading…
Cancel
Save