Browse Source

fix(nc-gui): i18n issues

pull/6614/head
reenphygeorge 1 year ago
parent
commit
5fb540d346
  1. 4
      packages/nc-gui/components/dlg/share-and-collaborate/View.vue
  2. 2
      packages/nc-gui/components/notification/Card.vue
  3. 14
      packages/nc-gui/components/workspace/CreateProjectDlg.vue
  4. 4
      packages/nc-gui/components/workspace/InviteCollabDlg.vue
  5. 12
      packages/nc-gui/lang/en.json
  6. 8
      packages/nc-gui/layouts/base.vue
  7. 10
      packages/nc-gui/layouts/new.vue
  8. 2
      packages/nocodb-sdk/src/lib/enums.ts

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">
<MdiTick class="h-3.5" />
{{ $t('activity.copyInviteLink') }}
{{ $t('activity.copiedInviteLink') }}
</div>
<div v-else class="flex flex-row items-center gap-x-1">
<MdiContentCopy class="h-3.3" />
{{ $t('activity.copiedInviteLink') }}
{{ $t('activity.copyInviteLink') }}
</div>
</a-button>
</div>

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

@ -33,7 +33,7 @@ const groupType = computed({
class="cursor-pointer text-xs text-gray-500 hover:text-primary"
@click.stop="notificationStore.markAllAsRead"
>
{{ $t('activity.maskAllAsRead') }}
{{ $t('activity.markAllAsRead') }}
</div>
</div>
</div>

14
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 { VNodeRef } from '@vue/runtime-core'
import { computed } from '@vue/reactivity'
import { NcProjectType, baseTitleValidator, extractSdkResponseErrorMsg, ref, useGlobal, useVModel, useI18n } from '#imports'
import { NcProjectType, baseTitleValidator, extractSdkResponseErrorMsg, ref, useGlobal, useI18n, useVModel } from '#imports'
const props = defineProps<{
modelValue: boolean
@ -26,7 +26,7 @@ const { navigateToProject } = useGlobal()
const nameValidationRules = [
{
required: true,
message: t('msg.dbNamerequired'),
message: t('msg.dbNameRequired'),
},
baseTitleValidator,
] as RuleObject[]
@ -97,7 +97,7 @@ const typeLabel = computed(() => {
<!-- Create A New Table -->
<div class="flex flex-row items-center">
<GeneralProjectIcon :type="baseType" class="mr-2.5 !text-lg !h-4" />
{{ $t('general.create')+` ${typeLabel}` }}
{{ `${$t('general.create')} ${typeLabel}` }}
</div>
</template>
<div class="mt-3">
@ -129,13 +129,13 @@ const typeLabel = computed(() => {
data-testid="docs-create-proj-dlg-create-btn"
:loading="creating"
type="primary"
:label="$t('general.create')+` ${typeLabel}`"
:loading-label="`Creating ${typeLabel}`"
:label="`${$t('general.create')} ${typeLabel}`"
:loading-label="`${$t('general.creating')} ${typeLabel}`"
@click="createProject"
>
{{ $t('general.create')+` ${typeLabel}` }}
{{ `${$t('general.create')} ${typeLabel}` }}
<template #loading>
{{ $t('general.creating')+` ${typeLabel}` }}
{{ `${$t('general.creating')} ${typeLabel}` }}
</template>
</NcButton>
</div>

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

@ -42,7 +42,7 @@ const validators = computed(() => {
{
validator: (rule: any, value: string, callback: (errMsg?: string) => void) => {
if (!value || value.length === 0) {
callback(t('error.signUpRules.emailReqd'))
callback(t('error.signUpRules.emailRequired'))
return
}
const invalidEmails = (value || '').split(/\s*,\s*/).filter((e: string) => !validateEmail(e))
@ -51,7 +51,7 @@ const validators = computed(() => {
`${
invalidEmails.length > 1
? `${t('error.signUpRules.invalidEmails')}: `
: `${t('error.signUpRules.invalidEmails')}: `
: `${t('error.signUpRules.invalidEmail')}: `
} ${invalidEmails.join(', ')} `,
)
} else {

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

@ -182,7 +182,8 @@
"useSurveyMode": "Use Survey Mode",
"shift": "Shift",
"enter": "Enter",
"seconds": "Seconds"
"seconds": "Seconds",
"todo": "todo"
},
"objects": {
"workspace": "Workspace",
@ -224,7 +225,7 @@
"commenter": "Commenter",
"viewer": "Viewer",
"noaccess":"No Access",
"super": "Super",
"superAdmin": "Super Admin",
"orgLevelCreator": "Organization Level Creator",
"orgLevelViewer": "Organization Level Viewer"
},
@ -388,6 +389,7 @@
"resetPasswordMenu": "Reset Password",
"tokens": "Tokens",
"userManagement": "User Management",
"accountManagement": "Account management",
"licence": "Licence",
"allowAllMimeTypes": "Allow All Mime Types",
"defaultView": "Default View",
@ -787,7 +789,7 @@
"deleteRecord": "Delete Record",
"fullWidth": "Full width",
"exitFullWidth": "Full width",
"maskAllAsRead": "Mark all as read",
"markAllAsRead": "Mark all as read",
"column":{
"delete": "Delete Column",
"addNumber": "Add Number Column",
@ -1153,7 +1155,7 @@
"noMoreRecords": "No more records",
"tokenNameNotEmpty": "Token name should not be empty",
"tokenNameMaxLength": "Token name should not be more than 255 characters",
"dbNamerequired": "Database name is required",
"dbNameRequired": "Database name is required",
"wsNameRequired":"Workspace name required",
"wsNameMinLength":"Workspace name must be at least 3 characters long",
"wsNameMaxLength":"Workspace name must be at most 50 characters long",
@ -1181,7 +1183,7 @@
"dbConnectionFailed": "Connection Failure:",
"nullFilterExists": "Null filter exists. Please remove them",
"signUpRules": {
"emailReqd": "Email is required",
"emailRequired": "Email is required",
"emailInvalid": "Email must be valid",
"passwdRequired": "Password is required",
"passwdLength": "You password must be atleast 8 characters",

8
packages/nc-gui/layouts/base.vue

@ -97,8 +97,8 @@ hooks.hook('page:finish', () => {
</nuxt-link>
</a-menu-item>
<a-menu-divider class="!m-0" />
<!-- <a-menu-item v-if="isUIAllowed('superAdminAppStore')" key="0" class="!rounded-t">
<!-- <a-menu-divider class="!m-0" />
<a-menu-item v-if="isUIAllowed('superAdminAppStore')" key="0" class="!rounded-t">
<nuxt-link
v-e="['c:settings:appstore', { page: true }]"
class="nc-base-menu-item group !no-underline"
@ -106,8 +106,8 @@ hooks.hook('page:finish', () => {
>
<MdiShieldAccountOutline class="mt-1 group-hover:text-accent" />&nbsp;
&lt;!&ndash; &ndash;&gt;
<span class="prose group-hover:text-primary">Account management</span>
&lt;!&ndash; {{`${$t('general.todo')}: i18n`}} &ndash;&gt;
<span class="prose group-hover:text-primary">{{ $t('title.accountManagement') }}</span>
</nuxt-link>
</a-menu-item>

10
packages/nc-gui/layouts/new.vue

@ -58,7 +58,7 @@ export default {
<div v-if="$route.name === 'index-index'" class="flex gap-1">
<!-- <a-button class="!text-inherit" data-testid="nc-dash-nav-workspaces"> Projects</a-button -->
<!-- <a-button ghost !text-inherit" data-testid="nc-dash-nav-explore"> Template</a-button>
<!-- <a-button ghost class="!text-inherit" data-testid="nc-dash-nav-explore"> Template</a-button>
<a-button ghost class="!text-inherit" data-testid="nc-dash-nav-help"> Help</a-button> -->
</div>
<div class="flex-1 min-w-0 flex justify-end gap-2">
@ -99,7 +99,7 @@ export default {
</a-menu-item>
<a-menu-divider class="!m-0" />
<!-- <a-menu-item v-if="isUIAllowed('superAdminAppStore')" key="0" class="!rounded-t">
<a-menu-item v-if="isUIAllowed('superAdminAppStore')" key="0" class="!rounded-t">
<nuxt-link
v-e="['c:settings:appstore', { page: true }]"
class="nc-base-menu-item group !no-underline"
@ -107,12 +107,12 @@ export default {
>
<MdiShieldAccountOutline class="mt-1 group-hover:text-accent" />&nbsp;
&lt;!&ndash; &ndash;&gt;
<span class="prose group-hover:text-primary">Account management</span>
&lt;!&ndash; {{`${$t('general.todo')}: i18n`}} &ndash;&gt;
<span class="prose group-hover:text-primary">{{ $t('title.accountManagement') }}</span>
</nuxt-link>
</a-menu-item>
<a-menu-divider class="!m-0" /> -->
<a-menu-divider class="!m-0" />
<a-menu-item key="1" class="!rounded-b group" data-testid="nc-menu-accounts__sign-out">
<div

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

@ -172,7 +172,7 @@ export const RoleLabels = {
[ProjectRoles.COMMENTER]: 'commenter',
[ProjectRoles.VIEWER]: 'viewer',
[ProjectRoles.NO_ACCESS]: 'noaccess',
[OrgUserRoles.SUPER_ADMIN]: 'super',
[OrgUserRoles.SUPER_ADMIN]: 'superAdmin',
[OrgUserRoles.CREATOR]: 'creator',
[OrgUserRoles.VIEWER]: 'viewer',
};

Loading…
Cancel
Save