Browse Source

fix: i18n

pull/6614/head
reenphygeorge 1 year ago
parent
commit
5d2131069c
  1. 4
      packages/nc-gui/components/account/UsersModal.vue
  2. 6
      packages/nc-gui/components/cell/attachment/RenameFile.vue
  3. 2
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  4. 2
      packages/nc-gui/components/dlg/AirtableImport.vue
  5. 4
      packages/nc-gui/components/dlg/share-and-collaborate/Collaborate.vue
  6. 5
      packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
  7. 4
      packages/nc-gui/components/dlg/share-and-collaborate/View.vue
  8. 3
      packages/nc-gui/components/general/FullScreen.vue
  9. 2
      packages/nc-gui/components/general/JoinCloud.vue
  10. 7
      packages/nc-gui/components/notification/Card.vue
  11. 5
      packages/nc-gui/components/roles/Badge.vue
  12. 15
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  13. 19
      packages/nc-gui/components/smartsheet/toolbar/ShareView.vue
  14. 8
      packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue
  15. 29
      packages/nc-gui/components/template/Editor.vue
  16. 16
      packages/nc-gui/components/workspace/CreateProjectDlg.vue
  17. 6
      packages/nc-gui/components/workspace/InviteCollabDlg.vue
  18. 39
      packages/nc-gui/lang/en.json
  19. 28
      packages/nocodb-sdk/src/lib/enums.ts

4
packages/nc-gui/components/account/UsersModal.vue

@ -175,7 +175,7 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
v-bind="validateInfos.emails" v-bind="validateInfos.emails"
validate-trigger="onBlur" validate-trigger="onBlur"
name="emails" name="emails"
:rules="[{ required: true, message: 'Please input email' }]" :rules="[{ required: true, message: $t('msg.plsInputEmail') }]"
> >
<div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('datatype.Email') }}:</div> <div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('datatype.Email') }}:</div>
@ -190,7 +190,7 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
</div> </div>
<div class="flex flex-col w-2/4"> <div class="flex flex-col w-2/4">
<a-form-item name="role" :rules="[{ required: true, message: 'Role required' }]"> <a-form-item name="role" :rules="[{ required: true, message: $t('msg.roleRequired') }]">
<div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div> <div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div>
<a-select v-model:value="usersData.role" class="nc-user-roles" dropdown-class-name="nc-dropdown-user-role"> <a-select v-model:value="usersData.role" class="nc-user-roles" dropdown-class-name="nc-dropdown-user-role">

6
packages/nc-gui/components/cell/attachment/RenameFile.vue

