Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix inconsistent non-ii18n tag and label displays.

Kailash Nadh6a316979f814
diff --git a/frontend/src/views/Campaign.vue b/frontend/src/views/Campaign.vue
index e4b21dfe..ec2d6ff0 100644
--- a/frontend/src/views/Campaign.vue
+++ b/frontend/src/views/Campaign.vue
@@ -3,8 +3,12 @@
<header class="columns">
<div class="column is-8">
<p v-if="isEditing" class="tags">
- <b-tag v-if="isEditing" :class="data.status">{{ data.status }}</b-tag>
- <b-tag v-if="data.type === 'optin'" :class="data.type">{{ data.type }}</b-tag>
+ <b-tag v-if="isEditing" :class="data.status">
+ {{ $t(`campaigns.status.${data.status}`) }}
+ </b-tag>
+ <b-tag v-if="data.type === 'optin'" :class="data.type">
+ {{ $t('lists.optin') }}
+ </b-tag>
<span v-if="isEditing" class="has-text-grey-light is-size-7">
{{ $t('globals.fields.id') }}: {{ data.id }} /
{{ $t('globals.fields.uuid') }}: {{ data.uuid }}
diff --git a/frontend/src/views/Campaigns.vue b/frontend/src/views/Campaigns.vue
index 46b79f65..18ba813f 100644
--- a/frontend/src/views/Campaigns.vue
+++ b/frontend/src/views/Campaigns.vue
@@ -58,8 +58,8 @@
sortable header-class="cy-name">
<div>
<p>
- <b-tag v-if="props.row.type !== 'regular'" class="is-small">
- {{ props.row.type }}
+ <b-tag v-if="props.row.type === 'optin'" class="is-small">
+ {{ $t('lists.optin') }}
</b-tag>
<router-link :to="{ name: 'campaign', params: { 'id': props.row.id }}">
{{ props.row.name }}</router-link>
diff --git a/frontend/src/views/ListForm.vue b/frontend/src/views/ListForm.vue
index 044de34f..f9e1de9a 100644
--- a/frontend/src/views/ListForm.vue
+++ b/frontend/src/views/ListForm.vue
@@ -6,7 +6,9 @@
{{ $t('globals.fields.id') }}: {{ data.id }} /
{{ $t('globals.fields.uuid') }}: {{ data.uuid }}
</p>
- <b-tag v-if="isEditing" :class="[data.type, 'is-pulled-right']">{{ data.type }}</b-tag>
+ <b-tag v-if="isEditing" :class="[data.type, 'is-pulled-right']">
+ {{ $t(`lists.types.${data.type}`) }}
+ </b-tag>
<h4 v-if="isEditing">{{ data.name }}</h4>
<h4 v-else>{{ $t('lists.newList') }}</h4>
</header>
diff --git a/frontend/src/views/Lists.vue b/frontend/src/views/Lists.vue
index 42e19136..a19c30f5 100644
--- a/frontend/src/views/Lists.vue
+++ b/frontend/src/views/Lists.vue
@@ -42,14 +42,14 @@
header-class="cy-type" sortable>
<div>
<b-tag :class="props.row.type" :data-cy="`type-${props.row.type}`">
- {{ $t('lists.types.' + props.row.type) }}
+ {{ $t(`lists.types.${props.row.type}`) }}
</b-tag>
{{ ' ' }}
<b-tag :data-cy="`optin-${props.row.optin}`">
<b-icon :icon="props.row.optin === 'double' ?
'account-check-outline' : 'account-off-outline'" size="is-small" />
{{ ' ' }}
- {{ $t('lists.optins.' + props.row.optin) }}
+ {{ $t(`lists.optins.${props.row.optin}`) }}
</b-tag>{{ ' ' }}
<a v-if="props.row.optin === 'double'" class="is-size-7 send-optin"
href="#" @click="$utils.confirm(null, () => createOptinCampaign(props.row))"
diff --git a/frontend/src/views/SubscriberForm.vue b/frontend/src/views/SubscriberForm.vue
index 7cd32413..85fe350e 100644
--- a/frontend/src/views/SubscriberForm.vue
+++ b/frontend/src/views/SubscriberForm.vue
@@ -2,7 +2,9 @@
<form @submit.prevent="onSubmit">
<div class="modal-card content" style="width: auto">
<header class="modal-card-head">
- <b-tag v-if="isEditing" :class="[data.status, 'is-pulled-right']">{{ data.status }}</b-tag>
+ <b-tag v-if="isEditing" :class="[data.status, 'is-pulled-right']">
+ {{ $t(`subscribers.status.${data.status}`) }}
+ </b-tag>
<h4 v-if="isEditing">{{ data.name }}</h4>
<h4 v-else>{{ $t('subscribers.newSubscriber') }}</h4>
diff --git a/frontend/src/views/Subscribers.vue b/frontend/src/views/Subscribers.vue
index 7f34462f..25ebdf55 100644
--- a/frontend/src/views/Subscribers.vue
+++ b/frontend/src/views/Subscribers.vue
@@ -118,7 +118,7 @@
<a :href="`/subscribers/${props.row.id}`"
@click.prevent="showEditForm(props.row)">
<b-tag :class="props.row.status">
- {{ $t('subscribers.status.'+ props.row.status) }}
+ {{ $t(`subscribers.status.${props.row.status}`) }}
</b-tag>
</a>
</b-table-column>