Browse Source

fix: i18n for LTAR

pull/6519/head
Muhammed Mustafa 11 months ago
parent
commit
97a4d9e188
  1. 22
      packages/nc-gui/components/smartsheet/column/LinkedToAnotherRecordOptions.vue
  2. 9
      packages/nc-gui/lang/en.json

22
packages/nc-gui/components/smartsheet/column/LinkedToAnotherRecordOptions.vue

@ -19,8 +19,10 @@ const { setAdditionalValidations, validateInfos, onDataTypeChange, sqlUi, isXcdb
const projectStore = useProject()
const { tables } = storeToRefs(projectStore)
const { t } = useI18n()
setAdditionalValidations({
childId: [{ required: true, message: 'Required' }],
childId: [{ required: true, message: t('general.required') }],
})
const onUpdateDeleteOptions = sqlUi === MssqlUi ? ['NO ACTION'] : ['NO ACTION', 'CASCADE', 'RESTRICT', 'SET NULL', 'SET DEFAULT']
@ -110,7 +112,14 @@ const isLinks = computed(() => vModel.value.uidt === UITypes.Links)
@change="onDataTypeChange"
>
<a-select-option v-for="(option, i) of onUpdateDeleteOptions" :key="i" :value="option">
{{ option }}
<template v-if="option === 'NO ACTION'">{{ $t('title.links.noAction') }}</template>
<template v-else-if="option === 'CASCADE'">{{ $t('title.links.cascade') }}</template>
<template v-else-if="option === 'RESTRICT'">{{ $t('title.links.restrict') }}</template>
<template v-else-if="option === 'SET NULL'">{{ $t('title.links.setNull') }}</template>
<template v-else-if="option === 'SET DEFAULT'">{{ $t('title.links.setDefault') }}</template>
<template v-else>
{{ option }}
</template>
</a-select-option>
</a-select>
</a-form-item>
@ -124,7 +133,14 @@ const isLinks = computed(() => vModel.value.uidt === UITypes.Links)
@change="onDataTypeChange"
>
<a-select-option v-for="(option, i) of onUpdateDeleteOptions" :key="i" :value="option">
{{ option }}
<template v-if="option === 'NO ACTION'">{{ $t('title.links.noAction') }}</template>
<template v-else-if="option === 'CASCADE'">{{ $t('title.links.cascade') }}</template>
<template v-else-if="option === 'RESTRICT'">{{ $t('title.links.restrict') }}</template>
<template v-else-if="option === 'SET NULL'">{{ $t('title.links.setNull') }}</template>
<template v-else-if="option === 'SET DEFAULT'">{{ $t('title.links.setDefault') }}</template>
<template v-else>
{{ option }}
</template>
</a-select-option>
</a-select>
</a-form-item>

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

@ -346,7 +346,14 @@
"defaultView": "Default View",
"relations": "Relations",
"switchLanguage": "Switch Language",
"renameFile": "Rename File"
"renameFile": "Rename File",
"links": {
"noAction": "No Action",
"cascade": "Cascade",
"restrict": "Restrict",
"setNull": "Set NULL",
"setDefault": "Set Default"
}
},
"labels": {
"syntax": "Syntax",

Loading…
Cancel
Save