From e47d5ba53b7d619bdb83f85b88feadccc8877eab Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 25 Apr 2021 14:12:34 +0300 Subject: [PATCH] fix importer/exporter i18n --- src/components/exporter/exporter.js | 14 ++------------ src/components/exporter/exporter.vue | 4 ++-- src/components/importer/importer.js | 21 +++------------------ src/components/importer/importer.vue | 6 +++--- 4 files changed, 10 insertions(+), 35 deletions(-) diff --git a/src/components/exporter/exporter.js b/src/components/exporter/exporter.js index 51912ac3..fc75372e 100644 --- a/src/components/exporter/exporter.js +++ b/src/components/exporter/exporter.js @@ -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 { diff --git a/src/components/exporter/exporter.vue b/src/components/exporter/exporter.vue index d6a03088..79defdf6 100644 --- a/src/components/exporter/exporter.vue +++ b/src/components/exporter/exporter.vue @@ -7,14 +7,14 @@ spin /> - {{ processingMessage }} + {{ processingMessage || $t('exporter.processing') }} diff --git a/src/components/importer/importer.js b/src/components/importer/importer.js index 59f9beb1..da86a223 100644 --- a/src/components/importer/importer.js +++ b/src/components/importer/importer.js @@ -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 { diff --git a/src/components/importer/importer.vue b/src/components/importer/importer.vue index 210823f5..466e15b9 100644 --- a/src/components/importer/importer.vue +++ b/src/components/importer/importer.vue @@ -18,21 +18,21 @@ class="btn button-default" @click="submit" > - {{ submitButtonLabel }} + {{ submitButtonLabel || $t('importer.submit') }}
-

{{ successMessage }}

+

{{ successMessage || $t('importer.success')}}

-

{{ errorMessage }}

+

{{ errorMessage || $t('importer.error')}}