- {{ $t("Skip") }}
- {{ $t("Cancel") }}
+ {{ translate("Skip") }}
+ {{ translate("Cancel") }}
@@ -93,7 +93,7 @@
-
+
@@ -101,10 +101,10 @@
-
{{ $t("There are no jobs running right now")}}
+
{{ translate("There are no jobs running right now")}}
- {{ $t('retry') }}
+ {{ translate('retry') }}
@@ -128,7 +128,7 @@
- {{ job.runtimeData.threshold }} {{ $t('threshold') }}
+ {{ job.runtimeData.threshold }} {{ translate('threshold') }}
@@ -168,7 +168,7 @@
-
+
@@ -176,10 +176,10 @@
-
{{ $t("No jobs have run yet")}}
+
{{ translate("No jobs have run yet")}}
- {{ $t('retry') }}
+ {{ translate('retry') }}
@@ -206,7 +206,7 @@
- {{ job.runtimeData.threshold }} {{ $t('threshold') }}
+ {{ job.runtimeData.threshold }} {{ translate('threshold') }}
@@ -247,7 +247,7 @@
-
+
@@ -311,6 +311,7 @@ import { ProductService } from '@/services/ProductService';
import { Actions, hasPermission } from '@/authorization'
import JobReorderModal from '@/components/JobReorderModal.vue';
import emitter from '@/event-bus';
+import { translate } from '@hotwax/dxp-components';
export default defineComponent({
name: "ThresholdUpdates",
@@ -403,7 +404,7 @@ export default defineComponent({
await Clipboard.write({
string: jobDetails
}).then(() => {
- showToast(this.$t("Copied job details to clipboard"));
+ showToast(translate("Copied job details to clipboard"));
})
},
async viewJobHistory(job: any) {
@@ -472,15 +473,15 @@ export default defineComponent({
async skipJob (job: any) {
const alert = await alertController
.create({
- header: this.$t('Skip job'),
- message: this.$t('Skipping will run this job at the next occurrence based on the temporal expression.'),
+ header: translate('Skip job'),
+ message: translate('Skipping will run this job at the next occurrence based on the temporal expression.'),
buttons: [
{
- text: this.$t("Don't skip"),
+ text: translate("Don't skip"),
role: 'cancel',
},
{
- text: this.$t('Skip'),
+ text: translate('Skip'),
handler: async () => {
await this.store.dispatch('job/skipJob', job);
await this.store.dispatch('job/fetchPendingJobs', {viewIndex: 0, jobEnums: this.jobEnums})
@@ -508,15 +509,15 @@ export default defineComponent({
async cancelJob(job: any){
const alert = await alertController
.create({
- header: this.$t('Cancel job'),
- message: this.$t('Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.'),
+ header: translate('Cancel job'),
+ message: translate('Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.'),
buttons: [
{
- text: this.$t("DON'T CANCEL"),
+ text: translate("DON'T CANCEL"),
role: 'cancel',
},
{
- text: this.$t("CANCEL"),
+ text: translate("CANCEL"),
handler: async () => {
const resp = await this.store.dispatch('job/cancelJob', job);
if(resp.status == 200 && !hasError(resp) && resp.data.successMessage) {
@@ -627,7 +628,8 @@ export default defineComponent({
optionsOutline,
timeOutline,
timerOutline,
- segmentSelected
+ segmentSelected,
+ translate
};
}
});
diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue
index 0e8918a1..28dfa3a7 100644
--- a/src/views/TimezoneModal.vue
+++ b/src/views/TimezoneModal.vue
@@ -6,17 +6,17 @@
-
{{ $t("Select time zone") }}
+
{{ translate("Select time zone") }}
-
+
-
{{ $t("No time zone found")}}
+
{{ translate("No time zone found")}}
@@ -64,6 +64,7 @@ import { useStore } from "@/store";
import { UserService } from "@/services/UserService";
import { hasError } from '@/utils'
import { DateTime } from 'luxon';
+import { translate } from "@hotwax/dxp-components";
export default defineComponent({
name: "TimeZoneModal",
@@ -97,16 +98,16 @@ export default defineComponent({
modalController.dismiss({ dismissed: true });
},
async saveAlert() {
- const message = this.$t("Are you sure you want to change the time zone to?", { timeZoneId: this.timeZoneId });
+ const message = translate("Are you sure you want to change the time zone to?", { timeZoneId: this.timeZoneId });
const alert = await alertController.create({
- header: this.$t("Update time zone"),
+ header: translate("Update time zone"),
message,
buttons: [
{
- text: this.$t("Cancel"),
+ text: translate("Cancel"),
},
{
- text: this.$t("Confirm"),
+ text: translate("Confirm"),
handler: () => {
this.setUserTimeZone();
}
@@ -160,7 +161,8 @@ export default defineComponent({
return {
close,
save,
- store
+ store,
+ translate
};
}
});
diff --git a/vue.config.js b/vue.config.js
index d6c807fd..7e26e710 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,18 +1,6 @@
const path = require('path')
require("@hotwax/app-version-info")
module.exports = {
- pluginOptions: {
- i18n: {
- locale: 'en',
- fallbackLocale: 'en',
- localeDir: 'locales',
- enableLegacy: true,
- runtimeOnly: true,
- compositionOnly: false,
- fullInstall: true,
- enableInSFC: true
- }
- },
configureWebpack: {
resolve: {
alias: {