Browse Source

refactor: i18n changes for different dialog windows

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/1330/head
Raju Udava 3 years ago
parent
commit
66a3453cd6
  1. 12
      packages/nc-gui/components/createOrEditProject.vue
  2. 9
      packages/nc-gui/components/project/spreadsheet/dialog/createViewDialog.vue
  3. 4
      packages/nc-gui/components/utils/dlgLabelSubmitCancel.vue
  4. 2
      packages/nc-gui/components/utils/dlgOk.vue
  5. 4
      packages/nc-gui/components/utils/dlgOkNew.vue
  6. 7
      packages/nc-gui/components/utils/dlgTableCreate.vue
  7. 4
      packages/nc-gui/components/utils/dlgTextSubmitCancel.vue
  8. 2
      packages/nc-gui/components/utils/dlgUnexpectedError.vue
  9. 4
      packages/nc-gui/components/utils/dlgViewCreate.vue

12
packages/nc-gui/components/createOrEditProject.vue

@ -941,10 +941,12 @@
:type="dialog.type"
/>
<!-- heading="Connection was successful" -->
<!-- ok-label="Ok & Save Project" -->
<dlg-ok-new
v-model="testSuccess"
heading="Connection was successful"
ok-label="Ok & Save Project"
:heading="$t('msg.info.dbConnected')"
:ok-label="$t('activity.OkSaveProject')"
type="success"
:btn-attr="{ small: false }"
@ok="createOrUpdateProject"
@ -2141,7 +2143,8 @@ export default {
switch (res) {
case -1:
msg.color = 'red'
msg.msg = ' ( Invalid database parameters )'
// msg.msg = ' ( Invalid database parameters )'
msg.msg = `( ${this.$t('msg.error.dbConnectionStatus')} )`
break
case 0:
msg.color = 'warning'
@ -2149,7 +2152,8 @@ export default {
break
case 1:
msg.color = 'green'
msg.msg = ' ( Environment Validated )'
// msg.msg = ' ( Environment Validated )'
msg.msg = `( ${this.$t('msg.info.dbConnectionStatus')} )`
break
}
Vue.set(this.project.ui, key, msg)

9
packages/nc-gui/components/project/spreadsheet/dialog/createViewDialog.vue

@ -4,13 +4,14 @@
<v-card-title class="grey darken-2 subheading" style="height:30px" />
<v-card-text class="pt-4 pl-4">
<p class="headline">
Create <span class="text-capitalize">{{ show_as }}</span> View
{{ $t('general.create') }} <span class="text-capitalize">{{ show_as }}</span> {{ $t('objects.view') }}
</p>
<v-form ref="form" v-model="valid" @submit.prevent="createView">
<!-- label="View Name" -->
<v-text-field
ref="name"
v-model="view_name"
label="View Name"
:label="$t('labels.viewName')"
:rules="[v=>!!v || 'View name required', v => viewsList.every((v1) => (v1.alias || v1.title) !== v) || 'View name should be unique']"
autofocus
/>
@ -19,7 +20,7 @@
<v-card-actions class="pa-4">
<v-spacer />
<v-btn class="" small @click="$emit('input',false)">
Cancel
{{ $t('general.cancel') }}
</v-btn>
<v-btn
small
@ -28,7 +29,7 @@
:disabled="!valid"
@click="createView"
>
Submit
{{ $t('general.submit') }}
</v-btn>
</v-card-actions>
</v-card>

4
packages/nc-gui/components/utils/dlgLabelSubmitCancel.vue

@ -23,14 +23,14 @@
<v-card-actions class="pa-4">
<v-spacer />
<v-btn small class="" @click="actionsMtd('hideDialog')">
Cancel
{{ $t('general.cancel') }}
</v-btn>
<v-btn
small
:class="type"
@click="actionsMtd()"
>
Submit
{{ $t('general.submit') }}
</v-btn>
</v-card-actions>
</v-card>

2
packages/nc-gui/components/utils/dlgOk.vue

@ -28,7 +28,7 @@
:class="type"
@click="mtdOk()"
>
Ok
{{ $t('general.ok') }}
</v-btn>
</v-card-actions>
</v-card>

4
packages/nc-gui/components/utils/dlgOkNew.vue

@ -22,13 +22,13 @@
<v-btn
@click="show = false;"
>
{{ cancelLabel || 'Cancel' }}
{{ cancelLabel || $t('general.cancel') }}
</v-btn>
<v-btn
:color="type"
@click="$emit('ok');show = false;"
>
{{ okLabel || 'Ok' }}
{{ okLabel || $t('general.ok') }}
</v-btn>
</v-card-actions>
</v-card>

7
packages/nc-gui/components/utils/dlgTableCreate.vue

@ -6,10 +6,11 @@
@keydown.esc="dialogShow = false"
@keydown.enter="$emit('create', table)"
>
<!-- Create A New Table -->
<v-card class="elevation-1 backgroundColor nc-create-table-card">
<v-form ref="form" v-model="valid">
<v-card-title class="primary subheading white--text py-2">
Create A New Table
{{ $t('activity.createTable') }}
</v-card-title>
<v-card-text class=" py-6 px-10 ">
@ -103,7 +104,7 @@
<v-card-actions class="py-4 px-10">
<v-spacer />
<v-btn class="" @click="dialogShow = false">
Cancel
{{ $t('general.cancel') }}
</v-btn>
<v-btn
:disabled="!(table.name && table.name.length) || !(table.alias && table.alias.length) || !valid"
@ -111,7 +112,7 @@
class="nc-create-table-submit"
@click="$emit('create',table)"
>
Submit
{{ $t('general.submit') }}
</v-btn>
</v-card-actions>
</v-form>

4
packages/nc-gui/components/utils/dlgTextSubmitCancel.vue

@ -35,14 +35,14 @@
<v-card-actions class="pa-4">
<v-spacer />
<v-btn small class="" @click="mtdDialogCancel()">
Cancel
{{ $t('general.cancel') }}
</v-btn>
<v-btn
small
class="primary"
@click="submitForm"
>
{{ submitText || 'Submit' }}
{{ submitText || $t('general.submit') }}
</v-btn>
</v-card-actions>
</v-card>

2
packages/nc-gui/components/utils/dlgUnexpectedError.vue

@ -21,7 +21,7 @@
<v-card-actions class="pa-1">
<v-spacer />
<v-btn small class="" @click="errorDialogCancel">
Cancel
{{ $t('general.cancel') }}
</v-btn>
<v-btn
small

4
packages/nc-gui/components/utils/dlgViewCreate.vue

@ -39,14 +39,14 @@
<v-card-actions class="py-4 px-10">
<v-spacer />
<v-btn class="" @click="dialogShow = false">
Cancel
{{ $t('general.cancel') }}
</v-btn>
<v-btn
:disabled="!(view.name && view.name.length) || !(view.alias && view.alias.length)"
color="primary"
@click="$emit('create',view)"
>
Submit
{{ $t('general.submit') }}
</v-btn>
</v-card-actions>
</v-card>

Loading…
Cancel
Save