From 463aeaefbc43f734906a7efd216cb6c2a2e697ae Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 28 Sep 2023 21:20:28 +0530 Subject: [PATCH 01/36] fix: i18n for Lookup --- .../nc-gui/components/smartsheet/column/LookupOptions.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/column/LookupOptions.vue b/packages/nc-gui/components/smartsheet/column/LookupOptions.vue index 670d6bb4b4..f1891a17d4 100644 --- a/packages/nc-gui/components/smartsheet/column/LookupOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/LookupOptions.vue @@ -14,6 +14,8 @@ const vModel = useVModel(props, 'value', emit) const meta = inject(MetaInj, ref()) +const { t } = useI18n() + const { setAdditionalValidations, validateInfos, onDataTypeChange, isEdit } = useColumnCreateStoreOrThrow() const projectStore = useProject() @@ -22,8 +24,8 @@ const { tables } = storeToRefs(projectStore) const { metas } = useMetas() setAdditionalValidations({ - fk_relation_column_id: [{ required: true, message: 'Required' }], - fk_lookup_column_id: [{ required: true, message: 'Required' }], + fk_relation_column_id: [{ required: true, message: t('general.required') }], + fk_lookup_column_id: [{ required: true, message: t('general.required') }], }) if (!vModel.value.fk_relation_column_id) vModel.value.fk_relation_column_id = null From 53cafa3c1789d86aaf4b7a14b2e215379b815577 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 28 Sep 2023 21:31:38 +0530 Subject: [PATCH 02/36] fix: i18n for Single text --- packages/nc-gui/components/cell/Text.vue | 4 ++-- packages/nc-gui/lang/en.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/cell/Text.vue b/packages/nc-gui/components/cell/Text.vue index 9fc0b9209e..cd7b6efaf8 100644 --- a/packages/nc-gui/components/cell/Text.vue +++ b/packages/nc-gui/components/cell/Text.vue @@ -33,7 +33,7 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value :ref="focus" v-model="vModel" class="h-full w-full outline-none p-2 bg-transparent" - :placeholder="isEditColumn ? '(Optional)' : ''" + :placeholder="isEditColumn ? $t('labels.optional') : ''" @blur="editEnabled = false" @keydown.down.stop @keydown.left.stop @@ -46,7 +46,7 @@ const focus: VNodeRef = (el) => !isExpandedFormOpen.value && !isEditColumn.value @mousedown.stop /> - NULL + {{ $t('general.null') }} diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 06832cb117..0455eebeff 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -62,6 +62,7 @@ "abort": "Abort", "saving": "Saving", "cancel": "Cancel", + "null": "Null", "clear": "Clear", "submit": "Submit", "create": "Create", From a17d512e456b39fdd044bc58a84bbe0eee4d9822 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Fri, 29 Sep 2023 10:05:08 +0530 Subject: [PATCH 03/36] fix: i18n for Barcode --- .../smartsheet/column/BarcodeOptions.vue | 15 ++++++++------- .../components/smartsheet/column/DefaultValue.vue | 2 +- packages/nc-gui/lang/en.json | 4 ++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/column/BarcodeOptions.vue b/packages/nc-gui/components/smartsheet/column/BarcodeOptions.vue index 743de8b473..6eff937686 100644 --- a/packages/nc-gui/components/smartsheet/column/BarcodeOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/BarcodeOptions.vue @@ -22,6 +22,8 @@ const vModel = useVModel(props, 'modelValue', emit) const { setAdditionalValidations, validateInfos, column } = useColumnCreateStoreOrThrow() +const { t } = useI18n() + const columnsAllowedAsBarcodeValue = computed(() => { return fields.value ?.filter( @@ -67,8 +69,8 @@ watch(columnsAllowedAsBarcodeValue, (newColumnsAllowedAsBarcodeValue) => { }) setAdditionalValidations({ - fk_barcode_value_column_id: [{ required: true, message: 'Required' }], - barcode_format: [{ required: true, message: 'Required' }], + fk_barcode_value_column_id: [{ required: true, message: t('general.required') }], + barcode_format: [{ required: true, message: t('general.required') }], }) const showBarcodeValueColumnInfoIcon = computed(() => !columnsAllowedAsBarcodeValue.value?.length) @@ -86,16 +88,15 @@ const showBarcodeValueColumnInfoIcon = computed(() => !columnsAllowedAsBarcodeVa
@@ -111,7 +112,7 @@ const showBarcodeValueColumnInfoIcon = computed(() => !columnsAllowedAsBarcodeVa diff --git a/packages/nc-gui/components/smartsheet/column/DefaultValue.vue b/packages/nc-gui/components/smartsheet/column/DefaultValue.vue index 6c205f86f1..cc266a4063 100644 --- a/packages/nc-gui/components/smartsheet/column/DefaultValue.vue +++ b/packages/nc-gui/components/smartsheet/column/DefaultValue.vue @@ -46,7 +46,7 @@ useProvideSmartsheetRowStore(vModel, rowRef)