diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue
index ae68ab7aad..eafeca7270 100644
--- a/packages/nc-gui/components/cell/MultiSelect.vue
+++ b/packages/nc-gui/components/cell/MultiSelect.vue
@@ -378,7 +378,7 @@ const selectedOpts = computed(() => {
v-model:value="vModel"
mode="multiple"
class="w-full overflow-hidden"
- :placeholder="isEditColumn ? '(Optional)' : ''"
+ :placeholder="isEditColumn ? $t('labels.optional') : ''"
:bordered="false"
clear-icon
show-search
@@ -421,7 +421,7 @@ const selectedOpts = computed(() => {
- Create new option named {{ searchVal }}
+ {{ $t('msg.selectOption.createNewOptionNamed') }} {{ searchVal }}
diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue
index 4e357d1cb2..5c0475addf 100644
--- a/packages/nc-gui/components/cell/SingleSelect.vue
+++ b/packages/nc-gui/components/cell/SingleSelect.vue
@@ -286,7 +286,7 @@ const selectedOpt = computed(() => {
v-model:value="vModel"
class="w-full overflow-hidden"
:class="{ 'caret-transparent': !hasEditRoles }"
- :placeholder="isEditColumn ? '(Optional)' : ''"
+ :placeholder="isEditColumn ? $t('labels.optional') : ''"
:allow-clear="!column.rqd && editAllowed"
:bordered="false"
:open="isOpen && editAllowed"
@@ -324,7 +324,7 @@ const selectedOpt = computed(() => {
- Create new option named {{ searchVal }}
+ {{ $t('msg.selectOption.createNewOptionNamed') }} {{ searchVal }}
diff --git a/packages/nc-gui/components/smartsheet/column/SelectOptions.vue b/packages/nc-gui/components/smartsheet/column/SelectOptions.vue
index c7d731c906..75d2bd5b9b 100644
--- a/packages/nc-gui/components/smartsheet/column/SelectOptions.vue
+++ b/packages/nc-gui/components/smartsheet/column/SelectOptions.vue
@@ -49,6 +49,8 @@ const defaultOption = ref()
const isKanban = inject(IsKanbanInj, ref(false))
+const { t } = useI18n()
+
const validators = {
colOptions: [
{
@@ -61,13 +63,13 @@ const validators = {
if ((opt as any).status === 'remove') continue
if (!opt.title.length) {
- return reject(new Error("Select options can't be null"))
+ return reject(new Error(t('msg.selectOption.cantBeNull')))
}
if (vModel.value.uidt === UITypes.MultiSelect && opt.title.includes(',')) {
- return reject(new Error("MultiSelect columns can't have commas(',')"))
+ return reject(new Error(t('msg.selectOption.multiSelectCantHaveCommas')))
}
if (options.value.filter((el) => el.title === opt.title && (el as any).status !== 'remove').length > 1) {
- return reject(new Error("Select options can't have duplicates"))
+ return reject(new Error(t('msg.selectOption.cantHaveDuplicates')))
}
}
resolve()
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index 1c82e4128c..a2af2f49f4 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -835,6 +835,12 @@
"columnWithTypeFoundButExpected": "Column {columnName} with {columnType} type is found but {expectedType} type is expected",
"columnNotMatchedWithType": "{columnName} is not matched with {columnType}"
},
+ "selectOption": {
+ "cantBeNull": "Select options can't be null",
+ "multiSelectCantHaveCommas": "MultiSelect columns can't have commas(',')",
+ "cantHaveDuplicates": "Select options can't have duplicates",
+ "createNewOptionNamed": "Create new option named"
+ },
"plsEnterANumber": "Please enter a number",
"invalidDate": "Invalid date",
"invalidLocale": "Invalid locale",