fix importer/exporter i18n

This commit is contained in:
Henry Jameson 2021-04-25 14:12:34 +03:00
parent 8d46fd78c7
commit e47d5ba53b
4 changed files with 10 additions and 35 deletions

View file

@ -15,18 +15,8 @@ const Exporter = {
type: String,
default: 'export.csv'
},
exportButtonLabel: {
type: String,
default () {
return this.$t('exporter.export')
}
},
processingMessage: {
type: String,
default () {
return this.$t('exporter.processing')
}
}
exportButtonLabel: { type: String },
processingMessage: { type: String }
},
data () {
return {

View file

@ -7,14 +7,14 @@
spin
/>
<span>{{ processingMessage }}</span>
<span>{{ processingMessage || $t('exporter.processing') }}</span>
</div>
<button
v-else
class="btn button-default"
@click="process"
>
{{ exportButtonLabel }}
{{ exportButtonLabel || $t('exporter.export') }}
</button>
</div>
</template>

View file

@ -15,24 +15,9 @@ const Importer = {
type: Function,
required: true
},
submitButtonLabel: {
type: String,
default () {
return this.$t('importer.submit')
}
},
successMessage: {
type: String,
default () {
return this.$t('importer.success')
}
},
errorMessage: {
type: String,
default () {
return this.$t('importer.error')
}
}
submitButtonLabel: { type: String },
successMessage: { type: String },
errorMessage: { type: String }
},
data () {
return {

View file

@ -18,21 +18,21 @@
class="btn button-default"
@click="submit"
>
{{ submitButtonLabel }}
{{ submitButtonLabel || $t('importer.submit') }}
</button>
<div v-if="success">
<FAIcon
icon="times"
@click="dismiss"
/>
<p>{{ successMessage }}</p>
<p>{{ successMessage || $t('importer.success')}}</p>
</div>
<div v-else-if="error">
<FAIcon
icon="times"
@click="dismiss"
/>
<p>{{ errorMessage }}</p>
<p>{{ errorMessage || $t('importer.error')}}</p>
</div>
</div>
</template>