Browse Source

fix: i18n for Grid

pull/6519/head
Muhammed Mustafa 11 months ago
parent
commit
12796f9a91
  1. 12
      packages/nc-gui/components/smartsheet/grid/Table.vue
  2. 7
      packages/nc-gui/lang/en.json

12
packages/nc-gui/components/smartsheet/grid/Table.vue

@ -231,7 +231,7 @@ async function clearCell(ctx: { row: number; col: number } | null, skipUpdate =
if (!ctx || !hasEditPermission.value || (!isLinksOrLTAR(fields.value[ctx.col]) && isVirtualCol(fields.value[ctx.col]))) return
if (fields.value[ctx.col]?.uidt === UITypes.Links) {
return message.info('Links column clear is not supported yet')
return message.info(t('msg.linkColumnClearNotSupportedYet'))
}
const rowObj = dataRef.value[ctx.row]
@ -266,10 +266,10 @@ async function clearCell(ctx: { row: number; col: number } | null, skipUpdate =
activeCell.row = ctx.row
scrollToCell?.()
} else {
throw new Error('Record could not be found')
throw new Error(t('msg.recordCouldNotBeFound'))
}
} else {
throw new Error('Page size changed')
throw new Error(t('msg.pageSizeChanged'))
}
},
args: [clone(ctx), clone(columnObj), clone(rowObj), clone(paginationDataRef.value)],
@ -293,10 +293,10 @@ async function clearCell(ctx: { row: number; col: number } | null, skipUpdate =
activeCell.row = ctx.row
scrollToCell?.()
} else {
throw new Error('Record could not be found')
throw new Error(t('msg.recordCouldNotBeFound'))
}
} else {
throw new Error('Page size changed')
throw new Error(t('msg.pageSizeChanged'))
}
},
args: [clone(ctx), clone(columnObj), clone(rowObj), clone(paginationDataRef.value)],
@ -1100,7 +1100,7 @@ watch(
await loadData?.()
} catch (e) {
console.log(e)
message.error('Error loading data')
message.error(t('msg.errorLoadingData'))
} finally {
isViewDataLoading.value = false
}

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

@ -810,7 +810,14 @@
"decimal8": "1.00000000"
},
"msg": {
"optimizedQueryDisabled": "Optimized query is disabled",
"optimizedQueryEnabled": "Optimized query is enabled",
"invalidTime": "Invalid Time",
"linkColumnClearNotSupportedYet": "Link column clear is not supported yet",
"recordCouldNotBeFound": "Record could not be found",
"invalidPhoneNumber": "Invalid phone number",
"pageSizeChanged": "Page size changed",
"errorLoadingData": "Error loading data",
"formula": {
"hintStart": "Hint: Use {} to reference columns, e.g: {column_name}. For more, please check out",
"hintEnd": "Formulas.",

Loading…
Cancel
Save