Add alteration params translations

This commit is contained in:
Jože Fortun
2023-10-26 17:09:59 +02:00
committed by Tomaž Jerman
parent c99f68030d
commit 0d19f76f2d
3 changed files with 26 additions and 26 deletions
@@ -25,12 +25,6 @@
{{ $t('alteration') }}
</b-th>
<b-th
class="text-primary"
>
{{ $t('operation') }}
</b-th>
<b-th
class="text-primary"
style="max-width: 300px;"
@@ -62,10 +56,6 @@
</b-td>
<b-td>
{{ a.kind }}
</b-td>
<b-td style="max-width: 300px; word-wrap: break-word;">
{{ stringifyParams(a.params) }}
</b-td>
@@ -329,28 +319,28 @@ export default {
throw new Error('Unknown alteration type')
},
stringifyAttributeAddParams (params) {
return `Add column ${params.attr.ident} encoded as ${params.attr.store.type} of type ${params.attr.type.type}`
stringifyAttributeAddParams ({ attr = {} }) {
return this.$t('module.schemaAlteration.params.attribute.add', { ident: attr.ident, storeType: attr.store.type, attrType: attr.type.type })
},
stringifyAttributeDeleteParams (params) {
return `Delete column ${params.attr.ident} encoded as ${params.attr.store.type}`
stringifyAttributeDeleteParams ({ attr = {} }) {
return this.$t('module.schemaAlteration.params.attribute.delete', { ident: attr.ident, storeType: attr.store.type })
},
stringifyAttributeReTypeParams (params) {
return `Changing type of column ${params.attr.ident} to ${params.to.type}`
stringifyAttributeReTypeParams ({ attr = {}, to = {} }) {
return this.$t('module.schemaAlteration.params.attribute.delete', { ident: attr.ident, toType: to.type })
},
stringifyAttributeReEncodeParams (params) {
return `Changing encoding of column ${params.attr.ident} to ${params.to.type}`
stringifyAttributeReEncodeParams ({ attr = {}, to = {} }) {
return this.$t('module.schemaAlteration.params.attribute.delete', { ident: attr.ident, toType: to.type })
},
stringifyModelAddParams (params) {
return `Add schema for model ${params.model.ident}`
stringifyModelAddParams ({ attr = {} }) {
return this.$t('module.schemaAlteration.params.model.add', { ident: attr.ident })
},
stringifyModelDeleteParams (params) {
return `Delete schema for model ${params.model.ident}`
stringifyModelDeleteParams ({ attr = {} }) {
return this.$t('module.schemaAlteration.params.model.delete', { ident: attr.ident })
},
canDismiss (alteration) {
@@ -383,6 +383,7 @@
v-if="module.issues.length > 0"
:title="$t('edit.issues.label', { count: module.issues.length })"
title-link-class="text-danger"
@click="checkAlterations"
>
<b-alert
v-for="(issue, index) in module.issues"
@@ -671,6 +672,8 @@ export default {
immediate: true,
async handler (moduleID) {
this.fetchModule(moduleID)
this.fetchSensitivityLevels()
this.checkAlterations()
},
},
@@ -867,9 +870,9 @@ export default {
.then(({ set }) => { this.hasRecords = (set.length > 0) })
})
}
},
this.fetchSensitivityLevels()
checkAlterations () {
// Check if module has Alterations to resolve
for (const i of this.module.issues) {
if (i.meta.batchID) {
+9 -2
View File
@@ -84,7 +84,6 @@ edit:
title: Schema alterations
columns:
alteration: Alteration
operation: Operation
change: Change
status: Status
resolve: Resolve
@@ -93,7 +92,15 @@ edit:
dismiss: Dismiss
waitingFor: Waiting for {{id}}
noAlterations: No schema alterations need to be resolved
params:
attribute:
add: Add column {{ident}} encoded as {{storeType}} of type {{attrType}}
delete: Delete column {{ident}} encoded as {{storeType}}
reType: Changing type of column {{ident}} to {{toType}}
reEncode: Changing encoding of column {{ident}} to {{toType}}
model:
add: Add schema for model {{ident}}
delete: Delete schema for model {{ident}}
config:
dal:
title: Data store