From a24099333008458c131c0ad6d259ffdcd17629b1 Mon Sep 17 00:00:00 2001 From: raxelsen Date: Tue, 12 Feb 2019 13:46:03 +0100 Subject: [PATCH] TT#52575 Replace hardcoded english terms Change-Id: I74e5d8b67fb1f748050dae7563593c258b3764cb --- src/api/reminder.js | 36 ---------------- src/components/CscRemoveDialog.vue | 4 +- src/components/Error404.vue | 8 ++-- .../CallForward/CscAddDestinationForm.vue | 2 +- .../pages/CallForward/CscCallForwardTime.vue | 43 ------------------- .../pages/CallForward/CscDestinations.vue | 25 ++++++++--- .../pages/CallForward/CscSourcesets.vue | 6 +-- src/components/pages/Home.vue | 4 +- .../PbxConfiguration/CscPbxCallQueue.vue | 4 +- .../CscPbxCallQueueAddForm.vue | 4 +- .../pages/PbxConfiguration/CscPbxGroup.vue | 2 +- .../PbxConfiguration/CscPbxGroupAddForm.vue | 2 +- src/components/pages/Voicebox/Voicebox.vue | 4 +- src/locales/en.json | 19 ++++++-- src/store/call-forward.js | 4 +- 15 files changed, 61 insertions(+), 106 deletions(-) diff --git a/src/api/reminder.js b/src/api/reminder.js index 40ecb1a8..39c6b79e 100644 --- a/src/api/reminder.js +++ b/src/api/reminder.js @@ -96,39 +96,3 @@ export function setReminderRecurrence(reminderId, reccurence) { value: reccurence }); } - -// export function enableReminder(id) { -// return patchReminder(id, '/active', true); -// } -// -// export function disableReminder(id) { -// return patchReminder(id, '/active', false); -// } -// -// export function setTime(id, time) { -// return patchReminder(id, '/time', time); -// } -// -// export function setRecurrence(id, recurrence) { -// return patchReminder(id, '/recur', recurrence); -// } -// -// function patchReminder(id, field, value) { -// return new Promise((resolve, reject) => { -// var data = [{ -// "op": "replace", -// "path": field, -// "value": value -// }]; -// var patchHeaders = { -// headers: { -// 'Content-Type': 'application/json-patch+json' -// } -// }; -// Vue.http.patch('api/reminders/' + id, data, patchHeaders).then(() => { -// resolve(); -// }).catch((err) => { -// reject(err); -// }); -// }); -// } diff --git a/src/components/CscRemoveDialog.vue b/src/components/CscRemoveDialog.vue index 1099e228..60bfd761 100644 --- a/src/components/CscRemoveDialog.vue +++ b/src/components/CscRemoveDialog.vue @@ -16,7 +16,9 @@ color="negative" flat @click="remove" - >Remove + > + {{ $t('buttons.remove') }} + diff --git a/src/components/Error404.vue b/src/components/Error404.vue index e5da6028..d2304b0d 100644 --- a/src/components/Error404.vue +++ b/src/components/Error404.vue @@ -1,9 +1,11 @@ diff --git a/src/components/pages/CallForward/CscAddDestinationForm.vue b/src/components/pages/CallForward/CscAddDestinationForm.vue index 0f255a25..2c1f66f1 100644 --- a/src/components/pages/CallForward/CscAddDestinationForm.vue +++ b/src/components/pages/CallForward/CscAddDestinationForm.vue @@ -43,7 +43,7 @@ :before="beforeIconTimeout" :float-label="$t('pages.callForward.timeout')" v-model="destinationForm.timeout" - suffix="seconds" + :suffix="$t('pages.callForward.seconds')" clearable @input="$v.destinationForm.timeout.$touch" @blur="$v.destinationForm.timeout.$touch" diff --git a/src/components/pages/CallForward/CscCallForwardTime.vue b/src/components/pages/CallForward/CscCallForwardTime.vue index 062aa8d9..16dc2bc1 100644 --- a/src/components/pages/CallForward/CscCallForwardTime.vue +++ b/src/components/pages/CallForward/CscCallForwardTime.vue @@ -51,13 +51,11 @@ QField, QInput, QDatetime, - // Dialog, QBtn, QItem, QItemMain, QItemTile, QItemSide, - // Alert, date } from 'quasar-framework' @@ -103,55 +101,14 @@ }, methods: { deleteTime(index) { - // let self = this; - // let store = this.$store; if (this.timesLength <= 1) { this.$emit('delete-last-time', index); - - - // Alert.create({ - // enter: 'bounceInRight', - // leave: 'bounceOutRight', - // position: 'top-center', - // html: self.$t('pages.callForward.times.removeLastDialogText'), - // icon: 'warning', - // actions: [ - // { - // label: self.$t('buttons.cancel') - // }, - // { - // label: self.$t('buttons.remove'), - // handler () { - // store.dispatch('callForward/deleteTimesetById') - // } - // } - // ] - // }); } else { this.$emit('delete-time', { index: index, removedDay: this.weekday }); - // Dialog.create({ - // title: self.$t('pages.callForward.times.removeDialogTitle'), - // message: self.$t('pages.callForward.times.removeDialogText', { - // day: self.weekday - // }), - // buttons: [ - // self.$t('buttons.cancel'), - // { - // label: self.$t('buttons.remove'), - // color: 'negative', - // handler () { - // store.dispatch('callForward/deleteTimeFromTimeset', { - // index: index, - // removedDay: self.weekday - // }) - // } - // } - // ] - // }); } } } diff --git a/src/components/pages/CallForward/CscDestinations.vue b/src/components/pages/CallForward/CscDestinations.vue index 9a3142ed..3f93d773 100644 --- a/src/components/pages/CallForward/CscDestinations.vue +++ b/src/components/pages/CallForward/CscDestinations.vue @@ -13,7 +13,7 @@ highlight inset-separator v-if="showOwnPhone && group.length > 0" - :class="{ ['csc-own-phone']: !isMobile }" + :class="itemClasses" > - + @@ -184,11 +184,11 @@ mode: 'whitelist', modes: [ { - label: 'Whitelist', + label: this.$t('pages.callForward.whitelist'), value: 'whitelist' }, { - label: 'Blacklist', + label: this.$t('pages.callForward.blacklist'), value: 'blacklist' } ], diff --git a/src/components/pages/Home.vue b/src/components/pages/Home.vue index e95f8c26..4248ee2d 100644 --- a/src/components/pages/Home.vue +++ b/src/components/pages/Home.vue @@ -147,14 +147,14 @@ let self = this; return [ { - label: 'Install', + label: this.$t('buttons.install'), handler () { self.$store.commit('call/desktopSharingInstallReset'); window.open(getChromeExtensionUrl()); } }, { - label: 'Cancel', + label: this.$t('buttons.cancel'), handler () { self.$store.commit('call/desktopSharingInstallReset'); } diff --git a/src/components/pages/PbxConfiguration/CscPbxCallQueue.vue b/src/components/pages/PbxConfiguration/CscPbxCallQueue.vue index 09d4c1a5..6aa21a60 100644 --- a/src/components/pages/PbxConfiguration/CscPbxCallQueue.vue +++ b/src/components/pages/PbxConfiguration/CscPbxCallQueue.vue @@ -67,7 +67,7 @@ > @@ -39,7 +39,7 @@ v-model="data.queue_wrap_up_time" :float-label="$t('pbxConfig.wrapUpTime')" clearable - suffix="seconds" + :suffix="$t('pbxConfig.seconds')" />
diff --git a/src/components/pages/PbxConfiguration/CscPbxGroup.vue b/src/components/pages/PbxConfiguration/CscPbxGroup.vue index fa1a448f..15b1cc9a 100644 --- a/src/components/pages/PbxConfiguration/CscPbxGroup.vue +++ b/src/components/pages/PbxConfiguration/CscPbxGroup.vue @@ -89,7 +89,7 @@ dark v-model="changes.huntTimeout" type="number" - suffix="seconds" + :suffix="$t('pbxConfig.seconds')" :after="huntTimeoutButtons" :min="0" @keyup.enter="saveHuntTimeout" diff --git a/src/components/pages/PbxConfiguration/CscPbxGroupAddForm.vue b/src/components/pages/PbxConfiguration/CscPbxGroupAddForm.vue index f46b055c..0a244bc6 100644 --- a/src/components/pages/PbxConfiguration/CscPbxGroupAddForm.vue +++ b/src/components/pages/PbxConfiguration/CscPbxGroupAddForm.vue @@ -48,7 +48,7 @@ v-model="data.huntTimeout" clearable :float-label="$t('pbxConfig.huntTimeout')" - suffix="seconds" + :suffix="$t('pbxConfig.seconds')" :min="1" :max="3600" /> diff --git a/src/components/pages/Voicebox/Voicebox.vue b/src/components/pages/Voicebox/Voicebox.vue index 08852059..51836209 100644 --- a/src/components/pages/Voicebox/Voicebox.vue +++ b/src/components/pages/Voicebox/Voicebox.vue @@ -165,7 +165,7 @@ Dialog.create({ title: self.$t('voicebox.deleteCustomDialogTitle'), message: self.$t('voicebox.deleteCustomDialogText', { - type: 'busy' + type: self.$t('voicebox.busy') }), buttons: [ { @@ -191,7 +191,7 @@ Dialog.create({ title: self.$t('voicebox.deleteCustomDialogTitle'), message: self.$t('voicebox.deleteCustomDialogText', { - type: 'unavailable' + type: self.$t('voicebox.unavailable') }), buttons: [ { diff --git a/src/locales/en.json b/src/locales/en.json index b2f18f36..1049d388 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -8,6 +8,7 @@ "sendSms": "Send SMS", "sendFax": "Send Fax", "loggedInAs": "Logged in as", + "notFound" : "404 Not Found", "buttons": { "cancel": "Cancel", "save": "Save", @@ -22,7 +23,9 @@ "upload": "Upload", "abort": "Abort", "selectNew": "Select new", - "resetDefaults": "Reset to defaults" + "resetDefaults": "Reset to defaults", + "install": "Install", + "addNew": "Add new" }, "form": { "destinationLabel": "Destination" @@ -213,6 +216,13 @@ "updateOwnPhoneTimeoutSuccessMessage": "Own phone timeout set to {timeout}", "updateOwnPhoneTimeoutErrorMessage": "An error occured while trying to update own phone timeout. Please try again", "ownPhone": "own phone", + "disable": "Disable", + "enable": "Enable", + "whitelist": "Whitelist", + "blacklist": "Blacklist", + "enabled": "enabled", + "disabled": "disabled", + "seconds": "seconds", "times": { "removeDialogTitle": "Remove call forward time", "removeDialogText": "You are about to remove the time entry for {day}", @@ -398,7 +408,9 @@ "callQueue": "Call Queue", "createConfig": "Create Call Queue", "removeConfigTitle": "Remove call queue", - "removeConfigText": "You are about to remove call queue for {subscriber}" + "removeConfigText": "You are about to remove call queue for {subscriber}", + "seconds": "seconds", + "callers": "callers" }, "callBlocking": { "privacyEnabledToast": "Your number is hidden to the callee", @@ -473,6 +485,7 @@ "deleteGreetingSuccessMessage": "Deleted greeting sound successfully", "deleteGreetingErrorMessage": "An error occured while trying to delete the greeting sound. Please try again", "deleteCustomDialogTitle": "Reset busy greeting sound", - "deleteCustomDialogText": "You are about to reset the custom {type} greeting sound to defaults" + "deleteCustomDialogText": "You are about to reset the custom {type} greeting sound to defaults", + "unavailable": "unavailable" } } diff --git a/src/store/call-forward.js b/src/store/call-forward.js index 127ac1e5..4e1eb3d5 100644 --- a/src/store/call-forward.js +++ b/src/store/call-forward.js @@ -480,7 +480,9 @@ export default { state.updateOwnPhoneToggleError = null }, updateOwnPhoneSucceeded(state, type) { - let toggle = type === 'cft' ? 'enabled' : 'disabled'; + let toggle = type === 'cft' + ? i18n.t('pages.callForward.enabled') + : i18n.t('pages.callForward.disabled'); state.lastOwnPhoneToggle = toggle; state.updateOwnPhoneToggleState = RequestState.succeeded; state.updateOwnPhoneToggleError = null