@ -1,5 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onKeyStroke, onMounted, reactive, ref } from '#imports' import { onKeyStroke, onMounted, reactive, ref, useI18n } from '#imports'
const { t } = useI18n()
const props = defineProps<{ const props = defineProps<{
title: string title: string
@ -29,7 +31,7 @@ function renameFile(fileName: string) {
// } // }
const rules = { const rules = {
title: [{ required: true, message: 'title is required.' }], title: [{ required: true, message: t('labels.titleRequired') }],
} }
function onCancel() { function onCancel() {

2
packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue

@ -124,7 +124,7 @@ const validators = computed(() => {
'title': [ 'title': [
{ {
required: true, required: true,
message: 'Source name is required', message: t('labels.sourceNameRequired'),
}, },
baseTitleValidator, baseTitleValidator,
], ],

2
packages/nc-gui/components/dlg/AirtableImport.vue

@ -336,7 +336,7 @@ onMounted(async () => {
<a-input <a-input
v-model:value="syncSource.details.syncSourceUrlOrId" v-model:value="syncSource.details.syncSourceUrlOrId"
class="nc-input-shared-base" class="nc-input-shared-base"
:placeholder="`${$t('labels.sharedBase')} URL`" :placeholder="`${$t('labels.sharedBaseUrl')}`"
size="large" size="large"
/> />
</a-form-item> </a-form-item>

4
packages/nc-gui/components/dlg/share-and-collaborate/Collaborate.vue

@ -58,7 +58,7 @@ watch(
v-bind="validateInfos.emails" v-bind="validateInfos.emails"
validate-trigger="onBlur" validate-trigger="onBlur"
name="emails" name="emails"
:rules="[{ required: true, message: 'Please input email' }]" :rules="[{ required: true, message: t('msg.plsInputEmail') }]"
> >
<a-input <a-input
v-model:value="invitationUsersData.emails" v-model:value="invitationUsersData.emails"
@ -72,7 +72,7 @@ watch(
</div> </div>
<div class="flex flex-col w-1/5"> <div class="flex flex-col w-1/5">
<a-form-item name="role" :rules="[{ required: true, message: 'Role required' }]"> <a-form-item name="role" :rules="[{ required: true, message: t('msg.roleRequired') }]">
<a-select <a-select
v-model:value="invitationUsersData.role" v-model:value="invitationUsersData.role"
class="!rounded-md !bg-white" class="!rounded-md !bg-white"

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

@ -330,29 +330,24 @@ const isPublicShareDisabled = computed(() => {
</div> </div>
<div v-if="activeView?.type === ViewTypes.FORM" class="flex flex-row justify-between"> <div v-if="activeView?.type === ViewTypes.FORM" class="flex flex-row justify-between">
<!-- use RTL orientation in form - todo: i18n -->
<div class="text-black">{{ $t('activity.surveyMode') }}</div> <div class="text-black">{{ $t('activity.surveyMode') }}</div>
<a-switch <a-switch
v-model:checked="surveyMode" v-model:checked="surveyMode"
v-e="['c:share:view:surver-mode:toggle']" v-e="['c:share:view:surver-mode:toggle']"
data-testid="nc-modal-share-view__surveyMode" data-testid="nc-modal-share-view__surveyMode"
> >
<!-- todo i18n -->
</a-switch> </a-switch>
</div> </div>
<div v-if="activeView?.type === ViewTypes.FORM && isEeUI" class="flex flex-row justify-between"> <div v-if="activeView?.type === ViewTypes.FORM && isEeUI" class="flex flex-row justify-between">
<!-- use RTL orientation in form - todo: i18n -->
<div class="text-black">{{ $t('activity.rtlOrientation') }}</div> <div class="text-black">{{ $t('activity.rtlOrientation') }}</div>
<a-switch <a-switch
v-model:checked="withRTL" v-model:checked="withRTL"
v-e="['c:share:view:rtl-orientation:toggle']" v-e="['c:share:view:rtl-orientation:toggle']"
data-testid="nc-modal-share-view__RTL" data-testid="nc-modal-share-view__RTL"
> >
<!-- todo i18n -->
</a-switch> </a-switch>
</div> </div>
<div v-if="activeView?.type === ViewTypes.FORM" class="flex flex-col justify-between gap-y-1 bg-gray-50 rounded-md"> <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="flex flex-row justify-between">
<div class="text-black">{{ $t('activity.useTheme') }}</div> <div class="text-black">{{ $t('activity.useTheme') }}</div>
<a-switch <a-switch

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

@ -118,11 +118,11 @@ watch(showShareModal, (val) => {
> >
<div v-if="isInvitationLinkCopied" class="flex flex-row items-center gap-x-1"> <div v-if="isInvitationLinkCopied" class="flex flex-row items-center gap-x-1">
<MdiTick class="h-3.5" /> <MdiTick class="h-3.5" />
Copied invite link {{ $t('activity.copyInviteLink') }}
</div> </div>
<div v-else class="flex flex-row items-center gap-x-1"> <div v-else class="flex flex-row items-center gap-x-1">
<MdiContentCopy class="h-3.3" /> <MdiContentCopy class="h-3.3" />
Copy invite link {{ $t('activity.copiedInviteLink') }}
</div> </div>
</a-button> </a-button>
</div> </div>

3
packages/nc-gui/components/general/FullScreen.vue

@ -34,9 +34,8 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
<template> <template>
<a-tooltip placement="left"> <a-tooltip placement="left">
<!-- todo: i18n -->
<template #title> <template #title>
<span class="text-xs">{{ isSidebarsOpen ? 'Full width' : 'Exit full width' }}</span> <span class="text-xs">{{ isSidebarsOpen ? $t('activity.fullWidth') : $t('activity.exitFullWidth') }}</span>
</template> </template>
<div <div
v-e="['c:toolbar:fullscreen']" v-e="['c:toolbar:fullscreen']"

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

@ -13,7 +13,7 @@ import { iconMap } from '#imports'
target="_blank" target="_blank"
> >
<component :is="iconMap.cloud" class="mt-[1px] text-black font-bold" /> <component :is="iconMap.cloud" class="mt-[1px] text-black font-bold" />
<div class="px-1 text-xs font-bold text-gray-800">Join</div> <div class="px-1 text-xs font-bold text-gray-800">{{ $t('general.join') }}</div>
</div> </div>
<div <div
class="group flex justify-center items-center rounded-r-[3px] w-full cursor-pointer px-1 py-1 text-primary border-r-1 border-b-1 border-t-1 border-[#cdd1d6] m-0" class="group flex justify-center items-center rounded-r-[3px] w-full cursor-pointer px-1 py-1 text-primary border-r-1 border-b-1 border-t-1 border-[#cdd1d6] m-0"

7
packages/nc-gui/components/notification/Card.vue

@ -25,8 +25,7 @@ const groupType = computed({
<div class="p-3" @click.stop> <div class="p-3" @click.stop>
<div class="flex items-center"> <div class="flex items-center">
<span class="text-md font-medium text-[#212121]"> <span class="text-md font-medium text-[#212121]">
<!-- todo: i18n --> {{ $t('activity.notification') }}
Notification
</span> </span>
<div class="flex-grow"></div> <div class="flex-grow"></div>
<div <div
@ -34,7 +33,7 @@ const groupType = computed({
class="cursor-pointer text-xs text-gray-500 hover:text-primary" class="cursor-pointer text-xs text-gray-500 hover:text-primary"
@click.stop="notificationStore.markAllAsRead" @click.stop="notificationStore.markAllAsRead"
> >
Mark all as read {{ $t('activity.maskAllAsRead') }}
</div> </div>
</div> </div>
</div> </div>
@ -48,7 +47,7 @@ const groupType = computed({
> >
<template v-if="!notifications?.length"> <template v-if="!notifications?.length">
<div class="flex flex-col gap-2 items-center justify-center"> <div class="flex flex-col gap-2 items-center justify-center">
<div class="text-sm text-gray-400">You have no new notifications</div> <div class="text-sm text-gray-400">{{ $t('msg.noNewNotifications') }}</div>
<GeneralIcon icon="inbox" class="!text-40px text-gray-400" /> <GeneralIcon icon="inbox" class="!text-40px text-gray-400" />
</div> </div>
</template> </template>

5
packages/nc-gui/components/roles/Badge.vue

@ -26,17 +26,16 @@ const sizeSelect = computed(() => props.size)
const roleProperties = computed(() => { const roleProperties = computed(() => {
const role = roleRef.value const role = roleRef.value
const color = RoleColors[role] const color = RoleColors[role]
const icon = RoleIcons[role] const icon = RoleIcons[role]
const label = RoleLabels[role] const label = RoleLabels[role]
return { return {
color, color,
icon, icon,
label, label,
} }
}) })
</script> </script>
<template> <template>
@ -63,7 +62,7 @@ const roleProperties = computed(() => {
> >
<GeneralIcon :icon="roleProperties.icon" /> <GeneralIcon :icon="roleProperties.icon" />
<span class="flex whitespace-nowrap"> <span class="flex whitespace-nowrap">
{{ roleProperties.label }} {{ $t(`objects.roleType.${roleProperties.label}`) }}
</span> </span>
<GeneralIcon v-if="clickableRef" icon="arrowDown" /> <GeneralIcon v-if="clickableRef" icon="arrowDown" />
</div> </div>

15
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -281,8 +281,7 @@ onMounted(async () => {
await loadCommentsAndLogs() await loadCommentsAndLogs()
} catch (e: any) { } catch (e: any) {
if (e.response?.status === 404) { if (e.response?.status === 404) {
// todo: i18n message.error(t("msg.noRecordFound"))
message.error('Record not found')
router.replace({ query: {} }) router.replace({ query: {} })
} else throw e } else throw e
} }
@ -345,9 +344,9 @@ useActiveKeyupListener(
if (changedColumns.value.size > 0) { if (changedColumns.value.size > 0) {
await Modal.confirm({ await Modal.confirm({
title: 'Do you want to save the changes?', title: t('msg.saveChanges'),
okText: 'Save', okText: t('general.save'),
cancelText: 'Discard', cancelText: t('label.discard'),
onOk: async () => { onOk: async () => {
await save() await save()
reloadHook?.trigger(null) reloadHook?.trigger(null)
@ -360,8 +359,8 @@ useActiveKeyupListener(
} else if (isNew.value) { } else if (isNew.value) {
await Modal.confirm({ await Modal.confirm({
title: 'Do you want to save the record?', title: 'Do you want to save the record?',
okText: 'Save', okText: t('general.save'),
cancelText: 'Discard', cancelText: t('label.discard'),
onOk: async () => { onOk: async () => {
const data = await _save(rowState.value) const data = await _save(rowState.value)
await syncLTARRefs(data) await syncLTARRefs(data)
@ -389,7 +388,7 @@ const onDeleteRowClick = () => {
const onConfirmDeleteRowClick = async () => { const onConfirmDeleteRowClick = async () => {
showDeleteRowModal.value = false showDeleteRowModal.value = false
await deleteRowById(primaryKey.value) await deleteRowById(primaryKey.value)
message.success('Row deleted') message.success(t('msg.rowDeleted'))
reloadTrigger.trigger() reloadTrigger.trigger()
onClose() onClose()
showDeleteRowModal.value = false showDeleteRowModal.value = false

19
packages/nc-gui/components/smartsheet/toolbar/ShareView.vue

@ -240,10 +240,6 @@ const copyIframeCode = async () => {
} }
} }
} }
watch(shared, () => {
console.log('shared', shared.value)
})
</script> </script>
<template> <template>
@ -292,23 +288,21 @@ watch(shared, () => {
@click="copyIframeCode" @click="copyIframeCode"
> >
<component :is="iconMap.embed" class="text-gray-500" /> <component :is="iconMap.embed" class="text-gray-500" />
Embed this view in your site {{ $t('labels.embedInSite') }}
</div> </div>
<div class="px-1 mt-2 flex flex-col gap-3"> <div class="px-1 mt-2 flex flex-col gap-3">
<!-- todo: i18n --> <div class="text-gray-500 border-b-1">{{ $t('general.options') }}</div>
<div class="text-gray-500 border-b-1">Options</div>
<div class="px-1 flex flex-col gap-2"> <div class="px-1 flex flex-col gap-2">
<div> <div>
<!-- Survey Mode; todo: i18n -->
<a-checkbox <a-checkbox
v-if="shared.type === ViewTypes.FORM" v-if="shared.type === ViewTypes.FORM"
v-model:checked="surveyMode" v-model:checked="surveyMode"
data-testid="nc-modal-share-view__survey-mode" data-testid="nc-modal-share-view__survey-mode"
class="!text-sm" class="!text-sm"
> >
Use Survey Mode {{ $t('general.useSurveyMode') }}
</a-checkbox> </a-checkbox>
<!-- <Transition name="layout" mode="out-in"> <!-- <Transition name="layout" mode="out-in">
@ -379,9 +373,8 @@ watch(shared, () => {
</div> </div>
<div v-if="shared.type === ViewTypes.FORM"> <div v-if="shared.type === ViewTypes.FORM">
<!-- todo: i18n -->
<a-checkbox v-model:checked="viewTheme" data-testid="nc-modal-share-view__with-theme" class="!text-sm"> <a-checkbox v-model:checked="viewTheme" data-testid="nc-modal-share-view__with-theme" class="!text-sm">
Use Theme {{ $t('activity.useTheme') }}
</a-checkbox> </a-checkbox>
<Transition name="layout" mode="out-in"> <Transition name="layout" mode="out-in">
@ -400,10 +393,8 @@ watch(shared, () => {
</div> </div>
<div v-if="shared.type === ViewTypes.FORM && isRtl"> <div v-if="shared.type === ViewTypes.FORM && isRtl">
<!-- use RTL orientation in form - todo: i18n -->
<a-checkbox v-model:checked="withRTL" data-testid="nc-modal-share-view__locale" class="!text-sm"> <a-checkbox v-model:checked="withRTL" data-testid="nc-modal-share-view__locale" class="!text-sm">
<!-- todo i18n --> {{ $t('activity.rtlOrientation') }}
RTL Orientation
</a-checkbox> </a-checkbox>
</div> </div>
</div> </div>

8
packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue

@ -217,7 +217,7 @@ watch(
v-bind="validateInfos.emails" v-bind="validateInfos.emails"
validate-trigger="onBlur" validate-trigger="onBlur"
name="emails" name="emails"
:rules="[{ required: true, message: 'Please input email' }]" :rules="[{ required: true, message: t('msg.plsInputEmail') }]"
> >
<div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('datatype.Email') }}:</div> <div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('datatype.Email') }}:</div>
@ -233,7 +233,7 @@ watch(
</div> </div>
<div class="flex flex-col w-1/4"> <div class="flex flex-col w-1/4">
<a-form-item name="role" :rules="[{ required: true, message: 'Role required' }]"> <a-form-item name="role" :rules="[{ required: true, message: t('msg.roleRequired') }]">
<div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div> <div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div>
<a-select <a-select
@ -274,9 +274,9 @@ watch(
</div> </div>
<div class="flex flex-row justify-end gap-x-2 border-t-1 border-gray-100 pt-3"> <div class="flex flex-row justify-end gap-x-2 border-t-1 border-gray-100 pt-3">
<a-button key="back" class="!rounded-md" @click="cancel">Cancel</a-button> <a-button key="back" class="!rounded-md" @click="cancel">{{$t('general.cancel')}}</a-button>
<a-button class="!rounded-md">Manage base access</a-button> <a-button class="!rounded-md">Manage base access</a-button>
<a-button key="submit" class="!rounded-md" type="primary" :loading="loading">Share</a-button> <a-button key="submit" class="!rounded-md" type="primary" :loading="loading">{{$t('activity.share')}}</a-button>
</div> </div>
</div> </div>
</GeneralModal> </GeneralModal>

29
packages/nc-gui/components/template/Editor.vue

@ -706,8 +706,7 @@ function handleUIDTChange(column, table) {
<template #extra> <template #extra>
<a-tooltip bottom> <a-tooltip bottom>
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('activity.deleteTable') }}</span>
<span>Delete Table</span>
</template> </template>
<component <component
:is="iconMap.delete" :is="iconMap.delete"
@ -808,8 +807,7 @@ function handleUIDTChange(column, table) {
<template #extra> <template #extra>
<a-tooltip bottom> <a-tooltip bottom>
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('activity.deleteTable') }}</span>
<span>Delete Table</span>
</template> </template>
<component <component
:is="iconMap.delete" :is="iconMap.delete"
@ -846,8 +844,7 @@ function handleUIDTChange(column, table) {
<template v-else-if="column.key === 'dtxp' && hasSelectColumn[tableIdx]"> <template v-else-if="column.key === 'dtxp' && hasSelectColumn[tableIdx]">
<span> <span>
<!-- TODO: i18n --> {{ $t('general.options')}}
Options
</span> </span>
</template> </template>
</template> </template>
@ -872,7 +869,7 @@ function handleUIDTChange(column, table) {
<a-select-option v-for="(option, i) of uiTypeOptions" :key="i" :value="option.value"> <a-select-option v-for="(option, i) of uiTypeOptions" :key="i" :value="option.value">
<a-tooltip placement="right"> <a-tooltip placement="right">
<template v-if="isSelectDisabled(option.label, table.columns[record.key]?._disableSelect)" #title> <template v-if="isSelectDisabled(option.label, table.columns[record.key]?._disableSelect)" #title>
The field is too large to be converted to {{ option.label }} {{ $t('msg.tooLargeField') }} {{ option.label }}
</template> </template>
{{ option.label }} {{ option.label }}
</a-tooltip> </a-tooltip>
@ -890,8 +887,7 @@ function handleUIDTChange(column, table) {
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<a-tooltip v-if="record.key === 0"> <a-tooltip v-if="record.key === 0">
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('general.primaryValue')}}</span>
<span>Primary Value</span>
</template> </template>
<div class="flex items-center float-right mr-4"> <div class="flex items-center float-right mr-4">
@ -901,8 +897,7 @@ function handleUIDTChange(column, table) {
<a-tooltip v-else> <a-tooltip v-else>
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('activity.deleteColumn') }}</span>
<span>Delete Column</span>
</template> </template>
<a-button type="text" @click="deleteTableColumn(tableIdx, record.key)"> <a-button type="text" @click="deleteTableColumn(tableIdx, record.key)">
@ -918,8 +913,7 @@ function handleUIDTChange(column, table) {
<div class="mt-5 flex gap-2 justify-center"> <div class="mt-5 flex gap-2 justify-center">
<a-tooltip bottom> <a-tooltip bottom>
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('activity.column.addNumberColumn') }}</span>
<span>Add Number Column</span>
</template> </template>
<a-button class="group" @click="addNewColumnRow(tableIdx, 'Number')"> <a-button class="group" @click="addNewColumnRow(tableIdx, 'Number')">
@ -931,8 +925,7 @@ function handleUIDTChange(column, table) {
<a-tooltip bottom> <a-tooltip bottom>
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('activity.column.addSingleLineText') }}</span>
<span>Add SingleLineText Column</span>
</template> </template>
<a-button class="group" @click="addNewColumnRow(tableIdx, 'SingleLineText')"> <a-button class="group" @click="addNewColumnRow(tableIdx, 'SingleLineText')">
@ -944,8 +937,7 @@ function handleUIDTChange(column, table) {
<a-tooltip bottom> <a-tooltip bottom>
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('activity.column.addLongText') }}</span>
<span>Add LongText Column</span>
</template> </template>
<a-button class="group" @click="addNewColumnRow(tableIdx, 'LongText')"> <a-button class="group" @click="addNewColumnRow(tableIdx, 'LongText')">
@ -957,8 +949,7 @@ function handleUIDTChange(column, table) {
<a-tooltip bottom> <a-tooltip bottom>
<template #title> <template #title>
<!-- TODO: i18n --> <span>{{ $t('activity.column.addOther') }}</span>
<span>Add Other Column</span>
</template> </template>
<a-button class="group" @click="addNewColumnRow(tableIdx, 'SingleLineText')"> <a-button class="group" @click="addNewColumnRow(tableIdx, 'SingleLineText')">

16
packages/nc-gui/components/workspace/CreateProjectDlg.vue

@ -3,7 +3,7 @@ import type { RuleObject } from 'ant-design-vue/es/form'
import type { Form, Input } from 'ant-design-vue' import type { Form, Input } from 'ant-design-vue'
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { computed } from '@vue/reactivity' import { computed } from '@vue/reactivity'
import { NcProjectType, baseTitleValidator, extractSdkResponseErrorMsg, ref, useGlobal, useVModel } from '#imports' import { NcProjectType, baseTitleValidator, extractSdkResponseErrorMsg, ref, useGlobal, useVModel, useI18n } from '#imports'
const props = defineProps<{ const props = defineProps<{
modelValue: boolean modelValue: boolean
@ -12,6 +12,8 @@ const props = defineProps<{
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
const { t } = useI18n()
const dialogShow = useVModel(props, 'modelValue', emit) const dialogShow = useVModel(props, 'modelValue', emit)
const baseType = computed(() => props.type ?? NcProjectType.DB) const baseType = computed(() => props.type ?? NcProjectType.DB)
@ -24,7 +26,7 @@ const { navigateToProject } = useGlobal()
const nameValidationRules = [ const nameValidationRules = [
{ {
required: true, required: true,
message: 'Database name is required', message: t('msg.dbNamerequired'),
}, },
baseTitleValidator, baseTitleValidator,
] as RuleObject[] ] as RuleObject[]
@ -95,7 +97,7 @@ const typeLabel = computed(() => {
<!-- Create A New Table --> <!-- Create A New Table -->
<div class="flex flex-row items-center"> <div class="flex flex-row items-center">
<GeneralProjectIcon :type="baseType" class="mr-2.5 !text-lg !h-4" /> <GeneralProjectIcon :type="baseType" class="mr-2.5 !text-lg !h-4" />
Create {{ typeLabel }} {{ $t('general.create')+` ${typeLabel}` }}
</div> </div>
</template> </template>
<div class="mt-3"> <div class="mt-3">
@ -121,19 +123,19 @@ const typeLabel = computed(() => {
</a-form> </a-form>
<div class="flex flex-row justify-end mt-7 gap-x-2"> <div class="flex flex-row justify-end mt-7 gap-x-2">
<NcButton type="secondary" @click="dialogShow = false">Cancel</NcButton> <NcButton type="secondary" @click="dialogShow = false">{{ $t('general.cancel') }}</NcButton>
<NcButton <NcButton
v-e="['a:base:create']" v-e="['a:base:create']"
data-testid="docs-create-proj-dlg-create-btn" data-testid="docs-create-proj-dlg-create-btn"
:loading="creating" :loading="creating"
type="primary" type="primary"
:label="`Create ${typeLabel}`" :label="$t('general.create')+` ${typeLabel}`"
:loading-label="`Creating ${typeLabel}`" :loading-label="`Creating ${typeLabel}`"
@click="createProject" @click="createProject"
> >
{{ `Create ${typeLabel}` }} {{ $t('general.create')+` ${typeLabel}` }}
<template #loading> <template #loading>
{{ `Creating ${typeLabel}` }} {{ $t('general.creating')+` ${typeLabel}` }}
</template> </template>
</NcButton> </NcButton>
</div> </div>

6
packages/nc-gui/components/workspace/InviteCollabDlg.vue

@ -137,7 +137,7 @@ const emailInput = ref((el) => {
<div class="flex flex-col mt-1 border-b-1 pb-5"> <div class="flex flex-col mt-1 border-b-1 pb-5">
<div class="flex flex-row items-center pl-1.5 pb-1 h-[1.1rem]"> <div class="flex flex-row items-center pl-1.5 pb-1 h-[1.1rem]">
<MdiAccountOutline /> <MdiAccountOutline />
<div class="text-xs ml-0.5 mt-0.5">Copy Invite Token</div> <div class="text-xs ml-0.5 mt-0.5">{{ $t('title.copyInviteToken') }}</div>
</div> </div>
<a-alert class="mt-1" type="success" show-icon> <a-alert class="mt-1" type="success" show-icon>
@ -193,7 +193,7 @@ const emailInput = ref((el) => {
v-bind="validateInfos.emails" v-bind="validateInfos.emails"
validate-trigger="onBlur" validate-trigger="onBlur"
name="emails" name="emails"
:rules="[{ required: true, message: 'Please input email' }]" :rules="[{ required: true, message: $t('msg.plsInputEmail') }]"
> >
<div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('datatype.Email') }}:</div> <div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('datatype.Email') }}:</div>
@ -207,7 +207,7 @@ const emailInput = ref((el) => {
</div> </div>
<div class="flex flex-col w-2/4"> <div class="flex flex-col w-2/4">
<a-form-item name="role" :rules="[{ required: true, message: 'Role required' }]"> <a-form-item name="role" :rules="[{ required: true, message: $t('msg.roleRequired') }]">
<div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div> <div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div>
<a-select v-model:value="usersData.role" class="nc-user-roles" dropdown-class-name="nc-dropdown-user-role"> <a-select v-model:value="usersData.role" class="nc-user-roles" dropdown-class-name="nc-dropdown-user-role">

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

@ -76,6 +76,7 @@
"whatsappTwilio": "WhatsApp Twilio", "whatsappTwilio": "WhatsApp Twilio",
"submit": "Submit", "submit": "Submit",
"create": "Create", "create": "Create",
"creating": "Creating",
"details": "Details", "details": "Details",
"skip": "Skip", "skip": "Skip",
"duplicate": "Duplicate", "duplicate": "Duplicate",
@ -174,7 +175,11 @@
"count": "Count", "count": "Count",
"countDistinct": "Count Distinct", "countDistinct": "Count Distinct",
"sumDistinct": "Sum Distinct", "sumDistinct": "Sum Distinct",
"avgDistinct": "Avg Distinct" "avgDistinct": "Avg Distinct",
"join": "Join",
"options": "Options",
"primaryValue": "Primary Value",
"useSurveyMode": "Use Survey Mode"
}, },
"objects": { "objects": {
"workspace": "Workspace", "workspace": "Workspace",
@ -215,6 +220,8 @@
"editor": "Editor", "editor": "Editor",
"commenter": "Commenter", "commenter": "Commenter",
"viewer": "Viewer", "viewer": "Viewer",
"noaccess":"No Access",
"super": "Super",
"orgLevelCreator": "Organization Level Creator", "orgLevelCreator": "Organization Level Creator",
"orgLevelViewer": "Organization Level Viewer" "orgLevelViewer": "Organization Level Viewer"
}, },
@ -314,6 +321,7 @@
"renamingTable": "Renaming Table", "renamingTable": "Renaming Table",
"copyAuthToken": "Copy Auth Token", "copyAuthToken": "Copy Auth Token",
"copiedAuthToken": "Copied Auth Token", "copiedAuthToken": "Copied Auth Token",
"copyInviteToken": "Copy Invite Token",
"showSidebar": "Show Sidebar", "showSidebar": "Show Sidebar",
"hideSidebar": "Hide Sidebar", "hideSidebar": "Hide Sidebar",
"creatingTable": "Creating Table", "creatingTable": "Creating Table",
@ -548,7 +556,7 @@
"requestDataSource": "Request a data source you need?", "requestDataSource": "Request a data source you need?",
"apiKey": "API Key", "apiKey": "API Key",
"personalAccessToken": "Personal Access Token", "personalAccessToken": "Personal Access Token",
"sharedBase": "Shared Base", "sharedBaseUrl": "Shared Base",
"importData": "Import Data", "importData": "Import Data",
"importSecondaryViews": "Import Secondary Views", "importSecondaryViews": "Import Secondary Views",
"importRollupColumns": "Import Rollup Columns", "importRollupColumns": "Import Rollup Columns",
@ -587,7 +595,10 @@
"includeData": "Include Data", "includeData": "Include Data",
"includeView": "Include View", "includeView": "Include View",
"includeWebhook": "Include Webhook", "includeWebhook": "Include Webhook",
"zoomInToViewColumns": "Zoom in to view columns" "zoomInToViewColumns": "Zoom in to view columns",
"embedInSite": "Embed this view in your site",
"titleRequired": "title is required.",
"sourceNameRequired":"Source name is required"
}, },
"activity": { "activity": {
"onCondition": "On Condition", "onCondition": "On Condition",
@ -620,6 +631,8 @@
"useTheme": "Use Theme", "useTheme": "Use Theme",
"copyLink": "Copy Link", "copyLink": "Copy Link",
"copiedLink": "Link Copied", "copiedLink": "Link Copied",
"copyInviteLink":"Copy invite link",
"copiedInviteLink":"Copied invite link",
"copyUrl": "Copy URL", "copyUrl": "Copy URL",
"moreColors": "More Colors", "moreColors": "More Colors",
"moveProject": "Move Base", "moveProject": "Move Base",
@ -761,6 +774,16 @@
"toggleCommentsDraw": "Toggle comments draw", "toggleCommentsDraw": "Toggle comments draw",
"expandRecord": "Expand Record", "expandRecord": "Expand Record",
"deleteRecord": "Delete Record", "deleteRecord": "Delete Record",
"fullWidth": "Full width",
"exitFullWidth": "Full width",
"maskAllAsRead": "Mark all as read",
"column":{
"delete": "Delete Column",
"addNumber": "Add Number Column",
"addSingleLineText": "Add SingleLineText Column",
"addLongText": "Add LongText Column",
"addOther":"Add Other Column"
},
"erd": { "erd": {
"showColumns": "Show Columns", "showColumns": "Show Columns",
"showPkAndFk": "Show Primary and Foreign Keys", "showPkAndFk": "Show Primary and Foreign Keys",
@ -913,6 +936,7 @@
"createNewOptionNamed": "Create new option named" "createNewOptionNamed": "Create new option named"
}, },
"plsEnterANumber": "Please enter a number", "plsEnterANumber": "Please enter a number",
"plsInputEmail": "Please input email",
"invalidDate": "Invalid date", "invalidDate": "Invalid date",
"invalidLocale": "Invalid locale", "invalidLocale": "Invalid locale",
"invalidCurrencyCode": "Invalid Currency Code", "invalidCurrencyCode": "Invalid Currency Code",
@ -951,6 +975,12 @@
"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.",
"length59Required": "The length exceeds the max 59 characters", "length59Required": "The length exceeds the max 59 characters",
"noNewNotifications": "You have no new notifications",
"noRecordFound": "Record not found",
"rowDeleted": "Row deleted",
"saveChanges": "Do you want to save the changes?",
"tooLargeField": "The field is too large to be converted to",
"roleRequired": "Role required",
"warning": { "warning": {
"dbValid": "Please make sure database you are trying to connect is valid! This operation can cause schema loss!!", "dbValid": "Please make sure database you are trying to connect is valid! This operation can cause schema loss!!",
"barcode": { "barcode": {
@ -1110,7 +1140,8 @@
"computedFieldDeleteWarning": "contents are read-only", "computedFieldDeleteWarning": "contents are read-only",
"noMoreRecords": "No more records", "noMoreRecords": "No more records",
"tokenNameNotEmpty": "Token name should not be empty", "tokenNameNotEmpty": "Token name should not be empty",
"tokenNameMaxLength": "Token name should not be more than 255 characters" "tokenNameMaxLength": "Token name should not be more than 255 characters",
"dbNamerequired": "Database name is required"
}, },
"error": { "error": {
"nameRequired": "Name Required", "nameRequired": "Name Required",

28
packages/nocodb-sdk/src/lib/enums.ts

@ -161,20 +161,20 @@ export enum WorkspacePlan {
} }
export const RoleLabels = { export const RoleLabels = {
[WorkspaceUserRoles.OWNER]: 'Owner', [WorkspaceUserRoles.OWNER]: 'owner',
[WorkspaceUserRoles.CREATOR]: 'Creator', [WorkspaceUserRoles.CREATOR]: 'creator',
[WorkspaceUserRoles.EDITOR]: 'Editor', [WorkspaceUserRoles.EDITOR]: 'editor',
[WorkspaceUserRoles.COMMENTER]: 'Commenter', [WorkspaceUserRoles.COMMENTER]: 'commenter',
[WorkspaceUserRoles.VIEWER]: 'Viewer', [WorkspaceUserRoles.VIEWER]: 'viewer',
[ProjectRoles.OWNER]: 'Owner', [ProjectRoles.OWNER]: 'owner',
[ProjectRoles.CREATOR]: 'Creator', [ProjectRoles.CREATOR]: 'creator',
[ProjectRoles.EDITOR]: 'Editor', [ProjectRoles.EDITOR]: 'editor',
[ProjectRoles.COMMENTER]: 'Commenter', [ProjectRoles.COMMENTER]: 'commenter',
[ProjectRoles.VIEWER]: 'Viewer', [ProjectRoles.VIEWER]: 'viewer',
[ProjectRoles.NO_ACCESS]: 'No Access', [ProjectRoles.NO_ACCESS]: 'noaccess',
[OrgUserRoles.SUPER_ADMIN]: 'Super', [OrgUserRoles.SUPER_ADMIN]: 'super',
[OrgUserRoles.CREATOR]: 'Creator', [OrgUserRoles.CREATOR]: 'creator',
[OrgUserRoles.VIEWER]: 'Viewer', [OrgUserRoles.VIEWER]: 'viewer',
}; };
export const RoleColors = { export const RoleColors = {

Loading…
Cancel
Save