From c52b281cb494eee54e3ee0071d2be71b72bfea17 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Fri, 29 Sep 2023 10:52:01 +0530 Subject: [PATCH] fix: i18n for Decimal --- packages/nc-gui/components/cell/Decimal.vue | 4 ++-- .../smartsheet/column/DecimalOptions.vue | 20 ++++++++++--------- packages/nc-gui/lang/en.json | 11 +++++++++- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/packages/nc-gui/components/cell/Decimal.vue b/packages/nc-gui/components/cell/Decimal.vue index 547f14a227..80a7e9fc01 100644 --- a/packages/nc-gui/components/cell/Decimal.vue +++ b/packages/nc-gui/components/cell/Decimal.vue @@ -97,7 +97,7 @@ watch(isExpandedFormOpen, () => { class="outline-none !py-2 !px-1 border-none rounded-md w-full h-full !text-sm" type="number" :step="precision" - :placeholder="isEditColumn ? '(Optional)' : ''" + :placeholder="isEditColumn ? $t('labels.optional') : ''" style="letter-spacing: 0.06rem" @blur="editEnabled = false" @keydown.down.stop="onKeyDown" @@ -110,7 +110,7 @@ watch(isExpandedFormOpen, () => { @selectstart.capture.stop @mousedown.stop /> - NULL + {{ $t('general.null') }} {{ displayValue }} diff --git a/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue b/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue index 38b16f533e..3e7406fe42 100644 --- a/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue @@ -9,15 +9,17 @@ const emit = defineEmits(['update:value']) const precisionFormats = [1, 2, 3, 4, 5, 6, 7, 8] +const { t } = useI18n() + const precisionFormatsDisplay = { - 1: '1.0', - 2: '1.00', - 3: '1.000', - 4: '1.0000', - 5: '1.00000', - 6: '1.000000', - 7: '1.0000000', - 8: '1.00000000', + 1: t('placeholder.decimal1'), + 2: t('placeholder.decimal2'), + 3: t('placeholder.decimal3'), + 4: t('placeholder.decimal4'), + 5: t('placeholder.decimal5'), + 6: t('placeholder.decimal6'), + 7: t('placeholder.decimal7'), + 8: t('placeholder.decimal8'), } const vModel = useVModel(props, 'value', emit) @@ -31,7 +33,7 @@ onMounted(() => {