Browse Source

fix: i18n for Time Picker

pull/6519/head
Muhammed Mustafa 1 year ago
parent
commit
48806e3675
  1. 8
      packages/nc-gui/components/cell/TimePicker.vue

8
packages/nc-gui/components/cell/TimePicker.vue

@ -38,6 +38,8 @@ const isTimeInvalid = ref(false)
const dateFormat = isMysql(column.value.base_id) ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm:ssZ' const dateFormat = isMysql(column.value.base_id) ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm:ssZ'
const { t } = useI18n()
const localState = computed({ const localState = computed({
get() { get() {
if (!modelValue) { if (!modelValue) {
@ -89,11 +91,11 @@ watch(
const placeholder = computed(() => { const placeholder = computed(() => {
if (isEditColumn.value && (modelValue === '' || modelValue === null)) { if (isEditColumn.value && (modelValue === '' || modelValue === null)) {
return '(Optional)' return t('labels.optional')
} else if (modelValue === null && showNull.value) { } else if (modelValue === null && showNull.value) {
return 'NULL' return t('general.null')
} else if (isTimeInvalid.value) { } else if (isTimeInvalid.value) {
return 'Invalid time' return t('msg.invalidTime')
} else { } else {
return '' return ''
} }

Loading…
Cancel
Save