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" :type="dialog.type"
/> />
<!-- heading="Connection was successful" -->
<!-- ok-label="Ok & Save Project" -->
<dlg-ok-new <dlg-ok-new
v-model="testSuccess" v-model="testSuccess"
heading="Connection was successful" :heading="$t('msg.info.dbConnected')"
ok-label="Ok & Save Project" :ok-label="$t('activity.OkSaveProject')"
type="success" type="success"
:btn-attr="{ small: false }" :btn-attr="{ small: false }"
@ok="createOrUpdateProject" @ok="createOrUpdateProject"
@ -2141,7 +2143,8 @@ export default {
switch (res) { switch (res) {
case -1: case -1:
msg.color = 'red' msg.color = 'red'
msg.msg = ' ( Invalid database parameters )' // msg.msg = ' ( Invalid database parameters )'
msg.msg = `( ${this.$t('msg.error.dbConnectionStatus')} )`
break break
case 0: case 0:
msg.color = 'warning' msg.color = 'warning'
@ -2149,7 +2152,8 @@ export default {
break break
case 1: case 1:
msg.color = 'green' msg.color = 'green'
msg.msg = ' ( Environment Validated )' // msg.msg = ' ( Environment Validated )'
msg.msg = `( ${this.$t('msg.info.dbConnectionStatus')} )`
break break
} }
Vue.set(this.project.ui, key, msg) 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-title class="grey darken-2 subheading" style="height:30px" />
<v-card-text class="pt-4 pl-4"> <v-card-text class="pt-4 pl-4">
<p class="headline"> <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> </p>
<v-form ref="form" v-model="valid" @submit.prevent="createView"> <v-form ref="form" v-model="valid" @submit.prevent="createView">
<!-- label="View Name" -->
<v-text-field <v-text-field
ref="name" ref="name"
v-model="view_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']" :rules="[v=>!!v || 'View name required', v => viewsList.every((v1) => (v1.alias || v1.title) !== v) || 'View name should be unique']"
autofocus autofocus
/> />
@ -19,7 +20,7 @@
<v-card-actions class="pa-4"> <v-card-actions class="pa-4">
<v-spacer /> <v-spacer />
<v-btn class="" small @click="$emit('input',false)"> <v-btn class="" small @click="$emit('input',false)">
Cancel {{ $t('general.cancel') }}
</v-btn> </v-btn>
<v-btn <v-btn
small small
@ -28,7 +29,7 @@
:disabled="!valid" :disabled="!valid"
@click="createView" @click="createView"
> >
Submit {{ $t('general.submit') }}
</v-btn> </v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save