TT#105551 Convert key based i18n translations to gettext based ones

AC:
Can see the keys replaced by the actual english translation in the code
Can see the language files, including the english one, using the english translation as keys
Can see no more nested structure but flat a one only
Change-Id: I3c3fc18ff91d972cb592c8cab43b66da16193a1c
mr9.3
Sergii Leonenko 4 years ago
parent a10897307e
commit d02f82e69c

@ -69,8 +69,8 @@ In order to add a new page you need to go along the following steps:
path: '/user/new-feature', path: '/user/new-feature',
component: CscPageNewFeature, component: CscPageNewFeature,
meta: { meta: {
title: i18n.t('pages.newFeature.title'), title: i18n.t('New features'),
subtitle: i18n.t('navigation.newFeature.subTitle') subtitle: i18n.t('New features sub-title')
} }
} }
``` ```
@ -83,8 +83,8 @@ In order to add a new page you need to go along the following steps:
{ {
to: '/user/new-feature', to: '/user/new-feature',
icon: 'fancy_icon', icon: 'fancy_icon',
label: this.$t('navigation.newFeature.title'), label: this.$t('New features'),
sublabel: this.$t('navigation.newFeature.subTitle'), sublabel: this.$t('New features sub-title'),
visible: true visible: true
} }
``` ```

@ -501,13 +501,13 @@ export function getDaysFromRange (options) {
let fromDay = options.fromDay let fromDay = options.fromDay
const toDay = options.toDay + 1 const toDay = options.toDay + 1
const wdayMap = { const wdayMap = {
1: i18n.t('pages.callForward.times.sunday'), 1: i18n.t('Sunday'),
2: i18n.t('pages.callForward.times.monday'), 2: i18n.t('Monday'),
3: i18n.t('pages.callForward.times.tuesday'), 3: i18n.t('Tuesday'),
4: i18n.t('pages.callForward.times.wednesday'), 4: i18n.t('Wednesday'),
5: i18n.t('pages.callForward.times.thursday'), 5: i18n.t('Thursday'),
6: i18n.t('pages.callForward.times.friday'), 6: i18n.t('Friday'),
7: i18n.t('pages.callForward.times.saturday') 7: i18n.t('Saturday')
} }
const days = [] const days = []
while (fromDay < toDay) { while (fromDay < toDay) {

@ -23,7 +23,7 @@ export async function setFaxServerField (options) {
// searching for duplicates // searching for duplicates
const destinationsIds = options.value.map(d => d.destination) const destinationsIds = options.value.map(d => d.destination)
if ((new Set(destinationsIds)).size !== destinationsIds.length) { if ((new Set(destinationsIds)).size !== destinationsIds.length) {
throw Error(i18n.t('faxSettings.destinationEmailExists')) throw Error(i18n.t('The Destination Email is already used'))
} }
} }
return patchReplaceFull({ return patchReplaceFull({
@ -50,7 +50,7 @@ export async function setMailToFaxSettingField (options) {
// searching for duplicates // searching for duplicates
const destinationsIds = options.value.map(d => d.destination) const destinationsIds = options.value.map(d => d.destination)
if ((new Set(destinationsIds)).size !== destinationsIds.length) { if ((new Set(destinationsIds)).size !== destinationsIds.length) {
throw Error(i18n.t('faxSettings.notifyEmailExists')) throw Error(i18n.t('The Notify Email is already used'))
} }
} }
return patchReplaceFull({ return patchReplaceFull({

@ -30,7 +30,7 @@ export function getUnassignedSlots (id) {
const slotOptions = [] const slotOptions = []
unassignedSlots.forEach((slot) => { unassignedSlots.forEach((slot) => {
slotOptions.push({ slotOptions.push({
label: `${i18n.t('speedDial.slot')} ${slot}`, label: `${i18n.t('Slot')} ${slot}`,
value: slot value: slot
}) })
}) })

@ -1,9 +1,9 @@
export default ({ Vue, app }) => { export default ({ Vue, app }) => {
Vue.prototype.$faxQualityOptions = [ Vue.prototype.$faxQualityOptions = [
{ label: app.i18n.t('communication.quality.normal'), value: 'normal' }, { label: app.i18n.t('Normal'), value: 'normal' },
{ label: app.i18n.t('communication.quality.fine'), value: 'fine' }, { label: app.i18n.t('Fine'), value: 'fine' },
{ label: app.i18n.t('communication.quality.super'), value: 'super' } { label: app.i18n.t('Super'), value: 'super' }
] ]
Vue.prototype.$faxQualityOptionsDefault = Vue.prototype.$faxQualityOptions[0] Vue.prototype.$faxQualityOptionsDefault = Vue.prototype.$faxQualityOptions[0]
} }

@ -41,7 +41,7 @@ export default ({ app, router, store }) => {
}) })
router.afterEach((to, from) => { router.afterEach((to, from) => {
const mainTitle = app.i18n.t('title') const mainTitle = app.i18n.t('CSC')
let title = _.get(to, 'meta.title', '') let title = _.get(to, 'meta.title', '')
const subTitle = _.get(to, 'meta.subtitle', '') const subTitle = _.get(to, 'meta.subtitle', '')
if (mainTitle !== '') { if (mainTitle !== '') {

@ -7,7 +7,7 @@ export default ({ Vue, app }) => {
let message = null let message = null
_.forEach(def.$params, (param, paramName) => { _.forEach(def.$params, (param, paramName) => {
if (def[paramName] === false) { if (def[paramName] === false) {
message = app.i18n.t('validators.' + paramName) message = app.i18n.t('validators.' + paramName) // TODO: does it work? we should recheck translations
} }
}) })
return message return message

@ -4,7 +4,7 @@
:value="value" :value="value"
:loading="loading" :loading="loading"
title-icon="vpn_key" title-icon="vpn_key"
:title="$t('pages.login.changePassword')" :title="$t('Change password')"
class="csc-pbx-password-dialog" class="csc-pbx-password-dialog"
@input="$emit('input')" @input="$emit('input')"
@hide="$emit('dialog-closed')" @hide="$emit('dialog-closed')"
@ -29,7 +29,7 @@
:loading="loading" :loading="loading"
@click="$refs.changePasswordForm.submit()" @click="$refs.changePasswordForm.submit()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</div> </div>
</csc-dialog> </csc-dialog>

@ -18,7 +18,7 @@
flat flat
@click="confirm" @click="confirm"
> >
{{ $t('buttons.confirm') }} {{ $t('Confirm') }}
</q-btn> </q-btn>
</csc-dialog> </csc-dialog>
</template> </template>

@ -45,7 +45,7 @@
icon="clear" icon="clear"
color="white" color="white"
flat flat
:label="$t('buttons.cancel')" :label="$t('Cancel')"
@click="cancel" @click="cancel"
/> />
<slot <slot

@ -2,14 +2,14 @@
<csc-dialog <csc-dialog
ref="dialog" ref="dialog"
title-icon="vpn_key" title-icon="vpn_key"
:title="$t('userSettings.changePasswordDialogTitle')" :title="$t('Change login password')"
> >
<template <template
v-slot:actions v-slot:actions
> >
<q-btn <q-btn
icon="check" icon="check"
:label="$t('buttons.confirm')" :label="$t('Confirm')"
:disable="!ready" :disable="!ready"
unelevated unelevated
text-color="dark" text-color="dark"

@ -4,7 +4,7 @@
v-if="!menuMinimized" v-if="!menuMinimized"
class="q-pr-md q-pl-md q-pt-xs q-pb-xs text-subtitle2" class="q-pr-md q-pl-md q-pt-xs q-pb-xs text-subtitle2"
> >
{{ $t('navigation.newFeatures.header.title') }} {{ $t('New features') }}
</div> </div>
<csc-main-menu <csc-main-menu
:items="items" :items="items"
@ -64,7 +64,7 @@ export default {
{ {
to: '/user/new-call-forward', to: '/user/new-call-forward',
icon: 'phone_forwarded', icon: 'phone_forwarded',
label: this.$t('navigation.callForward.title'), label: this.$t('Call Forwarding'),
visible: true visible: true
} }
] ]

@ -61,14 +61,14 @@ export default {
{ {
to: '/conference', to: '/conference',
icon: 'videocam', icon: 'videocam',
label: this.$t('navigation.conference.title'), label: this.$t('Join conference'),
visible: this.isRtcEngineUiVisible visible: this.isRtcEngineUiVisible
}, },
{ {
to: '/user/conversations', to: '/user/conversations',
icon: 'question_answer', icon: 'question_answer',
label: this.$t('navigation.conversations.title'), label: this.$t('Conversations'),
sublabel: this.$t('navigation.conversations.subTitle'), sublabel: this.$t('Calls, Faxes, VoiceMails'),
visible: true visible: true
}, },
{ {
@ -85,7 +85,7 @@ export default {
{ {
to: '/user/voicebox', to: '/user/voicebox',
icon: 'voicemail', icon: 'voicemail',
label: this.$t('navigation.voicebox.title'), label: this.$t('Voicebox'),
visible: true visible: true
}, },
{ {
@ -109,19 +109,19 @@ export default {
{ {
to: '/user/call-blocking/privacy', to: '/user/call-blocking/privacy',
icon: 'fas fa-user-secret', icon: 'fas fa-user-secret',
label: this.$t('navigation.callBlocking.privacy'), label: this.$t('Privacy'),
visible: true visible: true
}, },
{ {
to: '/user/speeddial', to: '/user/speeddial',
icon: 'touch_app', icon: 'touch_app',
label: this.$t('navigation.speeddial.title'), label: this.$t('Speed Dial'),
visible: true visible: true
}, },
{ {
to: '/user/reminder', to: '/user/reminder',
icon: 'notification_important', icon: 'notification_important',
label: this.$t('navigation.reminder.title'), label: this.$t('Reminder'),
visible: true visible: true
} }
] ]
@ -129,49 +129,49 @@ export default {
{ {
to: '/user/fax-settings', to: '/user/fax-settings',
icon: 'fas fa-fax', icon: 'fas fa-fax',
label: this.$t('navigation.faxSettings.title'), label: this.$t('Fax Settings'),
visible: this.hasFaxCapability visible: this.hasFaxCapability
}, },
{ {
icon: 'miscellaneous_services', icon: 'miscellaneous_services',
label: this.$t('navigation.pbxConfiguration.title'), label: this.$t('PBX Configuration'),
visible: this.isPbxAdmin, visible: this.isPbxAdmin,
opened: this.isPbxConfiguration, opened: this.isPbxConfiguration,
children: [ children: [
{ {
to: '/user/pbx-configuration/seats', to: '/user/pbx-configuration/seats',
icon: 'person', icon: 'person',
label: this.$t('navigation.pbxConfiguration.seats'), label: this.$t('Seats'),
visible: true visible: true
}, },
{ {
to: '/user/pbx-configuration/groups', to: '/user/pbx-configuration/groups',
icon: 'group', icon: 'group',
label: this.$t('navigation.pbxConfiguration.groups'), label: this.$t('Groups'),
visible: true visible: true
}, },
{ {
to: '/user/pbx-configuration/devices', to: '/user/pbx-configuration/devices',
icon: 'fas fa-fax', icon: 'fas fa-fax',
label: this.$t('navigation.pbxConfiguration.devices'), label: this.$t('Devices'),
visible: true visible: true
}, },
{ {
to: '/user/pbx-configuration/call-queues', to: '/user/pbx-configuration/call-queues',
icon: 'filter_none', icon: 'filter_none',
label: this.$t('navigation.pbxConfiguration.callQueues'), label: this.$t('Call Queues'),
visible: true visible: true
}, },
{ {
to: '/user/pbx-configuration/sound-sets', to: '/user/pbx-configuration/sound-sets',
icon: 'queue_music', icon: 'queue_music',
label: this.$t('navigation.pbxConfiguration.soundSets'), label: this.$t('Sound Sets'),
visible: true visible: true
}, },
{ {
to: '/user/pbx-configuration/ms-configs', to: '/user/pbx-configuration/ms-configs',
icon: 'arrow_forward', icon: 'arrow_forward',
label: this.$t('navigation.pbxConfiguration.msConfigs'), label: this.$t('Manager Secretary'),
visible: true visible: true
} }
] ]
@ -179,7 +179,7 @@ export default {
{ {
to: '/user/pbx-settings', to: '/user/pbx-settings',
icon: 'settings', icon: 'settings',
label: this.$t('navigation.pbxSettings.title'), label: this.$t('PBX Settings'),
visible: this.isPbxEnabled visible: this.isPbxEnabled
} }
] ]

@ -2,7 +2,7 @@
<csc-popup-menu-item <csc-popup-menu-item
icon="delete" icon="delete"
color="negative" color="negative"
:label="$t('buttons.remove')" :label="$t('Remove')"
@click="$emit('click', $event)" @click="$emit('click', $event)"
/> />
</template> </template>

@ -2,7 +2,7 @@
<csc-popup-menu-item <csc-popup-menu-item
icon="call" icon="call"
color="primary" color="primary"
:label="$t('pages.conversations.buttons.call')" :label="$t('Call back')"
@click="$emit('click', $event)" @click="$emit('click', $event)"
/> />
</template> </template>

@ -18,7 +18,7 @@
flat flat
@click="remove" @click="remove"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</q-btn> </q-btn>
</csc-dialog> </csc-dialog>
</template> </template>

@ -2,7 +2,7 @@
<csc-dialog <csc-dialog
:value="value" :value="value"
title-icon="vpn_key" title-icon="vpn_key"
:title="$t('pages.login.forgotPassword')" :title="$t('Forgot password?')"
@input="$emit('input')" @input="$emit('input')"
@hide="resetForm()" @hide="resetForm()"
> >
@ -16,7 +16,7 @@
v-model.trim="username" v-model.trim="username"
clearable clearable
dense dense
:label="$t('pages.login.username')" :label="$t('Username')"
type="text" type="text"
:error="$v.username.$error" :error="$v.username.$error"
:error-message="$errorMessage($v.username)" :error-message="$errorMessage($v.username)"
@ -41,7 +41,7 @@
icon="check" icon="check"
unelevated unelevated
color="primary" color="primary"
:label="$t('toasts.send')" :label="$t('Send')"
:loading="newPasswordRequesting" :loading="newPasswordRequesting"
:disable="!username || username.length < 1 || newPasswordRequesting" :disable="!username || username.length < 1 || newPasswordRequesting"
@click="submit()" @click="submit()"
@ -105,7 +105,7 @@ export default {
position: 'top', position: 'top',
color: 'negative', color: 'negative',
icon: 'error', icon: 'error',
message: this.$t('toasts.errorPasswordReset') message: this.$t('There was an error, please retry later')
}) })
} finally { } finally {
this.$emit('close') this.$emit('close')

@ -10,13 +10,13 @@
<q-card-section <q-card-section
class="text-h6" class="text-h6"
> >
{{ $t('communication.sendFax') }} {{ $t('Send Fax') }}
</q-card-section> </q-card-section>
<q-card-section> <q-card-section>
<csc-call-input <csc-call-input
v-if="value" v-if="value"
v-model="form.destination" v-model="form.destination"
:label="$t('communication.label.destination')" :label="$t('Destination Number')"
@submit="sendFax" @submit="sendFax"
@error="error" @error="error"
/> />
@ -25,13 +25,13 @@
emit-value emit-value
map-options map-options
:options="$faxQualityOptions" :options="$faxQualityOptions"
:label="$t('communication.label.quality')" :label="$t('Quality')"
/> />
<q-input <q-input
v-model="form.pageHeader" v-model="form.pageHeader"
clearable clearable
type="text" type="text"
:label="$t('communication.label.pageHeader')" :label="$t('Page Header')"
:error="$v.form.pageHeader.$error" :error="$v.form.pageHeader.$error"
:error-message="pageHeaderErrorMessage" :error-message="pageHeaderErrorMessage"
@input="$v.form.pageHeader.$touch" @input="$v.form.pageHeader.$touch"
@ -43,7 +43,7 @@
type="textarea" type="textarea"
:max-height="100" :max-height="100"
:min-rows="10" :min-rows="10"
:label="$t('communication.label.content')" :label="$t('Content')"
:error="$v.form.data.$error" :error="$v.form.data.$error"
:error-message="dataErrorMessage" :error-message="dataErrorMessage"
@input="$v.form.data.$touch" @input="$v.form.data.$touch"
@ -59,14 +59,14 @@
flat flat
icon="clear" icon="clear"
color="default" color="default"
:label="$t('communication.cancel')" :label="$t('Cancel')"
/> />
<q-btn <q-btn
flat flat
color="primary" color="primary"
icon="send" icon="send"
:disable="formDisabled" :disable="formDisabled"
:label="$t('communication.send')" :label="$t('Send')"
@click="sendFax" @click="sendFax"
/> />
</q-card-actions> </q-card-actions>
@ -78,7 +78,7 @@
<!-- class="upload-label"--> <!-- class="upload-label"-->
<!-- >--> <!-- >-->
<!-- <div class="upload-label">--> <!-- <div class="upload-label">-->
<!-- {{ $t('communication.label.faxFile') }}--> <!-- {{ $t('Fax File') }}-->
<!-- </div>--> <!-- </div>-->
<!-- <q-btn--> <!-- <q-btn-->
<!-- flat--> <!-- flat-->
@ -87,7 +87,7 @@
<!-- class="upload-button"--> <!-- class="upload-button"-->
<!-- @click="$refs.faxUpload.click()"--> <!-- @click="$refs.faxUpload.click()"-->
<!-- >--> <!-- >-->
<!-- {{ $t('buttons.select') }}--> <!-- {{ $t('Select') }}-->
<!-- </q-btn>--> <!-- </q-btn>-->
<!-- <span class="upload-filename">--> <!-- <span class="upload-filename">-->
<!-- {{ selectedFile }}--> <!-- {{ selectedFile }}-->
@ -124,7 +124,7 @@
<!-- color="default"--> <!-- color="default"-->
<!-- @mousedown.native="hideModal"--> <!-- @mousedown.native="hideModal"-->
<!-- >--> <!-- >-->
<!-- {{ $t('communication.cancel') }}--> <!-- {{ $t('Cancel') }}-->
<!-- </q-btn>--> <!-- </q-btn>-->
<!-- <q-btn--> <!-- <q-btn-->
<!-- flat--> <!-- flat-->
@ -133,7 +133,7 @@
<!-- :disable="formDisabled"--> <!-- :disable="formDisabled"-->
<!-- @click="sendFax"--> <!-- @click="sendFax"-->
<!-- >--> <!-- >-->
<!-- {{ $t('communication.send') }}--> <!-- {{ $t('Send') }}-->
<!-- </q-btn>--> <!-- </q-btn>-->
</q-dialog> </q-dialog>
</template> </template>
@ -204,20 +204,20 @@ export default {
!this.hasContentToSend !this.hasContentToSend
}, },
pageHeaderErrorMessage () { pageHeaderErrorMessage () {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('communication.label.pageHeader'), field: this.$t('Page Header'),
maxLength: this.$v.form.pageHeader.$params.maxLength.max maxLength: this.$v.form.pageHeader.$params.maxLength.max
}) })
}, },
dataErrorMessage () { dataErrorMessage () {
if (!this.$v.form.data.required) { if (!this.$v.form.data.required) {
return this.$t('validationErrors.fieldRequiredXor', { return this.$t('{fieldOne} or {fieldTwo} is required', {
fieldOne: this.$t('communication.label.content'), fieldOne: this.$t('Content'),
fieldTwo: this.$t('communication.label.file') fieldTwo: this.$t('File')
}) })
} else if (!this.$v.form.data.maxLength) { } else if (!this.$v.form.data.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('communication.label.content'), field: this.$t('Content'),
maxLength: this.$v.form.data.$params.maxLength.max maxLength: this.$v.form.data.$params.maxLength.max
}) })
} else { } else {
@ -225,9 +225,9 @@ export default {
} }
}, },
fileErrorMessage () { fileErrorMessage () {
return this.$t('validationErrors.fieldRequiredXor', { return this.$t('{fieldOne} or {fieldTwo} is required', {
fieldOne: this.$t('communication.label.file'), fieldOne: this.$t('File'),
fieldTwo: this.$t('communication.label.content') fieldTwo: this.$t('Content')
}) })
} }
}, },
@ -253,7 +253,7 @@ export default {
sendFax () { sendFax () {
if (this.$v.form.$error || if (this.$v.form.$error ||
this.destinationError) { this.destinationError) {
showGlobalError(this.$t('validationErrors.generic')) showGlobalError(this.$t('You have invalid form input. Please check and try again.'))
} else { } else {
this.$store.dispatch('communication/createFax', this.form) this.$store.dispatch('communication/createFax', this.form)
} }

@ -10,7 +10,7 @@
dark dark
dense dense
no-error-icon no-error-icon
:placeholder="$t('pages.newCallForward.dateRangeStartTime')" :placeholder="$t('Start time')"
class="q-pa-sm" class="q-pa-sm"
@click="$refs.timeFromPopup.show()" @click="$refs.timeFromPopup.show()"
> >
@ -36,7 +36,7 @@
> >
<q-btn <q-btn
v-close-popup v-close-popup
:label="$t('buttons.close')" :label="$t('Close')"
color="primary" color="primary"
flat flat
/> />
@ -54,7 +54,7 @@
dark dark
dense dense
no-error-icon no-error-icon
:placeholder="$t('pages.newCallForward.dateRangeEndTime')" :placeholder="$t('End time')"
class="q-pa-sm" class="q-pa-sm"
@click="$refs.timeToPopup.show()" @click="$refs.timeToPopup.show()"
> >
@ -80,7 +80,7 @@
> >
<q-btn <q-btn
v-close-popup v-close-popup
:label="$t('buttons.close')" :label="$t('Close')"
color="primary" color="primary"
flat flat
/> />
@ -145,7 +145,7 @@ export default {
} }
} else { } else {
this.timeTo = null this.timeTo = null
showGlobalError(this.$t('pages.newCallForward.officeHoursInvalidTimerange')) showGlobalError(this.$t('Please select a valid timerange'))
} }
} }
}, },

@ -15,7 +15,7 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label> <q-item-label>
{{ $t('numbers') }} {{ $t('Numbers') }}
</q-item-label> </q-item-label>
<q-item-label <q-item-label
caption caption
@ -50,7 +50,7 @@
/> />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>{{ $t('userMenu.settings') }}</q-item-label> <q-item-label>{{ $t('Settings') }}</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
@ -67,7 +67,7 @@
/> />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>{{ $t('userMenu.logout') }}</q-item-label> <q-item-label>{{ $t('Logout') }}</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>

@ -6,7 +6,7 @@
> >
<div class="column col-lg-4 col-xl-4 col-md-3 gt-sm" /> <div class="column col-lg-4 col-xl-4 col-md-3 gt-sm" />
<div class="column col-12 col-md-6 col-lg-4 col-xl-4"> <div class="column col-12 col-md-6 col-lg-4 col-xl-4">
{{ $t('notFound') }} {{ $t('404 Not Found') }}
</div> </div>
<div class="column col-lg-4 col-xl-4 col-md-3 gt-sm" /> <div class="column col-lg-4 col-xl-4 col-md-3 gt-sm" />
</div> </div>

@ -1,6 +1,6 @@
<template> <template>
<csc-cf-group-condition <csc-cf-group-condition
:title="$t('')" title=" "
v-on="$listeners" v-on="$listeners"
> >
<q-list <q-list

@ -1,6 +1,6 @@
<template> <template>
<csc-cf-group-condition <csc-cf-group-condition
:title="$t(title)" :title="title"
:loading="$wait.is('csc-cf-source-set-create')" :loading="$wait.is('csc-cf-source-set-create')"
v-bind="$attrs" v-bind="$attrs"
v-on="$listeners" v-on="$listeners"

@ -1,6 +1,6 @@
<template> <template>
<csc-cf-group-condition <csc-cf-group-condition
:title="$t(title)" :title="title"
:loading="$wait.is('csc-cf-source-set-create')" :loading="$wait.is('csc-cf-source-set-create')"
v-bind="$attrs" v-bind="$attrs"
v-on="$listeners" v-on="$listeners"

@ -7,7 +7,7 @@
<q-btn <q-btn
v-for="(day, index) in days" v-for="(day, index) in days"
:key="day.value" :key="day.value"
:label="$t(day.label)" :label="day.label"
:class="(index > 0)?'q-ml-sm':''" :class="(index > 0)?'q-ml-sm':''"
round round
no-caps no-caps
@ -31,7 +31,7 @@
v-for="(day) in days" v-for="(day) in days"
:key="day.value" :key="day.value"
:name="'tab-' + day.value" :name="'tab-' + day.value"
:label="$t(day.label)" :label="day.label"
class="text-primary no-padding" class="text-primary no-padding"
inline-label inline-label
outside-arrows outside-arrows

@ -47,15 +47,15 @@
<span <span
v-if="isInitiating" v-if="isInitiating"
> >
{{ $t('call.initiating', {number: callNumberFormatted}) }}</span> {{ $t('Calling {number}...', {number: callNumberFormatted}) }}</span>
<span <span
v-else-if="isRinging" v-else-if="isRinging"
> >
{{ $t('call.ringing', {number: callNumberFormatted}) }}</span> {{ $t('Ringing at {number}...', {number: callNumberFormatted}) }}</span>
<span <span
v-else-if="isIncoming" v-else-if="isIncoming"
> >
{{ $t('call.incoming', {number: callNumberFormatted}) }}</span> {{ $t('Incoming call from {number}...', {number: callNumberFormatted}) }}</span>
</div> </div>
<div <div
v-else-if="isEnded" v-else-if="isEnded"
@ -86,7 +86,7 @@
size="24px" size="24px"
/> />
<div> <div>
{{ $t('call.established', {number: callNumberFormatted}) }} {{ $t('In call with {number}', {number: callNumberFormatted}) }}
</div> </div>
<q-btn <q-btn
v-if="!dialpadOpened" v-if="!dialpadOpened"
@ -287,7 +287,7 @@
<div <div
class="csc-call-info-phrase" class="csc-call-info-phrase"
> >
{{ $t('call.' + callState + 'Short') }} {{ callStateTitle }}
</div> </div>
<div <div
class="csc-call-info-number" class="csc-call-info-number"
@ -343,6 +343,7 @@ import {
} from 'src/helpers/ui' } from 'src/helpers/ui'
import CscMedia from '../CscMedia' import CscMedia from '../CscMedia'
import CscCallDialpad from '../CscCallDialpad' import CscCallDialpad from '../CscCallDialpad'
import { CallStateTitle } from 'src/store/call'
export default { export default {
name: 'CscCall', name: 'CscCall',
components: { components: {
@ -523,6 +524,9 @@ export default {
} else { } else {
return 'faded' return 'faded'
} }
},
callStateTitle () {
return CallStateTitle[this.callState]
} }
}, },
watch: { watch: {

@ -3,7 +3,7 @@
ref="inputField" ref="inputField"
clearable clearable
type="text" type="text"
:label="$t('call.number')" :label="$t('Phone number')"
:value="value" :value="value"
:disable="!enabled" :disable="!enabled"
:error="$v.phoneNumber.$error" :error="$v.phoneNumber.$error"
@ -65,22 +65,22 @@ export default {
computed: { computed: {
errorMessage () { errorMessage () {
if (!this.$v.phoneNumber.required) { if (!this.$v.phoneNumber.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('call.number') field: this.$t('Phone number')
}) })
} else if (!this.$v.phoneNumber.maxLength) { } else if (!this.$v.phoneNumber.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('call.number'), field: this.$t('Phone number'),
maxLength: this.$v.phoneNumber.$params.maxLength.max maxLength: this.$v.phoneNumber.$params.maxLength.max
}) })
} else if (!this.$v.phoneNumber.userInfo) { } else if (!this.$v.phoneNumber.userInfo) {
return this.$t('validationErrors.inputValidNumber') return this.$t('Input a valid phone number')
} else { } else {
return '' return ''
} }
}, },
helperMessage () { helperMessage () {
return this.$t('validationErrors.inputNumber') return this.$t('Input a phone number')
} }
}, },
watch: { watch: {

@ -43,16 +43,16 @@ export default {
computed: { computed: {
errorMessage () { errorMessage () {
if (!this.$v.inputValue.required) { if (!this.$v.inputValue.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.label field: this.label
}) })
} else if (!this.$v.inputValue.maxLength) { } else if (!this.$v.inputValue.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.label, field: this.label,
maxLength: this.$v.inputValue.$params.maxLength.max maxLength: this.$v.inputValue.$params.maxLength.max
}) })
} else if (!this.$v.inputValue.userInfo) { } else if (!this.$v.inputValue.userInfo) {
return this.$t('validationErrors.inputValidNumber') return this.$t('Input a valid phone number')
} else { } else {
return '' return ''
} }

@ -8,7 +8,7 @@
clearable clearable
type="password" type="password"
hide-bottom-space hide-bottom-space
:label="$t('pbxConfig.typePassword')" :label="$t('Password')"
:disable="loading" :disable="loading"
:error="$v.password.$error" :error="$v.password.$error"
:error-message="errorMessagePass" :error-message="errorMessagePass"
@ -27,7 +27,7 @@
clearable clearable
type="password" type="password"
hide-bottom-space hide-bottom-space
:label="$t('pbxConfig.retypePassword')" :label="$t('Password Retype')"
:disable="loading" :disable="loading"
:error="$v.passwordRetype.$error" :error="$v.passwordRetype.$error"
:error-message="errorMessagePassRetype" :error-message="errorMessagePassRetype"
@ -83,14 +83,14 @@ export default {
computed: { computed: {
errorMessagePass () { errorMessagePass () {
if (!this.$v.password.passwordStrength) { if (!this.$v.password.passwordStrength) {
return this.$t('pbxConfig.errorPasswordStrength') return this.$t('Password is not strong enough')
} else { } else {
return '' return ''
} }
}, },
errorMessagePassRetype () { errorMessagePassRetype () {
if (!this.$v.passwordRetype.sameAsPassword) { if (!this.$v.passwordRetype.sameAsPassword) {
return this.$t('pbxConfig.errorPasswordNotEqual') return this.$t('Passwords must be equal')
} else { } else {
return '' return ''
} }

@ -5,7 +5,7 @@
color="white" color="white"
@click="click" @click="click"
> >
{{ $t('buttons.reset') }} {{ $t('Reset') }}
</q-btn> </q-btn>
</template> </template>

@ -5,7 +5,7 @@
color="primary" color="primary"
@click="click" @click="click"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</template> </template>

@ -4,7 +4,7 @@
color="white" color="white"
flat flat
dense dense
:label="$t('buttons.reset')" :label="$t('Reset')"
:disable="$attrs.loading" :disable="$attrs.loading"
v-bind="$attrs" v-bind="$attrs"
v-on="$listeners" v-on="$listeners"

@ -4,7 +4,7 @@
color="primary" color="primary"
flat flat
dense dense
:label="$t('buttons.save')" :label="$t('Save')"
:disable="$attrs.loading" :disable="$attrs.loading"
v-bind="$attrs" v-bind="$attrs"
v-on="$listeners" v-on="$listeners"

@ -20,7 +20,7 @@
text-color="dark" text-color="dark"
size="sm" size="sm"
unelevated unelevated
:label="$t('buttons.select')" :label="$t('Select')"
@click="$refs.fileInput.$el.click()" @click="$refs.fileInput.$el.click()"
/> />
<q-btn <q-btn
@ -31,7 +31,7 @@
text-color="dark" text-color="dark"
size="sm" size="sm"
unelevated unelevated
:label="$t('buttons.reset')" :label="$t('Reset')"
@click="selectedFile = null; $refs.fileInput.$el.value = null" @click="selectedFile = null; $refs.fileInput.$el.value = null"
/> />
</template> </template>

@ -8,7 +8,7 @@
v-bind="$attrs" v-bind="$attrs"
generate generate
clearable clearable
:label="$t('pbxConfig.typePassword')" :label="$t('Password')"
@input="inputPassword" @input="inputPassword"
@generated="passwordGenerated" @generated="passwordGenerated"
@clear="passwordClear" @clear="passwordClear"
@ -28,7 +28,7 @@
ref="passwordRetype" ref="passwordRetype"
v-model="passwordRetype" v-model="passwordRetype"
v-bind="$attrs" v-bind="$attrs"
:label="$t('pbxConfig.retypePassword')" :label="$t('Password Retype')"
:error="$v.passwordRetype.$error" :error="$v.passwordRetype.$error"
:error-message="errorMessagePasswordRetype" :error-message="errorMessagePasswordRetype"
clearable clearable
@ -82,7 +82,7 @@ export default {
computed: { computed: {
errorMessagePasswordRetype () { errorMessagePasswordRetype () {
if (!this.$v.passwordRetype.sameAsPassword) { if (!this.$v.passwordRetype.sameAsPassword) {
return this.$t('pbxConfig.errorPasswordNotEqual') return this.$t('Passwords must be equal')
} else { } else {
return '' return ''
} }

@ -33,7 +33,7 @@
color="primary" color="primary"
flat flat
dense dense
:label="$t('buttons.undo')" :label="$t('Undo')"
:disable="$attrs.loading" :disable="$attrs.loading"
@click="$emit('undo', $event)" @click="$emit('undo', $event)"
/> />
@ -43,7 +43,7 @@
color="primary" color="primary"
flat flat
dense dense
:label="$t('buttons.save')" :label="$t('Save')"
:disable="$attrs.loading" :disable="$attrs.loading"
@click="$emit('save', $event)" @click="$emit('save', $event)"
/> />

@ -33,7 +33,7 @@
color="primary" color="primary"
flat flat
dense dense
:label="$t('buttons.select')" :label="$t('Select')"
:disable="isPlaying" :disable="isPlaying"
@click="$refs.fileUpload.click()" @click="$refs.fileUpload.click()"
/> />
@ -43,7 +43,7 @@
color="negative" color="negative"
flat flat
dense dense
:label="$t('buttons.remove')" :label="$t('Remove')"
:disable="isPlaying" :disable="isPlaying"
@click="remove" @click="remove"
/> />
@ -53,7 +53,7 @@
color="primary" color="primary"
flat flat
dense dense
:label="$t('buttons.reset')" :label="$t('Reset')"
:disable="isPlaying" :disable="isPlaying"
@click="cancel" @click="cancel"
/> />
@ -63,7 +63,7 @@
color="primary" color="primary"
flat flat
dense dense
:label="$t('buttons.upload')" :label="$t('Upload')"
:disable="isPlaying" :disable="isPlaying"
@click="upload" @click="upload"
/> />
@ -203,9 +203,9 @@ export default {
}, },
removeLabel () { removeLabel () {
if (this.deleteTerm === 'remove') { if (this.deleteTerm === 'remove') {
return this.$t('buttons.removeFile') return this.$t('Remove file')
} else { } else {
return this.$t('buttons.resetDefaults') return this.$t('Reset to defaults')
} }
}, },
removeIcon () { removeIcon () {

@ -35,13 +35,13 @@
<csc-popup-menu-item <csc-popup-menu-item
icon="edit" icon="edit"
color="primary" color="primary"
:label="$t('buttons.edit')" :label="$t('Edit')"
@click="edit" @click="edit"
/> />
<csc-popup-menu-item <csc-popup-menu-item
icon="delete" icon="delete"
color="negative" color="negative"
:label="$t('buttons.remove')" :label="$t('Remove')"
@click="remove" @click="remove"
/> />
</csc-more-menu> </csc-more-menu>

@ -8,7 +8,7 @@
> >
<q-item> <q-item>
<q-toggle <q-toggle
:label="$t('callBlocking.anonymousBlocked')" :label="$t('All anonymous incoming calls are blocked')"
:value="isAnonymousBlocked" :value="isAnonymousBlocked"
:disable="isAnonymousBlockRequesting" :disable="isAnonymousBlockRequesting"
checked-icon="block" checked-icon="block"
@ -32,7 +32,7 @@
<q-item-section> <q-item-section>
<q-radio <q-radio
:value="listMode" :value="listMode"
:label="$t('pages.callBlocking' + suffix + '.toggleDisableLabel')" :label="getTranslation('toggleDisableLabel')"
val="blacklist" val="blacklist"
color="primary" color="primary"
@input="updateListMode" @input="updateListMode"
@ -50,7 +50,7 @@
<q-item-section> <q-item-section>
<q-radio <q-radio
:value="listMode" :value="listMode"
:label="$t('pages.callBlocking' + suffix + '.toggleEnableLabel')" :label="getTranslation('toggleEnableLabel')"
val="whitelist" val="whitelist"
color="primary" color="primary"
@input="updateListMode" @input="updateListMode"
@ -109,7 +109,7 @@
v-else v-else
class="row justify-center" class="row justify-center"
> >
{{ $t('callBlocking.listEmptyMessage') }} {{ $t('No numbers found') }}
</div> </div>
</csc-page> </csc-page>
</template> </template>
@ -162,16 +162,16 @@ export default {
]), ]),
toggleButtonLabel () { toggleButtonLabel () {
if (!this.enabled) { if (!this.enabled) {
return this.$i18n.t('pages.callBlocking' + this.suffix + '.toggleEnableLabel') return this.getTranslation('toggleEnableLabel')
} else { } else {
return this.$i18n.t('pages.callBlocking' + this.suffix + '.toggleDisableLabel') return this.getTranslation('toggleDisableLabel')
} }
}, },
toggleToastMessage () { toggleToastMessage () {
if (this.mode) { if (this.mode) {
return this.$i18n.t('pages.callBlocking' + this.suffix + '.toggleEnabledToast') return this.getTranslation('toggleEnabledToast')
} else { } else {
return this.$i18n.t('pages.callBlocking' + this.suffix + '.toggleDisabledToast') return this.getTranslation('toggleDisabledToast')
} }
}, },
suffix () { suffix () {
@ -179,7 +179,7 @@ export default {
}, },
removeDialogMessage () { removeDialogMessage () {
if (this.currentRemovingIndex !== null) { if (this.currentRemovingIndex !== null) {
return this.$t('pages.callBlocking' + this.suffix + '.removeDialogText', { return this.getTranslation('removeDialogText', {
number: this.numbers[this.currentRemovingIndex] number: this.numbers[this.currentRemovingIndex]
}) })
} else { } else {
@ -229,7 +229,7 @@ export default {
numberDeletionConfirm (index) { numberDeletionConfirm (index) {
this.currentRemovingIndex = index this.currentRemovingIndex = index
this.$q.dialog({ this.$q.dialog({
title: this.$t('pages.callBlocking' + this.suffix + '.removeDialogTitle'), title: this.getTranslation('removeDialogTitle'),
message: this.removeDialogMessage, message: this.removeDialogMessage,
color: 'primary', color: 'primary',
cancel: true, cancel: true,
@ -237,6 +237,32 @@ export default {
}).onOk(data => { }).onOk(data => {
this.removeNumber() this.removeNumber()
}) })
},
getTranslation (key, params) {
let translationsMap
switch (this.suffix) {
case 'Incoming':
translationsMap = {
toggleEnableLabel: this.$t('Only incoming calls from listed numbers are allowed'),
toggleDisableLabel: this.$t('All incoming calls from listed numbers are blocked'),
toggleEnabledToast: this.$t('All listed numbers are allowed'),
toggleDisabledToast: this.$t('All listed numbers are blocked'),
removeDialogTitle: this.$t('Remove number'),
removeDialogText: this.$t('You are about to remove the number {number}', params)
}
break
case 'Outgoing':
translationsMap = {
toggleEnableLabel: this.$t('Only outgoing calls to listed numbers are allowed'),
toggleDisableLabel: this.$t('All outgoing calls to listed numbers are blocked'),
toggleEnabledToast: this.$t('All listed numbers are allowed'),
toggleDisabledToast: this.$t('All listed numbers are blocked'),
removeDialogTitle: this.$t('Remove number'),
removeDialogText: this.$t('You are about to remove the number {number}', params)
}
break
}
return translationsMap[key]
} }
} }
} }

@ -5,7 +5,7 @@
> >
<csc-call-input <csc-call-input
v-model="number" v-model="number"
:label="$t('callBlocking.number')" :label="$t('Number')"
@submit="save" @submit="save"
@error="error" @error="error"
/> />
@ -18,7 +18,7 @@
icon="clear" icon="clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -28,7 +28,7 @@
:disable="saveDisabled" :disable="saveDisabled"
@click="save()" @click="save()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
<div <div
v-if="loading" v-if="loading"
@ -48,7 +48,7 @@
icon="add" icon="add"
@click="add()" @click="add()"
> >
{{ $t('pages.callBlockingIncoming.addNumberButton') }} {{ $t('Add number') }}
</q-btn> </q-btn>
</div> </div>
</template> </template>
@ -90,7 +90,7 @@ export default {
methods: { methods: {
save () { save () {
if (this.numberError || this.saveDisabled) { if (this.numberError || this.saveDisabled) {
showGlobalError(this.$t('validationErrors.generic')) showGlobalError(this.$t('You have invalid form input. Please check and try again.'))
} else { } else {
this.$emit('save', this.number) this.$emit('save', this.number)
} }

@ -6,20 +6,20 @@
dense dense
color="primary" color="primary"
icon="add" icon="add"
:label="$t('pages.callForward.addDestinationButton')" :label="$t('Add destination')"
> >
<csc-popup-menu> <csc-popup-menu>
<csc-popup-menu-item <csc-popup-menu-item
:label="$t('pages.callForward.buttons.addNumber')" :label="$t('Add Number')"
@click="addDestinationByType('number')" @click="addDestinationByType('number')"
/> />
<csc-popup-menu-item <csc-popup-menu-item
:label="$t('pages.callForward.buttons.addVoicemail')" :label="$t('Add Voicemail')"
@click="addDestinationByType('voicebox')" @click="addDestinationByType('voicebox')"
/> />
<csc-popup-menu-item <csc-popup-menu-item
v-if="hasFaxCapabilityAndFaxActive && hasSendFaxFeature" v-if="hasFaxCapabilityAndFaxActive && hasSendFaxFeature"
:label="$t('pages.callForward.buttons.addFax2Mail')" :label="$t('Add Fax2Mail')"
@click="addDestinationByType('fax2mail')" @click="addDestinationByType('fax2mail')"
/> />
</csc-popup-menu> </csc-popup-menu>
@ -27,7 +27,7 @@
<div v-if="isFormEnabled"> <div v-if="isFormEnabled">
<csc-call-input <csc-call-input
v-model="destinationForm.destination" v-model="destinationForm.destination"
:label="$t('pages.callForward.destination')" :label="$t('Destination')"
:before="beforeIconDestination" :before="beforeIconDestination"
dense dense
@submit="addDestination" @submit="addDestination"
@ -37,8 +37,8 @@
v-model="destinationForm.timeout" v-model="destinationForm.timeout"
clearable clearable
dense dense
:label="$t('pages.callForward.timeout')" :label="$t('Timeout')"
:suffix="$t('pages.callForward.seconds')" :suffix="$t('seconds')"
:error="$v.destinationForm.timeout.$error" :error="$v.destinationForm.timeout.$error"
@input="$v.destinationForm.timeout.$touch" @input="$v.destinationForm.timeout.$touch"
@blur="$v.destinationForm.timeout.$touch" @blur="$v.destinationForm.timeout.$touch"
@ -49,7 +49,7 @@
color="default" color="default"
@click="disableForm()" @click="disableForm()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -58,7 +58,7 @@
:disable="$v.destinationForm.timeout.$error || destinationError" :disable="$v.destinationForm.timeout.$error || destinationError"
@click="addDestination()" @click="addDestination()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -154,16 +154,16 @@ export default {
]), ]),
timeoutInputError () { timeoutInputError () {
if (!this.$v.destinationForm.timeout.required) { if (!this.$v.destinationForm.timeout.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pages.callForward.timeout') field: this.$t('Timeout')
}) })
} else if (!this.$v.destinationForm.timeout.numeric) { } else if (!this.$v.destinationForm.timeout.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pages.callForward.timeout') field: this.$t('Timeout')
}) })
} else if (!this.$v.destinationForm.timeout.minValue) { } else if (!this.$v.destinationForm.timeout.minValue) {
return this.$t('validationErrors.minValueSecond', { return this.$t('{field} must be at least {minValue} second', {
field: this.$t('pages.callForward.timeout'), field: this.$t('Timeout'),
minValue: this.$v.destinationForm.timeout.$params.minValue.min minValue: this.$v.destinationForm.timeout.$params.minValue.min
}) })
} else { } else {
@ -225,7 +225,7 @@ export default {
addDestination () { addDestination () {
if (this.$v.destinationForm.timeout.$error || if (this.$v.destinationForm.timeout.$error ||
this.destinationError) { this.destinationError) {
showGlobalError(this.$t('validationErrors.generic')) showGlobalError(this.$t('You have invalid form input. Please check and try again.'))
} else { } else {
this.$store.dispatch('callForward/addDestination', { this.$store.dispatch('callForward/addDestination', {
form: this.destinationForm, form: this.destinationForm,

@ -45,7 +45,7 @@
color="default" color="default"
@click="disableForm()" @click="disableForm()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
</div> </div>
<div <div
@ -57,7 +57,7 @@
color="primary" color="primary"
@click="addTime()" @click="addTime()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -85,13 +85,13 @@ export default {
data () { data () {
return { return {
selectOptions: [ selectOptions: [
{ label: this.$t('pages.callForward.times.sunday'), value: 1 }, { label: this.$t('Sunday'), value: 1 },
{ label: this.$t('pages.callForward.times.monday'), value: 2 }, { label: this.$t('Monday'), value: 2 },
{ label: this.$t('pages.callForward.times.tuesday'), value: 3 }, { label: this.$t('Tuesday'), value: 3 },
{ label: this.$t('pages.callForward.times.wednesday'), value: 4 }, { label: this.$t('Wednesday'), value: 4 },
{ label: this.$t('pages.callForward.times.thursday'), value: 5 }, { label: this.$t('Thursday'), value: 5 },
{ label: this.$t('pages.callForward.times.friday'), value: 6 }, { label: this.$t('Friday'), value: 6 },
{ label: this.$t('pages.callForward.times.saturday'), value: 7 } { label: this.$t('Saturday'), value: 7 }
], ],
selectedWeekday: 1, selectedWeekday: 1,
timeTo: '0:00', timeTo: '0:00',
@ -139,7 +139,7 @@ export default {
name: this.timeset name: this.timeset
}) })
} else { } else {
showGlobalError(this.$t('pages.callForward.times.selectValidTime')) showGlobalError(this.$t('Select valid time'))
} }
} }
} }

@ -2,7 +2,7 @@
<div class="dest-card"> <div class="dest-card">
<csc-destinations <csc-destinations
ref="online" ref="online"
:title="$t('pages.callForward.whenOnline')" :title="$t('When I am online ...')"
:group="destinations.online" :group="destinations.online"
group-name="cfu" group-name="cfu"
:timeset="timeset" :timeset="timeset"
@ -14,7 +14,7 @@
class="q-mb-lg" class="q-mb-lg"
/> />
<csc-destinations <csc-destinations
:title="$t('pages.callForward.whenBusy')" :title="$t('When I am busy ...')"
:group="destinations.busy" :group="destinations.busy"
group-name="cfb" group-name="cfb"
:timeset="timeset" :timeset="timeset"
@ -23,7 +23,7 @@
class="q-mb-lg" class="q-mb-lg"
/> />
<csc-destinations <csc-destinations
:title="$t('pages.callForward.whenOffline')" :title="$t('When I am offline ...')"
:group="destinations.offline" :group="destinations.offline"
group-name="cfna" group-name="cfna"
:timeset="timeset" :timeset="timeset"
@ -93,7 +93,7 @@ export default {
showGlobalError(this.removeDestinationError) showGlobalError(this.removeDestinationError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
// stopLoading() // stopLoading()
showToast(this.$t('pages.callForward.removeSuccessMessage', { showToast(this.$t('Removed destination {destination}', {
destination: this.lastRemovedDestination destination: this.lastRemovedDestination
})) }))
this.reloadDestinations(this.timeset) this.reloadDestinations(this.timeset)
@ -107,7 +107,7 @@ export default {
showGlobalError(this.addDestinationError) showGlobalError(this.addDestinationError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
// stopLoading() // stopLoading()
showToast(this.$t('pages.callForward.addDestinationSuccessMessage', { showToast(this.$t('Added destination {destination}', {
destination: this.lastAddedDestination destination: this.lastAddedDestination
})) }))
this.reloadDestinations(this.timeset) this.reloadDestinations(this.timeset)
@ -136,7 +136,7 @@ export default {
showGlobalError(this.updateOwnPhoneToggleError) showGlobalError(this.updateOwnPhoneToggleError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
this.reloadDestinations(this.timeset) this.reloadDestinations(this.timeset)
showToast(this.$t('pages.callForward.updateOwnPhoneToggleSuccessMessage', { showToast(this.$t('Own phone is {toggle}', {
toggle: this.lastOwnPhoneToggle toggle: this.lastOwnPhoneToggle
})) }))
} }
@ -147,7 +147,7 @@ export default {
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
this.$refs.online.hideModal() this.$refs.online.hideModal()
this.reloadDestinations(this.timeset) this.reloadDestinations(this.timeset)
showToast(this.$t('pages.callForward.updateOwnPhoneTimeoutSuccessMessage', { showToast(this.$t('Own phone timeout set to {timeout}', {
timeout: this.lastOwnPhoneTimeout timeout: this.lastOwnPhoneTimeout
})) }))
} }

@ -11,7 +11,7 @@
<csc-popup-menu-item <csc-popup-menu-item
color="negative" color="negative"
icon="delete" icon="delete"
:label="$t('buttons.remove')" :label="$t('Remove')"
@click="deleteTime" @click="deleteTime"
/> />
</csc-more-menu> </csc-more-menu>

@ -31,7 +31,7 @@
class="add-time" class="add-time"
@click="enableAddForm()" @click="enableAddForm()"
> >
{{ $t('pages.callForward.times.addTimeButton') }} {{ $t('Add Time') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>

@ -47,7 +47,7 @@
v-if="timesetHasDuplicate" v-if="timesetHasDuplicate"
> >
<csc-inline-alert-alert> <csc-inline-alert-alert>
{{ $t('pages.callForward.times.timesetDuplicate', { timeset: timesetName }) }} {{ $t('More than one {timeset} timeset exists. You can resolve this by resetting the {timeset} timesets.', { timeset: timesetName }) }}
<template <template
v-slot:action v-slot:action
> >
@ -64,7 +64,7 @@
v-else-if="!timesetIsCompatible" v-else-if="!timesetIsCompatible"
> >
<csc-inline-alert-alert> <csc-inline-alert-alert>
{{ $t('pages.callForward.times.timesetIncompatible', { timeset: timesetName }) }} {{ $t('The {timeset} timeset contains incompatible values. You can resolve this by resetting the {timeset} timeset.', { timeset: timesetName }) }}
<template <template
v-slot:action v-slot:action
> >
@ -81,7 +81,7 @@
v-else-if="timesetHasReverse" v-else-if="timesetHasReverse"
> >
<csc-inline-alert-alert> <csc-inline-alert-alert>
{{ $t('pages.callForward.times.timesetReverse', { timeset: timesetName }) }} {{ $t('The {timeset} timeset contain reverse order of values. You can resolve this by resetting the {timeset} timeset.', { timeset: timesetName }) }}
<template <template
v-slot:action v-slot:action
> >
@ -98,7 +98,7 @@
v-show="showDefinedAlert" v-show="showDefinedAlert"
> >
<csc-inline-alert-warning> <csc-inline-alert-warning>
{{ $t('pages.callForward.times.timesetNotDefined', { timeset: timesetName }) }} {{ $t('The {timeset} timeset is not defined. You need to create one to be able to define call forward destinations.', { timeset: timesetName }) }}
<template <template
v-slot:action v-slot:action
> >
@ -207,12 +207,12 @@ export default {
this.removeSourceState === 'requesting' this.removeSourceState === 'requesting'
}, },
labelReset () { labelReset () {
return this.$t('pages.callForward.times.resetTimeset', { return this.$t('Reset {timeset}', {
timeset: this.timesetName timeset: this.timesetName
}) })
}, },
labelAdd () { labelAdd () {
return this.$t('pages.callForward.times.addTimeset', { return this.$t('Add {timeset}', {
timeset: this.timesetName timeset: this.timesetName
}) })
}, },
@ -224,7 +224,7 @@ export default {
}, },
deleteTimeMessage () { deleteTimeMessage () {
if (this.deleteTimeData !== null) { if (this.deleteTimeData !== null) {
return this.$t('pages.callForward.times.removeDialogText', { return this.$t('You are about to remove the time entry for {day}', {
day: this.deleteTimeData.removedDay day: this.deleteTimeData.removedDay
}) })
} else { } else {
@ -241,7 +241,7 @@ export default {
} else if (state === 'failed') { } else if (state === 'failed') {
showGlobalError(this.resetTimeError) showGlobalError(this.resetTimeError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
showToast(this.$t('pages.callForward.times.resetSuccessMessage')) showToast(this.$t('Reset of timesets completed'))
this.loadTimes() this.loadTimes()
} }
}, },
@ -259,7 +259,7 @@ export default {
} }
this.loadTimes() this.loadTimes()
this.loadDestinations() this.loadDestinations()
showToast(this.$t('pages.callForward.times.addTimeSuccessMessage')) showToast(this.$t('Created new timeset'))
} }
}, },
activeTimeForm (state) { activeTimeForm (state) {
@ -280,7 +280,7 @@ export default {
showGlobalError(this.addSourcesetError) showGlobalError(this.addSourcesetError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
this.$refs.sourcesets.resetForm() this.$refs.sourcesets.resetForm()
showToast(this.$t('pages.callForward.sources.addSuccessMessage', { showToast(this.$t('Created sourceset {sourceset}', {
sourceset: this.lastAddedSourceset sourceset: this.lastAddedSourceset
})) }))
this.loadDestinations() this.loadDestinations()
@ -329,7 +329,7 @@ export default {
}, },
deleteTimeDialog (index) { deleteTimeDialog (index) {
this.$q.dialog({ this.$q.dialog({
title: this.$t('pages.callForward.times.removeDialogTitle'), title: this.$t('Remove call forward time'),
message: this.deleteTimeMessage, message: this.deleteTimeMessage,
color: 'negative', color: 'negative',
cancel: true, cancel: true,

@ -10,12 +10,12 @@
<template <template
v-if="index === 0 && !ownPhoneEnabled" v-if="index === 0 && !ownPhoneEnabled"
> >
{{ $t('pages.callForward.firstRing') }} {{ $t('first ring') }}
</template> </template>
<template <template
v-else v-else
> >
{{ $t('pages.callForward.thenRing') }} {{ $t('then ring') }}
</template> </template>
</q-item-label> </q-item-label>
<q-item-label <q-item-label
@ -25,7 +25,7 @@
<template <template
v-if="isNonTerminating(destinationObject.destination)" v-if="isNonTerminating(destinationObject.destination)"
> >
{{ $t('pages.callForward.for') }} {{ destinationObject.timeout }} {{ $t('pages.callForward.secs') }} {{ $t('for') }} {{ destinationObject.timeout }} {{ $t('secs') }}
</template> </template>
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
@ -35,10 +35,10 @@
<!-- no-wrap--> <!-- no-wrap-->
<!-- >--> <!-- >-->
<!-- <span v-if="index === 0 && !ownPhoneEnabled">--> <!-- <span v-if="index === 0 && !ownPhoneEnabled">-->
<!-- {{ $t('pages.callForward.firstRing') }}--> <!-- {{ $t('first ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span v-else>--> <!-- <span v-else>-->
<!-- {{ $t('pages.callForward.thenRing') }}--> <!-- {{ $t('then ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- --> <!-- -->
<!-- <span>--> <!-- <span>-->
@ -46,18 +46,18 @@
<!-- </span>--> <!-- </span>-->
<!-- <span v-if="isNonTerminating(destinationObject.destination)">--> <!-- <span v-if="isNonTerminating(destinationObject.destination)">-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.for') }}--> <!-- {{ $t('for') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ destinationObject.timeout }}--> <!-- {{ destinationObject.timeout }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.secs') }}--> <!-- {{ $t('secs') }}-->
<!-- </span>--> <!-- </span>-->
<!-- </span>--> <!-- </span>-->
<!-- --> <!-- -->
<!-- <q-tooltip v-if="destinationObject.terminated">--> <!-- <q-tooltip v-if="destinationObject.terminated">-->
<!-- {{ $t('pages.callForward.terminatedTooltip') }}--> <!-- {{ $t('This destination comes after a terminating destinations, and is therefore inactive.') }}-->
<!-- </q-tooltip>--> <!-- </q-tooltip>-->
<!-- --> <!-- -->
<!-- </q-item-section>--> <!-- </q-item-section>-->
@ -69,35 +69,35 @@
<!-- <div>--> <!-- <div>-->
<!-- <span v-if="!isNonTerminating(destinationObject.destination)">--> <!-- <span v-if="!isNonTerminating(destinationObject.destination)">-->
<!-- <span v-if="index === 0 && !ownPhoneEnabled">--> <!-- <span v-if="index === 0 && !ownPhoneEnabled">-->
<!-- {{ $t('pages.callForward.firstRing') }}--> <!-- {{ $t('first ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span v-else>--> <!-- <span v-else>-->
<!-- {{ $t('pages.callForward.thenRing') }}--> <!-- {{ $t('then ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- </span>--> <!-- </span>-->
<!-- {{ destination.destination | destinationFormat }}--> <!-- {{ destination.destination | destinationFormat }}-->
<!-- </div>--> <!-- </div>-->
<!-- <div>--> <!-- <div>-->
<!-- <span v-if="index === 0 && isNonTerminating(destinationObject.destination) && !ownPhoneEnabled">--> <!-- <span v-if="index === 0 && isNonTerminating(destinationObject.destination) && !ownPhoneEnabled">-->
<!-- {{ $t('pages.callForward.firstRing') }}--> <!-- {{ $t('first ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span v-else>--> <!-- <span v-else>-->
<!-- {{ $t('pages.callForward.thenRing') }}--> <!-- {{ $t('then ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span v-if="isNonTerminating(destinationObject.destination)">--> <!-- <span v-if="isNonTerminating(destinationObject.destination)">-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.for') }}--> <!-- {{ $t('for') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span class="dest-values">--> <!-- <span class="dest-values">-->
<!-- {{ destination.timeout }}--> <!-- {{ destination.timeout }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.secs') }}--> <!-- {{ $t('secs') }}-->
<!-- </span>--> <!-- </span>-->
<!-- </span>--> <!-- </span>-->
<!-- </div>--> <!-- </div>-->
<!-- <q-tooltip v-if="destinationObject.terminated">--> <!-- <q-tooltip v-if="destinationObject.terminated">-->
<!-- {{ $t('pages.callForward.terminatedTooltip') }}--> <!-- {{ $t('This destination comes after a terminating destinations, and is therefore inactive.') }}-->
<!-- </q-tooltip>--> <!-- </q-tooltip>-->
<!-- </q-item-section>--> <!-- </q-item-section>-->
<q-item-section <q-item-section
@ -108,20 +108,20 @@
v-if="destinations.length > 1 && !hasNoUpOption(index)" v-if="destinations.length > 1 && !hasNoUpOption(index)"
icon="keyboard_arrow_up" icon="keyboard_arrow_up"
color="primary" color="primary"
:label="$t('buttons.moveUp')" :label="$t('Move up')"
@click="moveDestination('up', index)" @click="moveDestination('up', index)"
/> />
<csc-popup-menu-item <csc-popup-menu-item
v-if="destinations.length > 1 && !hasNoDownOption(index)" v-if="destinations.length > 1 && !hasNoDownOption(index)"
icon="keyboard_arrow_down" icon="keyboard_arrow_down"
color="primary" color="primary"
:label="$t('buttons.moveDown')" :label="$t('Move down')"
@click="moveDestination('down', index)" @click="moveDestination('down', index)"
/> />
<csc-popup-menu-item <csc-popup-menu-item
icon="delete" icon="delete"
color="negative" color="negative"
:label="$t('buttons.remove')" :label="$t('Remove')"
@click="deleteDestination(index)" @click="deleteDestination(index)"
/> />
</csc-more-menu> </csc-more-menu>
@ -134,7 +134,7 @@
<!-- v-if="destinations.length > 1 && !hasNoUpOption(index)"--> <!-- v-if="destinations.length > 1 && !hasNoUpOption(index)"-->
<!-- @click="moveDestination('up', index), $refs.popover[index].close()"--> <!-- @click="moveDestination('up', index), $refs.popover[index].close()"-->
<!-- >--> <!-- >-->
<!-- <q-item-main :label="$t('buttons.moveUp')" />--> <!-- <q-item-main :label="$t('Move up')" />-->
<!-- <q-item-side--> <!-- <q-item-side-->
<!-- icon="keyboard_arrow_up"--> <!-- icon="keyboard_arrow_up"-->
<!-- color="white"--> <!-- color="white"-->
@ -144,14 +144,14 @@
<!-- v-if="destinations.length > 1 && !hasNoDownOption(index)"--> <!-- v-if="destinations.length > 1 && !hasNoDownOption(index)"-->
<!-- @click="moveDestination('down', index), $refs.popover[index].close()"--> <!-- @click="moveDestination('down', index), $refs.popover[index].close()"-->
<!-- >--> <!-- >-->
<!-- <q-item-main :label="$t('buttons.moveDown')" />--> <!-- <q-item-main :label="$t('Move down')" />-->
<!-- <q-item-side--> <!-- <q-item-side-->
<!-- icon="keyboard_arrow_down"--> <!-- icon="keyboard_arrow_down"-->
<!-- color="white"--> <!-- color="white"-->
<!-- />--> <!-- />-->
<!-- </q-item>--> <!-- </q-item>-->
<!-- <q-item @click="deleteDestination(index), $refs.popover[index].close()">--> <!-- <q-item @click="deleteDestination(index), $refs.popover[index].close()">-->
<!-- <q-item-main :label="$t('buttons.remove')" />--> <!-- <q-item-main :label="$t('Remove')" />-->
<!-- <q-item-side--> <!-- <q-item-side-->
<!-- icon="delete"--> <!-- icon="delete"-->
<!-- color="negative"--> <!-- color="negative"-->
@ -272,8 +272,8 @@ export default {
const isLastDestination = this.destinations.length === 1 const isLastDestination = this.destinations.length === 1
clonedDestinations.splice(indexInt, 1) clonedDestinations.splice(indexInt, 1)
this.$q.dialog({ this.$q.dialog({
title: this.$t('pages.callForward.removeDialogTitle'), title: this.$t('Remove call forward destination'),
message: this.$t('pages.callForward.removeDialogText', { message: this.$t('You are about to remove the destination {destination}', {
destination: removeDestination destination: removeDestination
}), }),
color: 'primary', color: 'primary',

@ -34,43 +34,43 @@
overline overline
class="text-uppercase" class="text-uppercase"
> >
{{ $t('pages.callForward.firstRing') }} {{ $t('pages.callForward.ownPhone') }} {{ $t('first ring') }} {{ $t('own phone') }}
</q-item-label> </q-item-label>
<q-item-label <q-item-label
v-if="ownPhone" v-if="ownPhone"
class="text-subtitle2" class="text-subtitle2"
> >
{{ $t('pages.callForward.for') }} {{ ownPhoneTimeout || 0 }} {{ $t('pages.callForward.secs') }} {{ $t('for') }} {{ ownPhoneTimeout || 0 }} {{ $t('secs') }}
</q-item-label> </q-item-label>
<q-item-label <q-item-label
v-if="!ownPhone" v-if="!ownPhone"
overline overline
class="text-uppercase" class="text-uppercase"
> >
{{ $t('pages.callForward.ownPhoneDisabled') }} {{ $t('do not ring own phone') }}
</q-item-label> </q-item-label>
<!-- <div--> <!-- <div-->
<!-- v-if="!isMobile"--> <!-- v-if="!isMobile"-->
<!-- >--> <!-- >-->
<!-- <span v-if="ownPhone">--> <!-- <span v-if="ownPhone">-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.firstRing') }}--> <!-- {{ $t('first ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.ownPhone') }}--> <!-- {{ $t('own phone') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.for') }}--> <!-- {{ $t('for') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ ownPhoneTimeout || 0 }}--> <!-- {{ ownPhoneTimeout || 0 }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.secs') }}--> <!-- {{ $t('secs') }}-->
<!-- </span>--> <!-- </span>-->
<!-- </span>--> <!-- </span>-->
<!-- <span v-else>--> <!-- <span v-else>-->
<!-- {{ $t('pages.callForward.ownPhoneDisabled') }}--> <!-- {{ $t('do not ring own phone') }}-->
<!-- </span>--> <!-- </span>-->
<!-- </div>--> <!-- </div>-->
@ -80,32 +80,32 @@
<!-- <div--> <!-- <div-->
<!-- v-if="ownPhone"--> <!-- v-if="ownPhone"-->
<!-- >--> <!-- >-->
<!-- {{ $t('pages.callForward.ownPhone') }}--> <!-- {{ $t('own phone') }}-->
<!-- </div>--> <!-- </div>-->
<!-- <div--> <!-- <div-->
<!-- v-else--> <!-- v-else-->
<!-- >--> <!-- >-->
<!-- {{ $t('pages.callForward.ownPhoneDisabled') }}--> <!-- {{ $t('do not ring own phone') }}-->
<!-- </div>--> <!-- </div>-->
<!-- <div--> <!-- <div-->
<!-- v-if="ownPhone"--> <!-- v-if="ownPhone"-->
<!-- >--> <!-- >-->
<!-- <span v-if="ownPhone">--> <!-- <span v-if="ownPhone">-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.firstRing') }}--> <!-- {{ $t('first ring') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.for') }}--> <!-- {{ $t('for') }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span class="dest-values">--> <!-- <span class="dest-values">-->
<!-- {{ ownPhoneTimeout || 0 }}--> <!-- {{ ownPhoneTimeout || 0 }}-->
<!-- </span>--> <!-- </span>-->
<!-- <span>--> <!-- <span>-->
<!-- {{ $t('pages.callForward.secs') }}--> <!-- {{ $t('secs') }}-->
<!-- </span>--> <!-- </span>-->
<!-- </span>--> <!-- </span>-->
<!-- <span v-else>--> <!-- <span v-else>-->
<!-- {{ $t('pages.callForward.ownPhoneDisabled') }}--> <!-- {{ $t('do not ring own phone') }}-->
<!-- </span>--> <!-- </span>-->
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
@ -135,7 +135,7 @@
/> />
<csc-popup-menu-item <csc-popup-menu-item
icon="edit" icon="edit"
:label="$t('pages.callForward.editTimeout')" :label="$t('Edit timeout')"
@click="showModal()" @click="showModal()"
/> />
</csc-more-menu> </csc-more-menu>
@ -160,7 +160,7 @@
<!-- />--> <!-- />-->
<!-- </q-item>--> <!-- </q-item>-->
<!-- <q-item @click="showModal();$refs.popover.close()">--> <!-- <q-item @click="showModal();$refs.popover.close()">-->
<!-- <q-item-main :label="$t('pages.callForward.editTimeout')" />--> <!-- <q-item-main :label="$t('Edit timeout')" />-->
<!-- <q-item-side--> <!-- <q-item-side-->
<!-- icon="fa-edit"--> <!-- icon="fa-edit"-->
<!-- color="secondary"--> <!-- color="secondary"-->
@ -179,7 +179,7 @@
class="text-uppercase" class="text-uppercase"
overline overline
> >
{{ $t('pages.callForward.forwardToNowhere') }} {{ $t('forward to nowhere') }}
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
@ -211,15 +211,15 @@
<q-card> <q-card>
<q-card-section> <q-card-section>
<div class="title"> <div class="title">
{{ $t('pages.callForward.editTimeout') }} {{ $t('Edit timeout') }}
</div> </div>
</q-card-section> </q-card-section>
<q-card-section> <q-card-section>
<q-input <q-input
v-if="ownPhone" v-if="ownPhone"
v-model="editTimeout" v-model="editTimeout"
:suffix="$t('pages.callForward.seconds')" :suffix="$t('seconds')"
:label="$t('pages.callForward.timeout')" :label="$t('Timeout')"
:error="$v.editTimeout.$error" :error="$v.editTimeout.$error"
:error-message="errorMessage" :error-message="errorMessage"
@input="$v.editTimeout.$touch" @input="$v.editTimeout.$touch"
@ -233,7 +233,7 @@
color="default" color="default"
@click="hideModal" @click="hideModal"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -241,7 +241,7 @@
color="negative" color="negative"
@click="resetTimeout" @click="resetTimeout"
> >
{{ $t('buttons.reset') }} {{ $t('Reset') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -250,7 +250,7 @@
:disable="$v.editTimeout.$error" :disable="$v.editTimeout.$error"
@click="updateTimeout" @click="updateTimeout"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</q-card-actions> </q-card-actions>
</q-card> </q-card>
@ -339,16 +339,16 @@ export default {
}, },
errorMessage () { errorMessage () {
if (!this.$v.editTimeout.required) { if (!this.$v.editTimeout.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pages.callForward.timeout') field: this.$t('Timeout')
}) })
} else if (!this.$v.editTimeout.numeric) { } else if (!this.$v.editTimeout.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pages.callForward.timeout') field: this.$t('Timeout')
}) })
} else if (!this.$v.editTimeout.minValue) { } else if (!this.$v.editTimeout.minValue) {
return this.$t('validationErrors.minValueSecond', { return this.$t('{field} must be at least {minValue} second', {
field: this.$t('pages.callForward.timeout'), field: this.$t('Timeout'),
minValue: this.$v.editTimeout.$params.minValue.min minValue: this.$v.editTimeout.$params.minValue.min
}) })
} else { } else {
@ -393,9 +393,9 @@ export default {
}, },
toggleTimeoutLabel () { toggleTimeoutLabel () {
const mode = this.ownPhone const mode = this.ownPhone
? this.$t('pages.callForward.disable') ? this.$t('Disable')
: this.$t('pages.callForward.enable') : this.$t('Enable')
return this.$t('pages.callForward.toggleTimeout', { return this.$t('{mode} own phone', {
mode: mode mode: mode
}) })
} }

@ -11,12 +11,12 @@
:default="index === 0" :default="index === 0"
:count="destinationsCount(sourceset.destinationGroups)" :count="destinationsCount(sourceset.destinationGroups)"
:name="sourceset.sourcesetName || 'always'" :name="sourceset.sourcesetName || 'always'"
:label="sourceset.sourcesetName || $t('pages.callForward.everyCaller')" :label="sourceset.sourcesetName || $t('Every caller')"
icon="people" icon="people"
@click="currentSourceSet = sourceset" @click="currentSourceSet = sourceset"
/> />
<q-tab <q-tab
:label="$t('buttons.addNew')" :label="$t('Add new')"
name="addnew" name="addnew"
icon="add" icon="add"
/> />
@ -77,7 +77,7 @@
header header
class="text-uppercase" class="text-uppercase"
> >
{{ $t('pages.callForward.sources.sourcesTitleMode', { {{ $t('{mode} of sources', {
mode: capitalizedMode(sourceset.sourcesetMode)}) }} mode: capitalizedMode(sourceset.sourcesetMode)}) }}
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
@ -97,7 +97,7 @@
<csc-popup-menu-item <csc-popup-menu-item
color="negative" color="negative"
icon="delete" icon="delete"
:label="$t('buttons.remove')" :label="$t('Remove')"
@click="removeSource(sourceset, sourceItem.source, index)" @click="removeSource(sourceset, sourceItem.source, index)"
/> />
</csc-more-menu> </csc-more-menu>
@ -119,7 +119,7 @@
icon="add" icon="add"
@click="openForm()" @click="openForm()"
> >
{{ $t('pages.callForward.sources.addSourceButton') }} {{ $t('Add source') }}
</q-btn> </q-btn>
<csc-sourcesets-form <csc-sourcesets-form
v-if="sourcesetsFormEnabled" v-if="sourcesetsFormEnabled"
@ -156,7 +156,7 @@
<q-input <q-input
v-model="sourcesetName" v-model="sourcesetName"
autofocus autofocus
:label="$t('pages.callForward.sources.sourceset')" :label="$t('Sourceset')"
color="primary" color="primary"
dense dense
@keyup.enter="addSourceset()" @keyup.enter="addSourceset()"
@ -165,7 +165,7 @@
<q-item-section> <q-item-section>
<q-input <q-input
v-model="source" v-model="source"
:label="$t('pages.callForward.sources.source')" :label="$t('Source')"
color="primary" color="primary"
dense dense
@keyup.enter="addSourceset()" @keyup.enter="addSourceset()"
@ -193,7 +193,7 @@
class="sourceset-add-button" class="sourceset-add-button"
@click="addSourceset()" @click="addSourceset()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</q-item-section> </q-item-section>
</q-item> </q-item>
@ -258,11 +258,11 @@ export default {
mode: 'whitelist', mode: 'whitelist',
modes: [ modes: [
{ {
label: this.$t('pages.callForward.whitelist'), label: this.$t('Whitelist'),
value: 'whitelist' value: 'whitelist'
}, },
{ {
label: this.$t('pages.callForward.blacklist'), label: this.$t('Blacklist'),
value: 'blacklist' value: 'blacklist'
} }
], ],
@ -288,7 +288,7 @@ export default {
}, },
deleteSourcesetLabel () { deleteSourcesetLabel () {
return this.$q.platform.is.mobile ? '' return this.$q.platform.is.mobile ? ''
: this.$t('pages.callForward.sources.removeSourcesetButton') : this.$t('Delete sourceset')
} }
}, },
watch: { watch: {
@ -297,7 +297,7 @@ export default {
} else if (state === 'failed') { } else if (state === 'failed') {
showGlobalError(this.addSourceError) showGlobalError(this.addSourceError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
showToast(this.$t('pages.callForward.sources.addSourceSuccessMessage', { showToast(this.$t('Added new source {source}', {
source: this.lastAddedSource source: this.lastAddedSource
})) }))
this.$store.dispatch('callForward/loadSourcesets') this.$store.dispatch('callForward/loadSourcesets')
@ -310,7 +310,7 @@ export default {
} else if (state === 'failed') { } else if (state === 'failed') {
showGlobalError(this.removeSourcesetError) showGlobalError(this.removeSourcesetError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
showToast(this.$t('pages.callForward.sources.removeSourcesetSuccessMessage', { showToast(this.$t('Removed sourceset {sourceset}', {
sourceset: this.lastRemovedSourceset sourceset: this.lastRemovedSourceset
})) }))
this.loadAll() this.loadAll()
@ -323,7 +323,7 @@ export default {
} else if (state === 'failed') { } else if (state === 'failed') {
showGlobalError(this.removeSourceError) showGlobalError(this.removeSourceError)
} else if (state === 'succeeded') { } else if (state === 'succeeded') {
showToast(this.$t('pages.callForward.sources.removeSourceSuccessMessage', { showToast(this.$t('Removed source {source}', {
source: this.lastRemovedSource source: this.lastRemovedSource
})) }))
this.loadAll() this.loadAll()
@ -338,8 +338,8 @@ export default {
this.alertDeleteLastSource() this.alertDeleteLastSource()
} else { } else {
this.$q.dialog({ this.$q.dialog({
title: this.$t('pages.callForward.sources.removeSourceDialogTitle'), title: this.$t('Remove call forward source'),
message: this.$t('pages.callForward.sources.removeSourceDialogText', { message: this.$t('You are about to remove the source entry for {source}', {
source: source source: source
}), }),
color: 'negative', color: 'negative',
@ -359,7 +359,7 @@ export default {
enter: 'bounceInRight', enter: 'bounceInRight',
leave: 'bounceOutRight', leave: 'bounceOutRight',
position: 'top-center', position: 'top-center',
html: this.$t('pages.callForward.sources.removeLastSourceDialogText'), html: this.$t('Removing the last source entry is not allowed.'),
icon: 'warning', icon: 'warning',
dismissible: true dismissible: true
}) })
@ -414,7 +414,7 @@ export default {
timeset: this.timesetName timeset: this.timesetName
}) })
} else { } else {
showGlobalError(this.$t('pages.callForward.sources.fieldMissing')) showGlobalError(this.$t('Both sourceset name and source is required. Please provide both and try again.'))
} }
}, },
openForm () { openForm () {
@ -429,8 +429,8 @@ export default {
}, },
removeSourceset (sourceset) { removeSourceset (sourceset) {
this.$q.dialog({ this.$q.dialog({
title: this.$t('pages.callForward.sources.removeSourcesetDialogTitle'), title: this.$t('Remove call forward sourceset'),
message: this.$t('pages.callForward.sources.removeSourcesetDialogText', { message: this.$t('You are about to remove the sourceset {sourceset}', {
sourceset: sourceset.sourcesetName sourceset: sourceset.sourcesetName
}), }),
color: 'negative', color: 'negative',

@ -4,7 +4,7 @@
v-model="source" v-model="source"
dark dark
autofocus autofocus
:label="$t('pages.callForward.sources.source')" :label="$t('Source')"
color="primary" color="primary"
@keyup.enter="addSource()" @keyup.enter="addSource()"
/> />
@ -14,7 +14,7 @@
color="default" color="default"
@click="disableForm()" @click="disableForm()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -23,7 +23,7 @@
:disable="!isValid" :disable="!isValid"
@click="addSource()" @click="addSource()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</div> </div>
</template> </template>

@ -6,18 +6,18 @@
v-if="!hasRtcEngineCapabilityEnabled" v-if="!hasRtcEngineCapabilityEnabled"
class="q-mb-lg" class="q-mb-lg"
> >
{{ $t('call.rtcEngineNotEnabledConferencing') }} {{ $t('You can not join a conference, since the RTC:engine is not active. If you operate a C5 CE then first upgrade to a C5 PRO to be able to use the RTC:engine.') }}
</csc-inline-alert-info> </csc-inline-alert-info>
<div <div
class="text-h6 text-center q-mb-lg" class="text-h6 text-center q-mb-lg"
> >
{{ $t('conferencing.joinText') }} {{ $t('Join conference with name') }}
</div> </div>
<q-input <q-input
ref="conferenceName" ref="conferenceName"
class="q-mb-lg" class="q-mb-lg"
:value="conferenceIdInput" :value="conferenceIdInput"
:placeholder="$t('conferencing.idPlaceholder')" :placeholder="$t('Conference name')"
:disable="isJoining || !hasRtcEngineCapabilityEnabled" :disable="isJoining || !hasRtcEngineCapabilityEnabled"
@input="conferenceIdChanged" @input="conferenceIdChanged"
> >
@ -35,7 +35,7 @@
<q-btn <q-btn
:disable="!hasConferenceId || isJoining || !hasRtcEngineCapabilityEnabled" :disable="!hasConferenceId || isJoining || !hasRtcEngineCapabilityEnabled"
:color="shareButtonColor" :color="shareButtonColor"
:label="$t('conferencing.shareButtonLabel')" :label="$t('Share')"
flat flat
dense dense
icon="link" icon="link"

@ -161,8 +161,8 @@ export default {
}, },
audioLabel () { audioLabel () {
return this.isAudioMuted return this.isAudioMuted
? this.$t('conferencing.unmuteMicrophone') ? this.$t('Unmute')
: this.$t('conferencing.muteMicrophone') : this.$t('Mute')
}, },
showMenu () { showMenu () {
this.$refs.popover.open() this.$refs.popover.open()

@ -1,7 +1,7 @@
<template> <template>
<csc-dialog <csc-dialog
ref="dialogComp" ref="dialogComp"
:title="$t('conferencing.shareDialogTitle')" :title="$t('Share conference')"
:title-icon="'link'" :title-icon="'link'"
> >
<div <div
@ -21,7 +21,7 @@
icon="link" icon="link"
@click="copy" @click="copy"
> >
{{ $t('conferencing.copyLinkButtonLabel') }} {{ $t('Copy link') }}
</q-btn> </q-btn>
</csc-dialog> </csc-dialog>
</template> </template>

@ -25,13 +25,13 @@
<q-item-label <q-item-label
caption caption
> >
{{ $t('pages.conversations.callDuration') }}: {{ call.duration }} {{ $t('Duration') }}: {{ call.duration }}
</q-item-label> </q-item-label>
<q-item-label <q-item-label
caption caption
> >
<span> <span>
{{ $t('pages.conversations.cost') }} {{ $t('Cost') }}
</span> </span>
<span> <span>
{{ totalCustomerCostRounded | wholeCurrency }} {{ totalCustomerCostRounded | wholeCurrency }}
@ -141,16 +141,16 @@ export default {
}, },
direction () { direction () {
if (this.call.direction === 'out') { if (this.call.direction === 'out') {
return this.$t('pages.conversations.to') return this.$t('to')
} else { } else {
return this.$t('pages.conversations.from') return this.$t('from')
} }
}, },
typeTerm () { typeTerm () {
if (this.call.call_type === 'call') { if (this.call.call_type === 'call') {
return this.$t('pages.conversations.call') return this.$t('Call')
} else { } else {
return this.$t('pages.conversations.callForwarded') return this.$t('Call forwarded')
} }
}, },
icon () { icon () {

@ -9,21 +9,21 @@
icon="mic" icon="mic"
color="primary" color="primary"
/> />
<q-item-main :label="$t('startAudioCall')" /> <q-item-main :label="$t('Audio Only')" />
</q-item> </q-item>
<q-item @click="initCall('audioVideo')"> <q-item @click="initCall('audioVideo')">
<q-item-side <q-item-side
icon="videocam" icon="videocam"
color="primary" color="primary"
/> />
<q-item-main :label="$t('startVideoCall')" /> <q-item-main :label="$t('Audio + Video')" />
</q-item> </q-item>
<q-item @click="initCall('audioScreen')"> <q-item @click="initCall('audioScreen')">
<q-item-side <q-item-side
icon="computer" icon="computer"
color="primary" color="primary"
/> />
<q-item-main :label="$t('startScreenSharing')" /> <q-item-main :label="$t('Audio + Screen')" />
</q-item> </q-item>
</q-list> </q-list>
</template> </template>

@ -85,23 +85,23 @@ export default {
}, },
blockIncomingLabel () { blockIncomingLabel () {
if (this.blockedIncoming) { if (this.blockedIncoming) {
return this.$t('pages.conversations.buttons.unblockIncoming') return this.$t('Unblock Incoming')
} else { } else {
return this.$t('pages.conversations.buttons.blockIncoming') return this.$t('Block Incoming')
} }
}, },
blockOutgoingLabel () { blockOutgoingLabel () {
if (this.blockedOutgoing) { if (this.blockedOutgoing) {
return this.$t('pages.conversations.buttons.unblockOutgoing') return this.$t('Unblock Outgoing')
} else { } else {
return this.$t('pages.conversations.buttons.blockOutgoing') return this.$t('Block Outgoing')
} }
}, },
blockBothLabel () { blockBothLabel () {
if (this.blockedBoth) { if (this.blockedBoth) {
return this.$t('pages.conversations.buttons.unblockBoth') return this.$t('Unblock Incoming/Outgoing')
} else if (this.unblockedBoth) { } else if (this.unblockedBoth) {
return this.$t('pages.conversations.buttons.blockBoth') return this.$t('Block Incoming/Outgoing')
} else { } else {
return '' return ''
} }

@ -13,7 +13,7 @@
<q-item-label <q-item-label
class="text-subtitle1" class="text-subtitle1"
> >
{{ $t('pages.conversations.fax') }} {{ $t('Fax') }}
{{ direction }} {{ direction }}
{{ fax.caller | numberFormat }} {{ fax.caller | numberFormat }}
</q-item-label> </q-item-label>
@ -32,13 +32,13 @@
v-else-if="fax.pages === 1" v-else-if="fax.pages === 1"
caption caption
> >
{{ fax.pages }} {{ $t('pages.conversations.page') }} {{ fax.pages }} {{ $t('page') }}
</q-item-label> </q-item-label>
<q-item-label <q-item-label
v-else v-else
caption caption
> >
{{ fax.pages }} {{ $t('pages.conversations.pages') }} {{ fax.pages }} {{ $t('pages') }}
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
<q-item-section <q-item-section
@ -48,7 +48,7 @@
<csc-popup-menu-item <csc-popup-menu-item
icon="file_download" icon="file_download"
color="primary" color="primary"
:label="$t('pages.conversations.buttons.downloadFax')" :label="$t('Download fax')"
@click="downloadFax" @click="downloadFax"
/> />
<csc-popup-menu-item-start-call <csc-popup-menu-item-start-call

@ -13,7 +13,7 @@
<q-item-label <q-item-label
class="text-subtitle1" class="text-subtitle1"
> >
{{ $t('pages.conversations.voicemail') }} {{ $t('Voicemail') }}
{{ direction }} {{ direction }}
{{ voiceMail.caller | destinationFormat }} {{ voiceMail.caller | destinationFormat }}
</q-item-label> </q-item-label>
@ -25,9 +25,9 @@
<q-item-label <q-item-label
caption caption
> >
{{ $t('pages.conversations.duration') }} {{ $t('Duration') }}
{{ voiceMail.duration }} {{ voiceMail.duration }}
{{ $t('pages.conversations.seconds') }} {{ $t('seconds') }}
</q-item-label> </q-item-label>
<csc-audio-player <csc-audio-player
ref="voicemailPlayer" ref="voicemailPlayer"
@ -44,7 +44,7 @@
<csc-popup-menu-item <csc-popup-menu-item
icon="file_download" icon="file_download"
color="primary" color="primary"
:label="$t('pages.conversations.buttons.downloadVoicemail')" :label="$t('Download voicemail')"
@click="downloadVoiceMail" @click="downloadVoiceMail"
/> />
<csc-popup-menu-item-start-call <csc-popup-menu-item-start-call

@ -9,7 +9,7 @@
slot="title" slot="title"
> >
<csc-list-item-title> <csc-list-item-title>
{{ $t('faxSettings.destinationItemTitle', {destination: destination.destination, filetype: destination.filetype}) }} {{ $t('&lt;{destination}&gt; as {filetype}', {destination: destination.destination, filetype: destination.filetype}) }}
</csc-list-item-title> </csc-list-item-title>
<q-slide-transition> <q-slide-transition>
<csc-list-item-subtitle <csc-list-item-subtitle
@ -39,7 +39,7 @@
icon-color="negative" icon-color="negative"
@click="deleteDestination" @click="deleteDestination"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</csc-list-menu-item> </csc-list-menu-item>
</template> </template>
<template slot="body"> <template slot="body">

@ -7,7 +7,7 @@
<csc-input-saveable <csc-input-saveable
v-model="data.destination" v-model="data.destination"
icon="email" icon="email"
:label="$t('faxSettings.destinationEmail')" :label="$t('Destination Email')"
:disable="disabled" :disable="disabled"
:readonly="loading" :readonly="loading"
:error="$v.data.destination.$error" :error="$v.data.destination.$error"
@ -27,7 +27,7 @@
map-options map-options
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('faxSettings.fileType')" :label="$t('File Type')"
:options="fileTypeOptions" :options="fileTypeOptions"
@input="updatePropertyData('filetype')" @input="updatePropertyData('filetype')"
/> />
@ -37,19 +37,19 @@
> >
<q-toggle <q-toggle
v-model="data.incoming" v-model="data.incoming"
:label="$t('faxSettings.deliverIncomingFaxes')" :label="$t('Deliver Incoming Faxes')"
:disable="loading" :disable="loading"
@input="updatePropertyData('incoming')" @input="updatePropertyData('incoming')"
/> />
<q-toggle <q-toggle
v-model="data.outgoing" v-model="data.outgoing"
:label="$t('faxSettings.deliverOutgoingFaxes')" :label="$t('Deliver Outgoing Faxes')"
:disable="loading" :disable="loading"
@input="updatePropertyData('outgoing')" @input="updatePropertyData('outgoing')"
/> />
<q-toggle <q-toggle
v-model="data.status" v-model="data.status"
:label="$t('faxSettings.receiveReports')" :label="$t('Receive Reports')"
:disable="loading" :disable="loading"
@input="updatePropertyData('status')" @input="updatePropertyData('status')"
/> />
@ -64,7 +64,7 @@
color="default" color="default"
icon="clear" icon="clear"
:disable="loading" :disable="loading"
:label="$t('buttons.cancel')" :label="$t('Cancel')"
@click="cancel()" @click="cancel()"
/> />
<q-btn <q-btn
@ -73,7 +73,7 @@
icon="done" icon="done"
:loading="loading" :loading="loading"
:disable="$v.data.$invalid || loading" :disable="$v.data.$invalid || loading"
:label="$t('faxSettings.createDestination')" :label="$t('Create destination')"
@click="save()" @click="save()"
/> />
</div> </div>
@ -129,11 +129,11 @@ export default {
computed: { computed: {
destinationErrorMessage () { destinationErrorMessage () {
if (!this.$v.data.destination.required) { if (!this.$v.data.destination.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('faxSettings.destinationEmail') field: this.$t('Destination Email')
}) })
} else if (!this.$v.data.destination.email) { } else if (!this.$v.data.destination.email) {
return this.$t('validationErrors.email') return this.$t('Input a valid email address')
} else { } else {
return '' return ''
} }

@ -8,7 +8,7 @@
<q-item-section> <q-item-section>
<q-toggle <q-toggle
v-model="faxToMailSettings.active" v-model="faxToMailSettings.active"
:label="$t('faxSettings.active')" :label="$t('Active')"
:disable="!dataLoaded" :disable="!dataLoaded"
@input="setChangedData('active', !faxServerSettings.active)" @input="setChangedData('active', !faxServerSettings.active)"
/> />
@ -26,7 +26,7 @@
<q-item-section> <q-item-section>
<csc-input-saveable <csc-input-saveable
v-model.trim="faxToMailSettings.name" v-model.trim="faxToMailSettings.name"
:label="$t('faxSettings.sendfaxHeaderName')" :label="$t('Name in Fax Header for Sendfax')"
:disable="!dataLoaded" :disable="!dataLoaded"
:loading="loadingFaxServerSettings" :loading="loadingFaxServerSettings"
:value-changed="nameChanged" :value-changed="nameChanged"
@ -39,7 +39,7 @@
<q-item-section> <q-item-section>
<q-toggle <q-toggle
v-model="faxToMailSettings.t38" v-model="faxToMailSettings.t38"
:label="$t('faxSettings.T38')" :label="$t('T38')"
:disable="!dataLoaded" :disable="!dataLoaded"
@input="setChangedData('t38', !faxServerSettings.t38)" @input="setChangedData('t38', !faxServerSettings.t38)"
/> />
@ -57,7 +57,7 @@
<q-item-section> <q-item-section>
<q-toggle <q-toggle
v-model="faxToMailSettings.ecm" v-model="faxToMailSettings.ecm"
:label="$t('faxSettings.ECM')" :label="$t('ECM')"
:disable="!dataLoaded" :disable="!dataLoaded"
@input="setChangedData('ecm', !faxServerSettings.ecm)" @input="setChangedData('ecm', !faxServerSettings.ecm)"
/> />
@ -73,7 +73,7 @@
</q-item> </q-item>
<q-item class="row"> <q-item class="row">
<div class="col"> <div class="col">
<span class="text-h6">{{ $t('faxSettings.destinations') }}:</span> <span class="text-h6">{{ $t('Destinations') }}:</span>
</div> </div>
<div class="col text-center"> <div class="col text-center">
<csc-spinner <csc-spinner
@ -88,7 +88,7 @@
:disable="!dataLoaded || showAddNewDestination" :disable="!dataLoaded || showAddNewDestination"
@click="openAddNewDestination" @click="openAddNewDestination"
> >
{{ $t('faxSettings.addDestination') }} {{ $t('Add destination') }}
</q-btn> </q-btn>
</div> </div>
</q-item> </q-item>
@ -117,7 +117,7 @@
v-if="!hasDestinations" v-if="!hasDestinations"
class="row justify-center" class="row justify-center"
> >
{{ $t('faxSettings.noDestinationsCreatedYet') }} {{ $t('No destinations created yet') }}
</q-item> </q-item>
<csc-fax-to-mail-destination <csc-fax-to-mail-destination
v-for="(destinationItem, index) in faxToMailSettings.destinations" v-for="(destinationItem, index) in faxToMailSettings.destinations"
@ -252,8 +252,8 @@ export default {
this.$q.dialog({ this.$q.dialog({
component: CscRemoveDialog, component: CscRemoveDialog,
parent: this, parent: this,
title: this.$t('faxSettings.deleteDestinationTitle'), title: this.$t('Remove Destination'),
message: this.$t('faxSettings.deleteDestinationText', { destination: destinationId }) message: this.$t('You are about to remove destination {destination}', { destination: destinationId })
}).onOk(() => { }).onOk(() => {
this.deleteDestination(destinationId) this.deleteDestination(destinationId)
}) })

@ -79,7 +79,7 @@
color="default" color="default"
icon="clear" icon="clear"
:disable="loading" :disable="loading"
:label="$t('buttons.cancel')" :label="$t('Cancel')"
@click="cancel()" @click="cancel()"
/> />
<q-btn <q-btn
@ -144,7 +144,7 @@ export default {
computed: { computed: {
fromEmailErrorMessage () { fromEmailErrorMessage () {
if (!this.$v.data.from_email.email) { if (!this.$v.data.from_email.email) {
return this.$t('validationErrors.email') return this.$t('Input a valid email address')
} else { } else {
return '' return ''
} }

@ -83,11 +83,11 @@ export default {
}, },
newEmailErrorMessage () { newEmailErrorMessage () {
if (!this.$v.newEmail.required) { if (!this.$v.newEmail.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('Renew Notify Email') field: this.$t('Renew Notify Email')
}) })
} else if (!this.$v.newEmail.email) { } else if (!this.$v.newEmail.email) {
return this.$t('validationErrors.email') return this.$t('Input a valid email address')
} else { } else {
return '' return ''
} }
@ -138,8 +138,8 @@ export default {
}, },
remove () { remove () {
this.$q.dialog({ this.$q.dialog({
title: this.$t('faxSettings.deleteRenewNotifyEmailTitle'), title: this.$t('Remove secret key renew notify email'),
message: this.$t('faxSettings.deleteRenewNotifyEmailText', { email: this.value }), message: this.$t('You are about to remove secret key renew notify email: {email}', { email: this.value }),
color: 'primary', color: 'primary',
cancel: true, cancel: true,
persistent: true persistent: true

@ -92,11 +92,11 @@ export default {
computed: { computed: {
destinationErrorMessage () { destinationErrorMessage () {
if (!this.$v.data.destination.required) { if (!this.$v.data.destination.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('Email') field: this.$t('Email')
}) })
} else if (!this.$v.data.destination.email) { } else if (!this.$v.data.destination.email) {
return this.$t('validationErrors.email') return this.$t('Input a valid email address')
} else { } else {
return '' return ''
} }

@ -8,7 +8,7 @@
class="self-center" class="self-center"
/> />
<div v-else> <div v-else>
{{ $t('faxSettings.featureIsNotActive') }} {{ $t('Mail To Fax feature is not active') }}
</div> </div>
</div> </div>
<div v-else> <div v-else>
@ -20,7 +20,7 @@
<q-item-section> <q-item-section>
<q-toggle <q-toggle
:value="mailToFaxSettingsModel.active" :value="mailToFaxSettingsModel.active"
:label="$t('faxSettings.active')" :label="$t('Active')"
:disable="true" :disable="true"
/> />
</q-item-section> </q-item-section>
@ -58,7 +58,7 @@
map-options map-options
:disable="!dataLoaded" :disable="!dataLoaded"
:readonly="!dataLoaded" :readonly="!dataLoaded"
:label="$t('faxSettings.secretKeyRenew')" :label="$t('Secret Key Renew')"
:options="secretKeyRenewOptions" :options="secretKeyRenewOptions"
@input="setChangedData('secret_key_renew', mailToFaxSettingsModel.secret_key_renew)" @input="setChangedData('secret_key_renew', mailToFaxSettingsModel.secret_key_renew)"
> >
@ -81,7 +81,7 @@
<div class="col q-py-md q-pl-md"> <div class="col q-py-md q-pl-md">
<div class="row q-pb-xs"> <div class="row q-pb-xs">
<div class="col vertical-bottom"> <div class="col vertical-bottom">
<span class="vertical-middle">{{ $t('faxSettings.secretKeyRenewNotify') }}:</span> <span class="vertical-middle">{{ $t('Secret Key Renew Notify') }}:</span>
</div> </div>
<div class="col text-right"> <div class="col text-right">
<q-btn <q-btn
@ -91,7 +91,7 @@
:disable="!dataLoaded || showAddNewRenewEmail" :disable="!dataLoaded || showAddNewRenewEmail"
@click="openAddNewRenewEmail" @click="openAddNewRenewEmail"
> >
{{ $t('faxSettings.addEmail') }} {{ $t('Add email') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -143,7 +143,7 @@
<div class="col q-pa-md"> <div class="col q-pa-md">
<div class="row q-pb-xs"> <div class="row q-pb-xs">
<div class="col"> <div class="col">
{{ $t('faxSettings.ACL') }}: {{ $t('ACL') }}:
</div> </div>
<div class="col text-right"> <div class="col text-right">
<q-btn <q-btn
@ -153,7 +153,7 @@
:disable="!dataLoaded || showAddNewACL" :disable="!dataLoaded || showAddNewACL"
@click="openAddNewACL" @click="openAddNewACL"
> >
{{ $t('faxSettings.addACL') }} {{ $t('Add ACL') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -253,12 +253,12 @@ export default {
return this.mailToFaxSettingsInitialized && !this.loadingMail2FaxSettings return this.mailToFaxSettingsInitialized && !this.loadingMail2FaxSettings
}, },
secretKeyFieldLabel () { secretKeyFieldLabel () {
let label = this.$t('faxSettings.secretKeyField') let label = this.$t('Secret Key (empty=disabled)')
label += ' (' + this.$t('faxSettings.lastModifyTime') + ': ' label += ' (' + this.$t('Last Modify Time') + ': '
if (this.mailToFaxSettings.last_secret_key_modify) { if (this.mailToFaxSettings.last_secret_key_modify) {
label += this.mailToFaxSettings.last_secret_key_modify + ')' label += this.mailToFaxSettings.last_secret_key_modify + ')'
} else { } else {
label += this.$t('faxSettings.notModifiedYet') + ')' label += this.$t('Not modified yet') + ')'
} }
return label return label
}, },

@ -13,9 +13,9 @@
<span <span
v-if="groupSourceset" v-if="groupSourceset"
> >
{{ $t('pages.newCallForward.conditionBtnLabelPrefix') }} {{ $t(' and') }}
<span class="csc-cf-from-link"> <span class="csc-cf-from-link">
{{ $t('pages.newCallForward.fromLabelShort') +'"'+ groupSourceset +'"' }} {{ $t(' call from ') +'"'+ groupSourceset +'"' }}
<q-menu <q-menu
ref="sourcesListEditMenu" ref="sourcesListEditMenu"
> >
@ -34,9 +34,9 @@
<span <span
v-if="groupTimeset && !isRange" v-if="groupTimeset && !isRange"
> >
{{ $t('pages.newCallForward.conditionBtnLabelPrefix') }} {{ $t(' and') }}
<span class="csc-cf-from-link"> <span class="csc-cf-from-link">
{{ $t('pages.newCallForward.dateIsShort') + groupTimeset }} {{ $t(' date is ') + groupTimeset }}
</span> </span>
<q-menu <q-menu
ref="dayWidget" ref="dayWidget"
@ -53,7 +53,7 @@
color="primary" color="primary"
icon="clear" icon="clear"
> >
{{ $t('buttons.close') }} {{ $t('Close') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-close-popup v-close-popup
@ -62,7 +62,7 @@
icon="delete" icon="delete"
@click="showConfirmDeleteTimesetDialog" @click="showConfirmDeleteTimesetDialog"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</q-btn> </q-btn>
</div> </div>
</q-date> </q-date>
@ -70,8 +70,8 @@
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDeleteTimesetDialog" ref="confirmDeleteTimesetDialog"
title-icon="delete" title-icon="delete"
:title="$t('pages.newCallForward.cancelTimesetDialogTitle', {name: groupTimeset})" :title="$t('Delete {name} timeset', {name: groupTimeset})"
:message="$t('pages.newCallForward.cancelTimesetText', {name: groupTimeset})" :message="$t('You are about to delete {name} timeset', {name: groupTimeset})"
@confirm="deleteTimeset" @confirm="deleteTimeset"
/> />
@ -79,12 +79,12 @@
<span <span
v-if="groupTimeset && isRange" v-if="groupTimeset && isRange"
> >
{{ $t('pages.newCallForward.conditionBtnLabelPrefix') }} {{ $t(' and') }}
<span <span
ref="isRangeLink" ref="isRangeLink"
class="csc-cf-from-link" class="csc-cf-from-link"
> >
{{ $t('pages.newCallForward.dateRangeShort') + groupTimeRange }} {{ $t(' date range is ') + groupTimeRange }}
<q-menu <q-menu
ref="editDateRangeMenu" ref="editDateRangeMenu"
@hide="resetAction()" @hide="resetAction()"
@ -101,8 +101,8 @@
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDeleteTimesetDialog" ref="confirmDeleteTimesetDialog"
title-icon="delete" title-icon="delete"
:title="$t('pages.newCallForward.cancelTimesetDialogTitle', {name: groupTimeRange})" :title="$t('Delete {name} timeset', {name: groupTimeRange})"
:message="$t('pages.newCallForward.cancelTimesetText', {name: groupTimeRange})" :message="$t('You are about to delete {name} timeset', {name: groupTimeRange})"
@confirm="deleteTimeset" @confirm="deleteTimeset"
/> />
</q-menu> </q-menu>
@ -111,7 +111,7 @@
<span <span
v-if="isWeekdays && !isOfficeHours" v-if="isWeekdays && !isOfficeHours"
> >
{{ $t('pages.newCallForward.conditionBtnLabelPrefix') }} {{ $t(' and') }}
<span <span
ref="isWeekdayLink" ref="isWeekdayLink"
class="csc-cf-from-link" class="csc-cf-from-link"
@ -135,7 +135,7 @@
<span <span
v-if="isOfficeHours" v-if="isOfficeHours"
> >
{{ $t('pages.newCallForward.conditionBtnLabelPrefix') }} {{ $t(' and') }}
<span <span
ref="isOfficeHoursLink" ref="isOfficeHoursLink"
class="csc-cf-from-link" class="csc-cf-from-link"
@ -162,9 +162,9 @@
v-if="isTempGroup || !(groupSourceset && groupTimeset || groupSourceset && isWeekdays || groupTimeset && isWeekdays )" v-if="isTempGroup || !(groupSourceset && groupTimeset || groupSourceset && isWeekdays || groupTimeset && isWeekdays )"
class="csc-cf-destination-add-condition" class="csc-cf-destination-add-condition"
> >
{{ $t('pages.newCallForward.conditionBtnLabelPrefix') }} {{ $t(' and') }}
<span class="csc-cf-from-link"> <span class="csc-cf-from-link">
{{ $t('pages.newCallForward.conditionBtnLabel') }} {{ $t(' condition') }}
</span> </span>
<q-menu <q-menu
ref="conditions" ref="conditions"
@ -179,7 +179,7 @@
clickable clickable
@click="()=>{action = 'addFromCondition'}" @click="()=>{action = 'addFromCondition'}"
> >
<q-item-section>{{ $t('pages.newCallForward.fromLabel') }}</q-item-section> <q-item-section>{{ $t('If call from ...') }}</q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="isTempGroup || !hasTimeset" v-if="isTempGroup || !hasTimeset"
@ -187,7 +187,7 @@
clickable clickable
@click="()=>{action = 'addDateIsCondition'}" @click="()=>{action = 'addDateIsCondition'}"
> >
<q-item-section>{{ $t('pages.newCallForward.dateIsLabel') }}</q-item-section> <q-item-section>{{ $t('If date is ...') }}</q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="isTempGroup || !hasTimeset" v-if="isTempGroup || !hasTimeset"
@ -195,7 +195,7 @@
clickable clickable
@click="()=>{action = 'addDateRangeCondition'}" @click="()=>{action = 'addDateRangeCondition'}"
> >
<q-item-section>{{ $t('pages.newCallForward.dateRangeLabel') }}</q-item-section> <q-item-section>{{ $t('If date range is ...') }}</q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="isTempGroup || !hasTimeset" v-if="isTempGroup || !hasTimeset"
@ -203,7 +203,7 @@
clickable clickable
@click="()=>{action = 'addWeekdayCondition'}" @click="()=>{action = 'addWeekdayCondition'}"
> >
<q-item-section>{{ $t('pages.newCallForward.weekdaysLabel') }}</q-item-section> <q-item-section>{{ $t('If weekdays are ...') }}</q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="isTempGroup || !hasTimeset" v-if="isTempGroup || !hasTimeset"
@ -211,7 +211,7 @@
clickable clickable
@click="()=>{action = 'addOfficeHoursCondition'}" @click="()=>{action = 'addOfficeHoursCondition'}"
> >
<q-item-section>{{ $t('pages.newCallForward.officeHoursLabel') }}</q-item-section> <q-item-section>{{ $t('If office hours are ...') }}</q-item-section>
</q-item> </q-item>
</q-list> </q-list>
</q-menu> </q-menu>
@ -246,7 +246,7 @@
color="primary" color="primary"
icon="clear" icon="clear"
> >
{{ $t('buttons.close') }} {{ $t('Close') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-close-popup v-close-popup
@ -255,7 +255,7 @@
icon="delete" icon="delete"
@click="showConfirmDeleteTimesetDialog" @click="showConfirmDeleteTimesetDialog"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</q-btn> </q-btn>
</div> </div>
</q-date> </q-date>
@ -322,8 +322,8 @@
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDialog" ref="confirmDialog"
title-icon="delete" title-icon="delete"
:title="$t('pages.newCallForward.cancelGroupDialogTitle', {groupName: group.name})" :title="$t('Delete {groupName} forwarding group', {groupName: group.name})"
:message="$t('pages.newCallForward.cancelGroupDialogText', {groupName: group.name})" :message="$t('You are about to delete {groupName} call forwarding group', {groupName: group.name})"
@confirm="confirmDeleteGroup" @confirm="confirmDeleteGroup"
/> />
<q-spinner-dots <q-spinner-dots
@ -391,7 +391,7 @@
color="primary" color="primary"
size="24px" size="24px"
/> />
{{ $t('pages.newCallForward.addDestinationLabel') }} {{ $t('Add destination') }}
<q-menu <q-menu
ref="destTypeMenu" ref="destTypeMenu"
:auto-close="true" :auto-close="true"
@ -432,6 +432,7 @@ import {
import { import {
date date
} from 'quasar' } from 'quasar'
import { WeekdayTranslationMap } from 'src/filters/date'
import CscConfirmDialog from '../../CscConfirmationDialog' import CscConfirmDialog from '../../CscConfirmationDialog'
import CscNewCallForwardDestination from './CscNewCallForwardDestination' import CscNewCallForwardDestination from './CscNewCallForwardDestination'
import CscNewCallForwardAddDestinationForm from './CscNewCallForwardAddDestinationForm' import CscNewCallForwardAddDestinationForm from './CscNewCallForwardAddDestinationForm'
@ -511,17 +512,17 @@ export default {
switch (this.group.name) { switch (this.group.name) {
case 'csc-unconditional': case 'csc-unconditional':
case 'csc-timeout': case 'csc-timeout':
title = `${this.$t('pages.newCallForward.titles.timeoutGroup')}` title = `${this.$t('If available')}`
break break
case 'csc-unconditional-from': case 'csc-unconditional-from':
case 'csc-timeout-from': case 'csc-timeout-from':
title = `${this.$t('pages.newCallForward.titles.timeoutGroupFromPre')}` title = `${this.$t('If available and ')}`
break break
case 'csc-offline': case 'csc-offline':
title = `${this.$t('pages.newCallForward.titles.offlineGroup')}` title = `${this.$t('If not available')}`
break break
case 'csc-busy': case 'csc-busy':
title = `${this.$t('pages.newCallForward.titles.busyGroup')}` title = `${this.$t('If busy')}`
break break
} }
return title return title
@ -583,11 +584,11 @@ export default {
}, },
weekdaysLabelShort () { weekdaysLabelShort () {
return this.timeSet.times.length > 1 return this.timeSet.times.length > 1
? `${this.$t('pages.newCallForward.weekdaysLabelShort')}` ? `${this.$t(' weekdays are ')}`
: `${this.$t('pages.newCallForward.weekdayLabelShort')}` : `${this.$t(' weekday is ')}`
}, },
officeHoursLabelShort () { officeHoursLabelShort () {
return this.$tc('pages.newCallForward.officeHoursLabelShort', this.timeSet.times.length) return this.$tc(' office hour is | office hours are', this.timeSet.times.length)
}, },
groupWeekdays () { groupWeekdays () {
let times = _.cloneDeep(_.get(this.timeSet, 'times', [])) let times = _.cloneDeep(_.get(this.timeSet, 'times', []))
@ -635,7 +636,7 @@ export default {
return this.groupTimeset || this.isRange || this.isWeekdays return this.groupTimeset || this.isRange || this.isWeekdays
}, },
toggleLabel () { toggleLabel () {
return this.toggleDefaultNumber ? `${this.$t('pages.newCallForward.primarNumberEnabled')}` : `${this.$t('pages.newCallForward.primarNumberDisabled')}` return this.toggleDefaultNumber ? `${this.$t('All calls go to the primary number')}` : `${this.$t('No call goes to primary number')}`
}, },
isTimeoutOrUnconditional () { isTimeoutOrUnconditional () {
return this.group.name.includes('unconditional') || this.group.name.includes('timeout') return this.group.name.includes('unconditional') || this.group.name.includes('timeout')
@ -860,7 +861,7 @@ export default {
parseWeekDays (times) { parseWeekDays (times) {
const weekDays = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] const weekDays = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
return times return times
.map(time => this.$t('pages.callForward.times.' + weekDays[Number(time.wday) - 1])) .map(time => WeekdayTranslationMap[weekDays[Number(time.wday) - 1]])
.join(', ') .join(', ')
}, },
checkOfficeHoursForAllDays (times) { checkOfficeHoursForAllDays (times) {

@ -4,7 +4,7 @@
> >
<csc-input <csc-input
v-model="number" v-model="number"
:label="$t('callBlocking.number')" :label="$t('Number')"
@submit="save" @submit="save"
@error="error" @error="error"
/> />
@ -17,7 +17,7 @@
icon="clear" icon="clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -27,7 +27,7 @@
:disable="saveDisabled" :disable="saveDisabled"
@click="save(); close()" @click="save(); close()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
<div <div
v-if="loading" v-if="loading"
@ -117,7 +117,7 @@ export default {
const forwardGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', forwardGroupId) const forwardGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', forwardGroupId)
this.$store.dispatch('newCallForward/addGroupLoader', this.groupId) this.$store.dispatch('newCallForward/addGroupLoader', this.groupId)
if (this.numberError || this.saveDisabled) { if (this.numberError || this.saveDisabled) {
showGlobalError(this.$t('validationErrors.generic')) showGlobalError(this.$t('You have invalid form input. Please check and try again.'))
} else if (Number.isInteger(this.destinationIndex) && Number.isInteger(forwardGroup.id)) { // edit mode } else if (Number.isInteger(this.destinationIndex) && Number.isInteger(forwardGroup.id)) { // edit mode
await this.$store.dispatch('newCallForward/editDestination', { await this.$store.dispatch('newCallForward/editDestination', {
index: this.destinationIndex, index: this.destinationIndex,

@ -6,7 +6,7 @@
<q-item <q-item
class="justify-center text-bold" class="justify-center text-bold"
> >
{{ $t('pages.newCallForward.officeHoursTitle') }} {{ $t('Office hours') }}
</q-item> </q-item>
<q-item <q-item
class="justify-center" class="justify-center"
@ -14,7 +14,7 @@
<q-checkbox <q-checkbox
v-model="checkOfficeHoursForAllDays" v-model="checkOfficeHoursForAllDays"
:value="sameOfficeHoursForAllDays" :value="sameOfficeHoursForAllDays"
:label="$t('pages.newCallForward.sameOfficeHoursForAllDays')" :label="$t('Same time for all selected days')"
@input="toggleAllDaysSameOfficeHours" @input="toggleAllDaysSameOfficeHours"
/> />
</q-item> </q-item>
@ -28,7 +28,7 @@
dense dense
> >
<q-tab <q-tab
v-for="(dayLetter, index) in $t('pages.newCallForward.daysOfTheWeekShort').split(',')" v-for="(dayLetter, index) in $t('M,T,W,T,F,S,S').split(',')"
:key="index" :key="index"
:alert="hasOfficeHours(getDayNumber(index))" :alert="hasOfficeHours(getDayNumber(index))"
:name="getDayNumber(index)" :name="getDayNumber(index)"
@ -49,7 +49,7 @@
class="justify-center" class="justify-center"
> >
<q-btn <q-btn
v-for="(dayLetter, index) in $t('pages.newCallForward.daysOfTheWeekShort').split(',')" v-for="(dayLetter, index) in $t('M,T,W,T,F,S,S').split(',')"
:key="index" :key="index"
class="weekday-btn q-ma-sm" class="weekday-btn q-ma-sm"
:class="{ 'day-selected-btn': weekdays.includes(getDayNumber(index))}" :class="{ 'day-selected-btn': weekdays.includes(getDayNumber(index))}"
@ -100,7 +100,7 @@
color="primary" color="primary"
size="24px" size="24px"
/> />
{{ $t('pages.newCallForward.officeHoursAddBtnLabel') }} {{ $t('Add time range') }}
</q-btn> </q-btn>
</q-item> </q-item>
</q-list> </q-list>
@ -114,14 +114,14 @@
icon="delete" icon="delete"
@click="showRemoveDialog()" @click="showRemoveDialog()"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</q-btn> </q-btn>
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDeleteTimesetDialog" ref="confirmDeleteTimesetDialog"
title-icon="delete" title-icon="delete"
class="csc-cf-delete-weekdays-btn" class="csc-cf-delete-weekdays-btn"
:title="$t('pages.newCallForward.cancelTimesetDialogTitle', {name: 'office hours'})" :title="$t('Delete {name} timeset', {name: 'office hours'})"
:message="$t('pages.newCallForward.cancelTimesetText', {name: 'this'})" :message="$t('You are about to delete {name} timeset', {name: 'this'})"
@confirm="deleteTimeset" @confirm="deleteTimeset"
/> />
<q-btn <q-btn
@ -130,7 +130,7 @@
icon="clear" icon="clear"
@click="cancel()" @click="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -139,7 +139,7 @@
:disabled="timeRanges.length < 1" :disabled="timeRanges.length < 1"
@click="save()" @click="save()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</q-item> </q-item>
</q-list> </q-list>

@ -4,14 +4,14 @@
> >
<csc-input <csc-input
v-model="name" v-model="name"
:label="$t('pages.newCallForward.sourcesetName')" :label="$t('List name')"
@submit="save" @submit="save"
@error="errorName" @error="errorName"
/> />
<csc-call-input <csc-call-input
v-model="number" v-model="number"
:label="$t('callBlocking.number')" :label="$t('Number')"
@submit="save" @submit="save"
@error="errorNumber" @error="errorNumber"
/> />
@ -25,7 +25,7 @@
icon="clear" icon="clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -35,7 +35,7 @@
:disable="saveDisabled" :disable="saveDisabled"
@click="save(); close()" @click="save(); close()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
<div <div
v-if="loading" v-if="loading"
@ -106,7 +106,7 @@ export default {
const forwardGroupName = this.groupName const forwardGroupName = this.groupName
if (this.numberError || this.nameError || this.saveDisabled) { if (this.numberError || this.nameError || this.saveDisabled) {
showGlobalError(this.$t('validationErrors.generic')) showGlobalError(this.$t('You have invalid form input. Please check and try again.'))
return return
} }
try { try {

@ -8,8 +8,8 @@
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDeleteTimesetDialog" ref="confirmDeleteTimesetDialog"
title-icon="delete" title-icon="delete"
:title="$t('pages.newCallForward.cancelTimesetDialogTitle', {name: 'weekdays'})" :title="$t('Delete {name} timeset', {name: 'weekdays'})"
:message="$t('pages.newCallForward.cancelTimesetText', {name: 'this'})" :message="$t('You are about to delete {name} timeset', {name: 'this'})"
@confirm="deleteTimeset" @confirm="deleteTimeset"
/> />
</div> </div>
@ -83,7 +83,7 @@
icon="delete" icon="delete"
@mousedown.native="showRemoveDialog()" @mousedown.native="showRemoveDialog()"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -91,7 +91,7 @@
icon="clear" icon="clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -100,7 +100,7 @@
icon="done" icon="done"
@click="save(); close()" @click="save(); close()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
<div <div
v-if="loading" v-if="loading"

@ -23,7 +23,7 @@
color="primary" color="primary"
icon="done" icon="done"
> >
{{ $t('buttons.confirm') }} {{ $t('Confirm') }}
</q-btn> </q-btn>
</div> </div>
</q-date> </q-date>
@ -46,7 +46,7 @@
color="primary" color="primary"
icon="done" icon="done"
> >
{{ $t('buttons.confirm') }} {{ $t('Confirm') }}
</q-btn> </q-btn>
</div> </div>
</q-date> </q-date>
@ -68,7 +68,7 @@
color="primary" color="primary"
icon="done" icon="done"
> >
{{ $t('buttons.confirm') }} {{ $t('Confirm') }}
</q-btn> </q-btn>
</div> </div>
</q-time> </q-time>
@ -90,7 +90,7 @@
color="primary" color="primary"
icon="done" icon="done"
> >
{{ $t('buttons.confirm') }} {{ $t('Confirm') }}
</q-btn> </q-btn>
</div> </div>
</q-time> </q-time>
@ -102,7 +102,7 @@
<q-input <q-input
v-model="dayFromFormatted" v-model="dayFromFormatted"
dark dark
:placeholder="$t('pages.newCallForward.dateRangeStartDate')" :placeholder="$t('Start date')"
@click="openDayFrom()" @click="openDayFrom()"
> >
<template v-slot:append> <template v-slot:append>
@ -116,7 +116,7 @@
v-model="dayToFormatted" v-model="dayToFormatted"
:disable="!dayFrom" :disable="!dayFrom"
dark dark
:placeholder="$t('pages.newCallForward.dateRangeEndDate')" :placeholder="$t('End date')"
@click="openDayTo()" @click="openDayTo()"
> >
<template v-slot:append> <template v-slot:append>
@ -134,7 +134,7 @@
v-model="hourFromFormatted" v-model="hourFromFormatted"
dark dark
:disable="!dayFrom" :disable="!dayFrom"
:placeholder="$t('pages.newCallForward.dateRangeStartTime')" :placeholder="$t('Start time')"
@click="openHourFrom()" @click="openHourFrom()"
> >
<template v-slot:append> <template v-slot:append>
@ -147,7 +147,7 @@
<q-input <q-input
v-model="hourToFormatted" v-model="hourToFormatted"
dark dark
:placeholder="$t('pages.newCallForward.dateRangeEndTime')" :placeholder="$t('End time')"
:disable="!dayTo" :disable="!dayTo"
@click="openHourTo()" @click="openHourTo()"
> >
@ -169,12 +169,12 @@
icon="delete" icon="delete"
@mousedown.native="showRemoveDateRangeDialog()" @mousedown.native="showRemoveDateRangeDialog()"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDeleteTimesetDialog" ref="confirmDeleteTimesetDialog"
title-icon="delete" title-icon="delete"
:title="$t('pages.newCallForward.cancelTimesetDialogTitle', {name: groupTimeRange})" :title="$t('Delete {name} timeset', {name: groupTimeRange})"
:message="$t('pages.newCallForward.cancelTimesetText', {name: groupTimeRange})" :message="$t('You are about to delete {name} timeset', {name: groupTimeRange})"
@confirm="deleteTimeset" @confirm="deleteTimeset"
/> />
</q-btn> </q-btn>
@ -184,7 +184,7 @@
icon="clear" icon="clear"
@click="resetTimeRange(); close()" @click="resetTimeRange(); close()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -193,7 +193,7 @@
:disable="!isDateReadyForSubmit" :disable="!isDateReadyForSubmit"
@click="save();" @click="save();"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>

@ -56,7 +56,7 @@
v-if="firstDestinationInCreation && (popoverToTop || popoverTimeoutToTop)" v-if="firstDestinationInCreation && (popoverToTop || popoverTimeoutToTop)"
class="csc-cf-popver-alert" class="csc-cf-popver-alert"
> >
{{ $t('pages.newCallForward.mandatoryDestinationLabel') }} {{ $t('Please add a destination to the group before adding conditions') }}
</div> </div>
<csc-new-call-forward-destination-type-form <csc-new-call-forward-destination-type-form
ref="selectDestinationType" ref="selectDestinationType"
@ -94,8 +94,8 @@
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDialog" ref="confirmDialog"
title-icon="delete" title-icon="delete"
:title="$t('pages.newCallForward.cancelDialogTitle', {groupName: groupName})" :title="$t('Delete from {groupName} forwarding', {groupName: groupName})"
:message="$t('pages.newCallForward.cancelDialogText', {groupName: groupName, destination: getDestName()})" :message="$t('You are about to delete {destination} from {groupName} call forwarding', {groupName: groupName, destination: getDestName()})"
@confirm="confirmDeleteDest" @confirm="confirmDeleteDest"
/> />
</div> </div>
@ -165,21 +165,21 @@ export default {
if (this.allCallsFwd) { if (this.allCallsFwd) {
return '' return ''
} else { } else {
return this.$t('pages.newCallForward.destinationTimeoutLabel') return this.$t('Then after ')
} }
}, },
labelFront () { labelFront () {
if (this.allCallsFwd) { if (this.allCallsFwd) {
return this.$t('pages.newCallForward.allCallsForwardedTo') return this.$t('All calls forwarded to')
} else if (this.isVoiceMail() || this.isOfflineGroup() || this.isBusyGroup()) { } else if (this.isVoiceMail() || this.isOfflineGroup() || this.isBusyGroup()) {
return this.$t('pages.newCallForward.destinationVoicemailLabel') return this.$t('seconds finally forwarded to')
} else { } else {
return this.$t('pages.newCallForward.destinationNumberLabel') return this.$t('seconds forwarded to')
} }
}, },
labelNumber () { labelNumber () {
if (!this.destinationNumber || this.destinationNumber.length < 2) { if (!this.destinationNumber || this.destinationNumber.length < 2) {
return this.$t('pages.newCallForward.destinationLabel') return this.$t('Destination')
} else { } else {
return this.destinationNumber return this.destinationNumber
} }
@ -195,7 +195,7 @@ export default {
isNaN(this.getOwnPhoneTimeout) === false isNaN(this.getOwnPhoneTimeout) === false
? this.getOwnPhoneTimeout ? this.getOwnPhoneTimeout
: destination.timeout : destination.timeout
this.destinationNumber = this.isVoiceMail() ? `${this.$t('pages.newCallForward.voiceMailLabel')}` : destination.simple_destination this.destinationNumber = this.isVoiceMail() ? `${this.$t('Voicemail')}` : destination.simple_destination
this.destinationIndex = this.index this.destinationIndex = this.index
}, },
async showNext () { async showNext () {
@ -280,7 +280,7 @@ export default {
return this.destination.simple_destination return this.destination.simple_destination
? this.destination.simple_destination ? this.destination.simple_destination
: this.isVoiceMail() : this.isVoiceMail()
? `${this.$t('pages.newCallForward.voiceMailLabel')}` ? `${this.$t('Voicemail')}`
: '' : ''
}, },
movePopoverToTop () { movePopoverToTop () {

@ -4,13 +4,13 @@
class="csc-cf-dest-type" class="csc-cf-dest-type"
@click="setSelectedDestinationType('destination')" @click="setSelectedDestinationType('destination')"
> >
{{ $t('pages.newCallForward.numberLabel') }} {{ $t('Number') }}
</div> </div>
<div <div
class="csc-cf-dest-type" class="csc-cf-dest-type"
@click="setSelectedDestinationType('voicemail')" @click="setSelectedDestinationType('voicemail')"
> >
{{ $t('pages.newCallForward.voiceMailLabel') }} {{ $t('Voicemail') }}
</div> </div>
</div> </div>
</template> </template>

@ -4,19 +4,19 @@
class="csc-cf-dest-type" class="csc-cf-dest-type"
@click="addDestinationsetUnconditional()" @click="addDestinationsetUnconditional()"
> >
{{ $t('pages.newCallForward.unconditionalLabel') }} {{ $t('If available') }}
</div> </div>
<div <div
class="csc-cf-dest-type" class="csc-cf-dest-type"
@click="addDestinationsetOffline()" @click="addDestinationsetOffline()"
> >
{{ $t('pages.newCallForward.offlineLabel') }} {{ $t('If not available') }}
</div> </div>
<div <div
class="csc-cf-dest-type" class="csc-cf-dest-type"
@click="addDestinationsetBusy()" @click="addDestinationsetBusy()"
> >
{{ $t('pages.newCallForward.busyLabel') }} {{ $t('If busy') }}
</div> </div>
</div> </div>
</template> </template>

@ -14,8 +14,8 @@
<csc-confirm-dialog <csc-confirm-dialog
ref="confirmDialog" ref="confirmDialog"
title-icon="delete" title-icon="delete"
:title="$t('pages.newCallForward.cancelSourcesetDialogTitle', {name: sourceSetName})" :title="$t('Delete {name} sourceset', {name: sourceSetName})"
:message="$t('pages.newCallForward.cancelSourcesetText', {name: sourceSetName})" :message="$t('You are about to delete {name} sourceset', {name: sourceSetName})"
@confirm="confirmDeleteSourceset" @confirm="confirmDeleteSourceset"
@closed="restorePopver" @closed="restorePopver"
/> />
@ -42,7 +42,7 @@
<csc-input <csc-input
ref="sourceInputField" ref="sourceInputField"
v-model="number" v-model="number"
:label="$t('callBlocking.number')" :label="$t('Number')"
@submit="save()" @submit="save()"
@error="errorNumber" @error="errorNumber"
/> />
@ -66,7 +66,7 @@
icon="clear" icon="clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.close') }} {{ $t('Close') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -74,7 +74,7 @@
icon="delete" icon="delete"
@mousedown.native="showRemoveDialog()" @mousedown.native="showRemoveDialog()"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</q-btn> </q-btn>
<div <div
v-if="loading" v-if="loading"
@ -169,7 +169,7 @@ export default {
methods: { methods: {
async save () { async save () {
if (this.numberError || this.saveDisabled) { if (this.numberError || this.saveDisabled) {
showGlobalError(this.$t('validationErrors.generic')) showGlobalError(this.$t('You have invalid form input. Please check and try again.'))
} }
try { try {
this.$store.dispatch('newCallForward/addGroupLoader', this.groupId) this.$store.dispatch('newCallForward/addGroupLoader', this.groupId)

@ -46,12 +46,12 @@ export default {
computed: { computed: {
selectedKeyLabel () { selectedKeyLabel () {
const selectedValue = this.$attrs.value || { type: null } const selectedValue = this.$attrs.value || { type: null }
let label = this.$t('pbxConfig.keyBothLabel') let label = this.$t('Group/Seat/Pilot')
if (selectedValue.type !== null) { if (selectedValue.type !== null) {
label = ({ label = ({
pilot: this.$t('pbxConfig.keyPilotLabel'), pilot: this.$t('Pilot'),
seat: this.$t('pbxConfig.keySeatLabel'), seat: this.$t('Seat'),
group: this.$t('pbxConfig.keyGroupLabel') group: this.$t('Group')
})[selectedValue.type] })[selectedValue.type]
} }
return label return label

@ -19,14 +19,14 @@
<csc-list-item-subtitle <csc-list-item-subtitle
v-if="!expanded" v-if="!expanded"
> >
{{ $t('pbxConfig.callQueueMaxLength') }}: {{ getDefaultData().max_queue_length }} {{ $t('Maximum calls in queue') }}: {{ getDefaultData().max_queue_length }}
</csc-list-item-subtitle> </csc-list-item-subtitle>
</q-slide-transition> </q-slide-transition>
<q-slide-transition> <q-slide-transition>
<csc-list-item-subtitle <csc-list-item-subtitle
v-if="!expanded" v-if="!expanded"
> >
{{ $t('pbxConfig.callQueueWrapUpTime') }}: {{ getDefaultData().queue_wrap_up_time }} {{ $t('Wrap up time') }}: {{ getDefaultData().queue_wrap_up_time }}
</csc-list-item-subtitle> </csc-list-item-subtitle>
</q-slide-transition> </q-slide-transition>
</template> </template>
@ -36,7 +36,7 @@
icon-color="negative" icon-color="negative"
@click="remove" @click="remove"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</csc-list-menu-item> </csc-list-menu-item>
</template> </template>
<template <template
@ -44,7 +44,7 @@
> >
<q-input <q-input
v-model="changes.max_queue_length" v-model="changes.max_queue_length"
:label="$t('pbxConfig.callQueueMaxLength')" :label="$t('Maximum calls in queue')"
:error="$v.changes.max_queue_length.$error" :error="$v.changes.max_queue_length.$error"
:error-message="queueMaxLengthErrorMessage" :error-message="queueMaxLengthErrorMessage"
@input="$v.changes.max_queue_length.$touch" @input="$v.changes.max_queue_length.$touch"
@ -65,8 +65,8 @@
</q-input> </q-input>
<q-input <q-input
v-model="changes.queue_wrap_up_time" v-model="changes.queue_wrap_up_time"
:suffix="$t('pbxConfig.seconds')" :suffix="$t('seconds')"
:label="$t('pbxConfig.callQueueWrapUpTime')" :label="$t('Wrap up time')"
:error="$v.changes.queue_wrap_up_time.$error" :error="$v.changes.queue_wrap_up_time.$error"
:error-message="queueWrapUpTimeErrorMessage" :error-message="queueWrapUpTimeErrorMessage"
@input="$v.changes.queue_wrap_up_time.$touch" @input="$v.changes.queue_wrap_up_time.$touch"
@ -178,17 +178,17 @@ export default {
}, },
queueMaxLengthErrorMessage () { queueMaxLengthErrorMessage () {
if (!this.$v.changes.max_queue_length.numeric) { if (!this.$v.changes.max_queue_length.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pbxConfig.queueLength') field: this.$t('Queue Length')
}) })
} else if (!this.$v.changes.max_queue_length.minValue) { } else if (!this.$v.changes.max_queue_length.minValue) {
return this.$t('validationErrors.minValueSecond', { return this.$t('{field} must be at least {minValue} second', {
field: this.$t('pbxConfig.queueLength'), field: this.$t('Queue Length'),
minValue: this.$v.changes.max_queue_length.$params.minValue.min minValue: this.$v.changes.max_queue_length.$params.minValue.min
}) })
} else if (!this.$v.changes.max_queue_length.maxValue) { } else if (!this.$v.changes.max_queue_length.maxValue) {
return this.$t('validationErrors.maxValueSecond', { return this.$t('{field} must be maximum of {maxValue} seconds', {
field: this.$t('pbxConfig.queueLength'), field: this.$t('Queue Length'),
maxValue: this.$v.changes.max_queue_length.$params.maxValue.max maxValue: this.$v.changes.max_queue_length.$params.maxValue.max
}) })
} else { } else {
@ -197,17 +197,17 @@ export default {
}, },
queueWrapUpTimeErrorMessage () { queueWrapUpTimeErrorMessage () {
if (!this.$v.changes.queue_wrap_up_time.numeric) { if (!this.$v.changes.queue_wrap_up_time.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pbxConfig.wrapUpTime') field: this.$t('Wrap Up Time')
}) })
} else if (!this.$v.changes.queue_wrap_up_time.minValue) { } else if (!this.$v.changes.queue_wrap_up_time.minValue) {
return this.$t('validationErrors.minValueSecond', { return this.$t('{field} must be at least {minValue} second', {
field: this.$t('pbxConfig.wrapUpTime'), field: this.$t('Wrap Up Time'),
minValue: this.$v.changes.queue_wrap_up_time.$params.minValue.min minValue: this.$v.changes.queue_wrap_up_time.$params.minValue.min
}) })
} else if (!this.$v.changes.queue_wrap_up_time.maxValue) { } else if (!this.$v.changes.queue_wrap_up_time.maxValue) {
return this.$t('validationErrors.maxValueSecond', { return this.$t('{field} must be maximum of {maxValue} seconds', {
field: this.$t('pbxConfig.wrapUpTime'), field: this.$t('Wrap Up Time'),
maxValue: this.$v.changes.queue_wrap_up_time.$params.maxValue.max maxValue: this.$v.changes.queue_wrap_up_time.$params.maxValue.max
}) })
} else { } else {

@ -6,7 +6,7 @@
map-options map-options
:disable="loading || subscriberOptionsLoading" :disable="loading || subscriberOptionsLoading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.queueExtensionName')" :label="$t('Group/Seat/Pilot')"
:options="options" :options="options"
/> />
<q-input <q-input
@ -15,7 +15,7 @@
:error-message="maxQueueLengthErrorMessage" :error-message="maxQueueLengthErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.queueLength')" :label="$t('Queue Length')"
default="3" default="3"
@input="$v.data.max_queue_length.$touch" @input="$v.data.max_queue_length.$touch"
/> />
@ -25,8 +25,8 @@
:error-message="wrapUpTimeErrorMessage" :error-message="wrapUpTimeErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.wrapUpTime')" :label="$t('Wrap Up Time')"
:suffix="$t('pbxConfig.seconds')" :suffix="$t('seconds')"
@input="$v.data.queue_wrap_up_time.$touch" @input="$v.data.queue_wrap_up_time.$touch"
/> />
<div <div
@ -39,7 +39,7 @@
icon="clear" icon="clear"
@click="cancel()" @click="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -49,7 +49,7 @@
icon="filter_none" icon="filter_none"
@click="save()" @click="save()"
> >
{{ $t('pbxConfig.createConfig') }} {{ $t('Create Call Queue') }}
</q-btn> </q-btn>
</div> </div>
<csc-object-spinner <csc-object-spinner
@ -122,17 +122,17 @@ export default {
computed: { computed: {
maxQueueLengthErrorMessage () { maxQueueLengthErrorMessage () {
if (!this.$v.data.max_queue_length.numeric) { if (!this.$v.data.max_queue_length.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pbxConfig.queueLength') field: this.$t('Queue Length')
}) })
} else if (!this.$v.data.max_queue_length.minValue) { } else if (!this.$v.data.max_queue_length.minValue) {
return this.$t('validationErrors.minValueSecond', { return this.$t('{field} must be at least {minValue} second', {
field: this.$t('pbxConfig.queueLength'), field: this.$t('Queue Length'),
minValue: this.$v.data.max_queue_length.$params.minValue.min minValue: this.$v.data.max_queue_length.$params.minValue.min
}) })
} else if (!this.$v.data.max_queue_length.maxValue) { } else if (!this.$v.data.max_queue_length.maxValue) {
return this.$t('validationErrors.maxValueSecond', { return this.$t('{field} must be maximum of {maxValue} seconds', {
field: this.$t('pbxConfig.queueLength'), field: this.$t('Queue Length'),
maxValue: this.$v.data.max_queue_length.$params.maxValue.max maxValue: this.$v.data.max_queue_length.$params.maxValue.max
}) })
} else { } else {
@ -141,17 +141,17 @@ export default {
}, },
wrapUpTimeErrorMessage () { wrapUpTimeErrorMessage () {
if (!this.$v.data.queue_wrap_up_time.numeric) { if (!this.$v.data.queue_wrap_up_time.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pbxConfig.wrapUpTime') field: this.$t('Wrap Up Time')
}) })
} else if (!this.$v.data.queue_wrap_up_time.minValue) { } else if (!this.$v.data.queue_wrap_up_time.minValue) {
return this.$t('validationErrors.minValueSecond', { return this.$t('{field} must be at least {minValue} second', {
field: this.$t('pbxConfig.wrapUpTime'), field: this.$t('Wrap Up Time'),
minValue: this.$v.data.queue_wrap_up_time.$params.minValue.min minValue: this.$v.data.queue_wrap_up_time.$params.minValue.min
}) })
} else if (!this.$v.data.queue_wrap_up_time.maxValue) { } else if (!this.$v.data.queue_wrap_up_time.maxValue) {
return this.$t('validationErrors.maxValueSecond', { return this.$t('{field} must be maximum of {maxValue} seconds', {
field: this.$t('pbxConfig.wrapUpTime'), field: this.$t('Wrap Up Time'),
maxValue: this.$v.data.queue_wrap_up_time.$params.maxValue.max maxValue: this.$v.data.queue_wrap_up_time.$params.maxValue.max
}) })
} else { } else {

@ -17,14 +17,14 @@
<csc-list-item-subtitle <csc-list-item-subtitle
v-if="!expanded" v-if="!expanded"
> >
{{ $t('pbxConfig.deviceIdentifier') }}: {{ device.identifier }} {{ $t('MAC address') }}: {{ device.identifier }}
</csc-list-item-subtitle> </csc-list-item-subtitle>
</q-slide-transition> </q-slide-transition>
<q-slide-transition> <q-slide-transition>
<csc-list-item-subtitle <csc-list-item-subtitle
v-if="!expanded" v-if="!expanded"
> >
{{ $t('pbxConfig.deviceModel') }}: {{ profile.name }} {{ $t('Phone model') }}: {{ profile.name }}
</csc-list-item-subtitle> </csc-list-item-subtitle>
</q-slide-transition> </q-slide-transition>
</template> </template>
@ -36,7 +36,7 @@
icon-color="negative" icon-color="negative"
@click="deleteDevice" @click="deleteDevice"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</csc-list-menu-item> </csc-list-menu-item>
</template> </template>
<template <template
@ -44,7 +44,7 @@
> >
<q-input <q-input
v-model="changes.stationName" v-model="changes.stationName"
:label="$t('pbxConfig.deviceStationName')" :label="$t('Station name')"
@keyup.enter="save" @keyup.enter="save"
> >
<template <template
@ -60,7 +60,7 @@
</template> </template>
</q-input> </q-input>
<q-field <q-field
:label="$t('pbxConfig.deviceIdentifier')" :label="$t('MAC address')"
> >
<q-input <q-input
v-model="changes.identifier" v-model="changes.identifier"

@ -6,7 +6,7 @@
hide-bottom-space hide-bottom-space
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.deviceStationName')" :label="$t('Station name')"
:error="$v.formData.stationName.$error" :error="$v.formData.stationName.$error"
:error-message="stationNameErrorMessage" :error-message="stationNameErrorMessage"
@input="$v.formData.stationName.$touch" @input="$v.formData.stationName.$touch"
@ -16,7 +16,7 @@
hide-bottom-space hide-bottom-space
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.deviceIdentifier')" :label="$t('MAC address')"
:error="$v.formData.identifier.$error" :error="$v.formData.identifier.$error"
:error-message="identifierErrorMessage" :error-message="identifierErrorMessage"
@input="$v.formData.identifier.$touch" @input="$v.formData.identifier.$touch"
@ -40,7 +40,7 @@
:disable="loading" :disable="loading"
@click="cancel" @click="cancel"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -49,7 +49,7 @@
:disable="$v.formData.$invalid || formData.profile === null || loading" :disable="$v.formData.$invalid || formData.profile === null || loading"
@click="submit" @click="submit"
> >
{{ $t('pbxConfig.createDevice') }} {{ $t('Create device') }}
</q-btn> </q-btn>
</div> </div>
<csc-object-spinner <csc-object-spinner
@ -113,12 +113,12 @@ export default {
computed: { computed: {
stationNameErrorMessage () { stationNameErrorMessage () {
if (!this.$v.formData.stationName.required) { if (!this.$v.formData.stationName.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.deviceStationName') field: this.$t('Station name')
}) })
} else if (!this.$v.formData.stationName.maxLength) { } else if (!this.$v.formData.stationName.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.deviceStationName'), field: this.$t('Station name'),
maxLength: this.$v.formData.stationName.$params.maxLength.max maxLength: this.$v.formData.stationName.$params.maxLength.max
}) })
} else { } else {
@ -127,11 +127,11 @@ export default {
}, },
identifierErrorMessage () { identifierErrorMessage () {
if (!this.$v.formData.identifier.required) { if (!this.$v.formData.identifier.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.deviceIdentifier') field: this.$t('MAC address')
}) })
} else if (!this.$v.formData.identifier.customMacAddress) { } else if (!this.$v.formData.identifier.customMacAddress) {
return this.$t('validationErrors.macAddress') return this.$t('Input a valid mac address')
} else { } else {
return '' return ''
} }

@ -47,7 +47,7 @@
<div <div
class="csc-device-key-title-main" class="csc-device-key-title-main"
> >
{{ selectedKeySetName }}: {{ $t('pbxConfig.deviceKeyType') }} {{ selectedKeyNumber }} {{ selectedKeySetName }}: {{ $t('Lamp/Key') }} {{ selectedKeyNumber }}
</div> </div>
</div> </div>
</div> </div>
@ -62,7 +62,7 @@
v-model="selectedKeyType" v-model="selectedKeyType"
emit-value emit-value
map-options map-options
:label="$t('pbxConfig.deviceKeyType')" :label="$t('Lamp/Key')"
:options="typeOptions" :options="typeOptions"
@input="keyTypeChanged" @input="keyTypeChanged"
> >
@ -87,7 +87,7 @@
:big="isMobile" :big="isMobile"
@click="closeKeyOverlay()" @click="closeKeyOverlay()"
> >
{{ $t('buttons.close') }} {{ $t('Close') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -207,19 +207,19 @@ export default {
const options = [] const options = []
if (this.selectedKey !== null && this.selectedKey.keySet.can_blf) { if (this.selectedKey !== null && this.selectedKey.keySet.can_blf) {
options.push({ options.push({
label: this.$t('pbxConfig.keyTypeBLF'), label: this.$t('Busy Lamp Field'),
value: 'blf' value: 'blf'
}) })
} }
if (this.selectedKey !== null && this.selectedKey.keySet.can_private) { if (this.selectedKey !== null && this.selectedKey.keySet.can_private) {
options.push({ options.push({
label: this.$t('pbxConfig.keyTypePrivate'), label: this.$t('Private'),
value: 'private' value: 'private'
}) })
} }
if (this.selectedKey !== null && this.selectedKey.keySet.can_shared) { if (this.selectedKey !== null && this.selectedKey.keySet.can_shared) {
options.push({ options.push({
label: this.$t('pbxConfig.keyTypeShared'), label: this.$t('Shared'),
value: 'shared' value: 'shared'
}) })
} }

@ -10,7 +10,7 @@
v-model="filterTypeModel" v-model="filterTypeModel"
dense dense
:options="filterTypeOptions" :options="filterTypeOptions"
:label="$t('pbxConfig.seatsFiltersFilterByLabel')" :label="$t('Filter by')"
:disable="loading" :disable="loading"
/> />
</div> </div>
@ -23,7 +23,7 @@
type="text" type="text"
dense dense
:disable="loading || filterType === null" :disable="loading || filterType === null"
:label="(filterType === null) ? $t('pbxConfig.seatsFilterInputLabel') : filterTypeModel.label" :label="(filterType === null) ? $t('Type something') : filterTypeModel.label"
@keypress.enter="triggerFilter" @keypress.enter="triggerFilter"
> >
<template <template
@ -121,13 +121,13 @@ export default {
const options = [] const options = []
this.subscriberList.forEach((subscriber) => { this.subscriberList.forEach((subscriber) => {
let icon = 'person' let icon = 'person'
let subscriberTypeTitle = this.$t('pbxConfig.keySeatLabel') let subscriberTypeTitle = this.$t('Seat')
if (subscriber.is_pbx_group) { if (subscriber.is_pbx_group) {
icon = 'group' icon = 'group'
subscriberTypeTitle = this.$t('pbxConfig.keyGroupLabel') subscriberTypeTitle = this.$t('Group')
} else if (subscriber.is_pbx_pilot) { } else if (subscriber.is_pbx_pilot) {
icon = 'person_outline' icon = 'person_outline'
subscriberTypeTitle = this.$t('pbxConfig.keyPilotLabel') subscriberTypeTitle = this.$t('Pilot')
} }
options.push({ options.push({
label: subscriber.display_name || subscriber.webusername, label: subscriber.display_name || subscriber.webusername,
@ -148,27 +148,27 @@ export default {
filterTypeOptions () { filterTypeOptions () {
return [ return [
{ {
label: this.$t('pbxConfig.deviceStationName'), label: this.$t('Station name'),
value: 'station_name', value: 'station_name',
control: 'input' control: 'input'
}, },
{ {
label: this.$t('pbxConfig.deviceIdentifier'), label: this.$t('MAC address'),
value: 'identifier', value: 'identifier',
control: 'input' control: 'input'
}, },
{ {
label: this.$t('pbxConfig.deviceModel'), label: this.$t('Phone model'),
value: 'profile_id', value: 'profile_id',
control: 'select' control: 'select'
}, },
{ {
label: this.$t('pbxConfig.extension'), label: this.$t('Extension'),
value: 'pbx_extension', value: 'pbx_extension',
control: 'input' control: 'input'
}, },
{ {
label: this.$t('pbxConfig.queueExtensionName'), label: this.$t('Group/Seat/Pilot'),
value: 'display_name', value: 'display_name',
control: 'select' control: 'select'
} }

@ -17,7 +17,7 @@
<csc-list-item-subtitle <csc-list-item-subtitle
v-if="!expanded" v-if="!expanded"
> >
{{ $t('pbxConfig.extension') }}: {{ group.pbx_extension }} {{ $t('Extension') }}: {{ group.pbx_extension }}
</csc-list-item-subtitle> </csc-list-item-subtitle>
</q-slide-transition> </q-slide-transition>
<q-slide-transition> <q-slide-transition>
@ -27,7 +27,7 @@
<span <span
v-if="group.pbx_groupmember_ids.length > 0" v-if="group.pbx_groupmember_ids.length > 0"
> >
{{ $t('pbxConfig.seats') }}: {{ $t('Seats') }}:
<span <span
v-for="seatId in group.pbx_groupmember_ids" v-for="seatId in group.pbx_groupmember_ids"
:key="seatId" :key="seatId"
@ -48,7 +48,7 @@
color="info" color="info"
size="24px" size="24px"
/> />
{{ $t('pbxConfig.noSeatAssigned') }} {{ $t('No seats') }}
</span> </span>
</csc-list-item-subtitle> </csc-list-item-subtitle>
</q-slide-transition> </q-slide-transition>
@ -61,13 +61,13 @@
icon-color="negative" icon-color="negative"
@click="deleteSeat" @click="deleteSeat"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</csc-list-menu-item> </csc-list-menu-item>
</template> </template>
<template slot="body"> <template slot="body">
<q-input <q-input
v-model="changes.name" v-model="changes.name"
:label="$t('pbxConfig.name')" :label="$t('Name')"
@keyup.enter="save" @keyup.enter="save"
> >
<template <template
@ -87,7 +87,7 @@
hide-hint hide-hint
:error="$v.changes.extension.$error" :error="$v.changes.extension.$error"
:error-message="extensionErrorMessage" :error-message="extensionErrorMessage"
:label="$t('pbxConfig.extension')" :label="$t('Extension')"
:hint="getExtensionHint" :hint="getExtensionHint"
@keyup.enter="save" @keyup.enter="save"
@input="$v.changes.extension.$touch" @input="$v.changes.extension.$touch"
@ -108,14 +108,14 @@
readonly readonly
disable disable
:value="getPrimaryNumber" :value="getPrimaryNumber"
:label="$t('pbxConfig.primaryNumber')" :label="$t('Primary Number')"
/> />
<q-select <q-select
v-model="changes.huntPolicy" v-model="changes.huntPolicy"
emit-value emit-value
map-options map-options
radio radio
:label="$t('pbxConfig.huntPolicy')" :label="$t('Hunt Policy')"
:options="huntPolicyOptions" :options="huntPolicyOptions"
> >
<template <template
@ -132,7 +132,7 @@
</q-select> </q-select>
<q-input <q-input
v-model="changes.huntTimeout" v-model="changes.huntTimeout"
:label="$t('pbxConfig.huntTimeout')" :label="$t('Hunt Timeout')"
@keyup.enter="save" @keyup.enter="save"
> >
<template <template
@ -153,7 +153,7 @@
map-options map-options
use-chips use-chips
multiple multiple
:label="$t('pbxConfig.aliasNumbers')" :label="$t('Alias Numbers')"
:options="aliasNumberOptions" :options="aliasNumberOptions"
> >
<template <template
@ -174,7 +174,7 @@
map-options map-options
use-chips use-chips
multiple multiple
:label="$t('pbxConfig.seats')" :label="$t('Seats')"
:options="seatOptions" :options="seatOptions"
> >
<template <template
@ -194,7 +194,7 @@
emit-value emit-value
map-options map-options
radio radio
:label="$t('pbxConfig.soundSet')" :label="$t('Sound Set')"
:options="soundSetOptions" :options="soundSetOptions"
> >
<template <template
@ -214,7 +214,7 @@
icon="filter_none" icon="filter_none"
flat flat
color="primary" color="primary"
:label="$t('pbxConfig.callQueue')" :label="$t('Call Queue')"
@click="jumpToCallQueue" @click="jumpToCallQueue"
/> />
</template> </template>

@ -15,7 +15,7 @@
:error-message="groupNameErrorMessage" :error-message="groupNameErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.groupName')" :label="$t('Group Name')"
data-cy="group-name" data-cy="group-name"
@input="$v.data.name.$touch" @input="$v.data.name.$touch"
/> />
@ -27,7 +27,7 @@
:error-message="extensionErrorMessage" :error-message="extensionErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.extension')" :label="$t('Extension')"
:hint="getExtensionHint" :hint="getExtensionHint"
data-cy="group-extension" data-cy="group-extension"
@input="$v.data.extension.$touch" @input="$v.data.extension.$touch"
@ -40,7 +40,7 @@
hide-bottom-space hide-bottom-space
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.huntPolicy')" :label="$t('Hunt Policy')"
:options="huntPolicyOptions" :options="huntPolicyOptions"
data-cy="group-hunt-policy" data-cy="group-hunt-policy"
/> />
@ -52,8 +52,8 @@
:error-message="huntTimeoutErrorMessage" :error-message="huntTimeoutErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.huntTimeout')" :label="$t('Hunt Timeout')"
:suffix="$t('pbxConfig.seconds')" :suffix="$t('seconds')"
:min="1" :min="1"
:max="3600" :max="3600"
data-cy="group-hunt-timeout" data-cy="group-hunt-timeout"
@ -73,7 +73,7 @@
hide-bottom-space hide-bottom-space
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.aliasNumbers')" :label="$t('Alias Numbers')"
:options="aliasNumberOptions" :options="aliasNumberOptions"
data-cy="group-alias-numbers" data-cy="group-alias-numbers"
/> />
@ -87,7 +87,7 @@
hide-bottom-space hide-bottom-space
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.seats')" :label="$t('Seats')"
:options="seatOptions" :options="seatOptions"
data-cy="group-seats" data-cy="group-seats"
/> />
@ -99,7 +99,7 @@
hide-bottom-space hide-bottom-space
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.soundSet')" :label="$t('Sound Set')"
:options="soundSetOptions" :options="soundSetOptions"
data-cy="group-sound-set" data-cy="group-sound-set"
/> />
@ -114,7 +114,7 @@
data-cy="group-btn-clear" data-cy="group-btn-clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -125,7 +125,7 @@
data-cy="group-btn-save" data-cy="group-btn-save"
@click="save()" @click="save()"
> >
{{ $t('pbxConfig.createGroup') }} {{ $t('Create group') }}
</q-btn> </q-btn>
</div> </div>
<csc-object-spinner <csc-object-spinner
@ -209,12 +209,12 @@ export default {
]), ]),
groupNameErrorMessage () { groupNameErrorMessage () {
if (!this.$v.data.name.required) { if (!this.$v.data.name.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.groupName') field: this.$t('Group Name')
}) })
} else if (!this.$v.data.name.maxLength) { } else if (!this.$v.data.name.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.groupName'), field: this.$t('Group Name'),
maxLength: this.$v.data.name.$params.maxLength.max maxLength: this.$v.data.name.$params.maxLength.max
}) })
} else { } else {
@ -223,17 +223,17 @@ export default {
}, },
extensionErrorMessage () { extensionErrorMessage () {
if (!this.$v.data.extension.required) { if (!this.$v.data.extension.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.extension') field: this.$t('Extension')
}) })
} else if (!this.$v.data.extension.maxLength) { } else if (!this.$v.data.extension.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.extension'), field: this.$t('Extension'),
maxLength: this.$v.data.extension.$params.maxLength.max maxLength: this.$v.data.extension.$params.maxLength.max
}) })
} else if (!this.$v.data.extension.numeric) { } else if (!this.$v.data.extension.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pbxConfig.extension') field: this.$t('Extension')
}) })
} else if (!this.$v.data.extension.isInRange) { } else if (!this.$v.data.extension.isInRange) {
return this.getExtensionHint return this.getExtensionHint
@ -243,21 +243,21 @@ export default {
}, },
huntTimeoutErrorMessage () { huntTimeoutErrorMessage () {
if (!this.$v.data.huntTimeout.required) { if (!this.$v.data.huntTimeout.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.huntTimeoutSentence') field: this.$t('Hunt timeout')
}) })
} else if (!this.$v.data.huntTimeout.numeric) { } else if (!this.$v.data.huntTimeout.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pbxConfig.huntTimeoutSentence') field: this.$t('Hunt timeout')
}) })
} else if (!this.$v.data.huntTimeout.minValue) { } else if (!this.$v.data.huntTimeout.minValue) {
return this.$t('validationErrors.minValueSecond', { return this.$t('{field} must be at least {minValue} second', {
field: this.$t('pbxConfig.huntTimeoutSentence'), field: this.$t('Hunt timeout'),
minValue: this.$v.data.huntTimeout.$params.minValue.min minValue: this.$v.data.huntTimeout.$params.minValue.min
}) })
} else if (!this.$v.data.huntTimeout.maxValue) { } else if (!this.$v.data.huntTimeout.maxValue) {
return this.$t('validationErrors.maxValueSecond', { return this.$t('{field} must be maximum of {maxValue} seconds', {
field: this.$t('pbxConfig.huntTimeoutSentence'), field: this.$t('Hunt timeout'),
maxValue: this.$v.data.huntTimeout.$params.maxValue.max maxValue: this.$v.data.huntTimeout.$params.maxValue.max
}) })
} else { } else {

@ -10,7 +10,7 @@
v-model="filterTypeModel" v-model="filterTypeModel"
dense dense
:options="filterTypeOptions" :options="filterTypeOptions"
:label="$t('pbxConfig.seatsFiltersFilterByLabel')" :label="$t('Filter by')"
:disable="loading" :disable="loading"
data-cy="filter-type" data-cy="filter-type"
/> />
@ -23,7 +23,7 @@
type="text" type="text"
dense dense
:disable="loading || filterType === null" :disable="loading || filterType === null"
:label="(filterType === null) ? $t('pbxConfig.seatsFilterInputLabel') : filterTypeModel.label" :label="(filterType === null) ? $t('Type something') : filterTypeModel.label"
data-cy="filter-value" data-cy="filter-value"
@keypress.enter="triggerFilter" @keypress.enter="triggerFilter"
> >
@ -91,19 +91,19 @@ export default {
filterTypeOptions () { filterTypeOptions () {
return [ return [
{ {
label: this.$t('pbxConfig.groupName'), label: this.$t('Group Name'),
value: 'display_name' value: 'display_name'
}, },
{ {
label: this.$t('pbxConfig.extension'), label: this.$t('Extension'),
value: 'pbx_extension' value: 'pbx_extension'
}, },
{ {
label: this.$t('pbxConfig.primaryNumber'), label: this.$t('Primary Number'),
value: 'primary_number' value: 'primary_number'
}, },
{ {
label: this.$t('pbxConfig.aliasNumbers'), label: this.$t('Alias Numbers'),
value: 'alias' value: 'alias'
} }
] ]

@ -2,7 +2,7 @@
<q-select <q-select
:value="value" :value="value"
:options="options" :options="options"
:label="$t('pbxConfig.deviceModel')" :label="$t('Phone model')"
emit-value emit-value
map-options map-options
v-bind="$attrs" v-bind="$attrs"

@ -22,7 +22,7 @@
<template <template
v-if="currentSecretaryNumbers.length > 0" v-if="currentSecretaryNumbers.length > 0"
> >
{{ $t('pbxConfig.msConfigNumbersLabel') }}: {{ $t('Secretary numbers') }}:
<span <span
v-for="number in currentSecretaryNumbers" v-for="number in currentSecretaryNumbers"
:key="number" :key="number"
@ -44,7 +44,7 @@
color="info" color="info"
size="24px" size="24px"
/> />
{{ $t('pbxConfig.msConfigNoSecretaryNumbers') }} {{ $t('No numbers assigned') }}
</span> </span>
</template> </template>
</csc-list-item-subtitle> </csc-list-item-subtitle>
@ -56,7 +56,7 @@
icon-color="negative" icon-color="negative"
@click="remove" @click="remove"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</csc-list-menu-item> </csc-list-menu-item>
</template> </template>
<template <template
@ -70,7 +70,7 @@
chips chips
:disable="loading || numberOptionsLoading" :disable="loading || numberOptionsLoading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.msConfigNumberSelectionLabel')" :label="$t('Select secretary numbers')"
:options="numberOptions" :options="numberOptions"
> >
<template <template

@ -6,7 +6,7 @@
map-options map-options
:disable="loading || subscriberOptionsLoading" :disable="loading || subscriberOptionsLoading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.msConfigSubscriberSelectionLabel')" :label="$t('Select a manager')"
:options="subscriberOptions" :options="subscriberOptions"
/> />
<q-select <q-select
@ -18,7 +18,7 @@
map-options map-options
:disable="loading || numberOptionsLoading" :disable="loading || numberOptionsLoading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.msConfigNumberSelectionLabel')" :label="$t('Select secretary numbers')"
:options="numberOptions" :options="numberOptions"
/> />
<div <div
@ -31,7 +31,7 @@
icon="clear" icon="clear"
@click="cancel()" @click="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -41,7 +41,7 @@
icon="arrow_forward" icon="arrow_forward"
@click="save()" @click="save()"
> >
{{ $t('pbxConfig.msConfigCreationLabel') }} {{ $t('Create Config') }}
</q-btn> </q-btn>
</div> </div>
<csc-object-spinner <csc-object-spinner

@ -27,12 +27,12 @@
<q-item-label <q-item-label
caption caption
> >
{{ $t('pbxConfig.webusername') }}: <strong>{{ seat.webusername }}</strong> {{ $t('Login') }}: <strong>{{ seat.webusername }}</strong>
</q-item-label> </q-item-label>
<q-item-label <q-item-label
caption caption
> >
{{ $t('pbxConfig.extension') }}: <strong>{{ seat.pbx_extension }}</strong> {{ $t('Extension') }}: <strong>{{ seat.pbx_extension }}</strong>
</q-item-label> </q-item-label>
<q-item-label <q-item-label
caption caption
@ -40,7 +40,7 @@
<span <span
v-if="seat.pbx_group_ids.length > 0" v-if="seat.pbx_group_ids.length > 0"
> >
{{ $t('pbxConfig.groups') }}: {{ $t('Groups') }}:
<span <span
v-for="groupId in seat.pbx_group_ids" v-for="groupId in seat.pbx_group_ids"
:key="groupId" :key="groupId"
@ -61,7 +61,7 @@
name="group" name="group"
size="16px" size="16px"
/> />
{{ $t('pbxConfig.noGroupAssigned') }} {{ $t('No groups') }}
</span> </span>
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
@ -73,7 +73,7 @@
<csc-popup-menu-item <csc-popup-menu-item
icon="vpn_key" icon="vpn_key"
color="primary" color="primary"
:label="$t('pbxConfig.editPassword')" :label="$t('Change Password')"
@click="showPasswordDialog" @click="showPasswordDialog"
/> />
<csc-popup-menu-item-delete <csc-popup-menu-item-delete
@ -87,7 +87,7 @@
<q-toggle <q-toggle
v-model="changes.clirIntrapbx" v-model="changes.clirIntrapbx"
class="q-pa-sm" class="q-pa-sm"
:label="$t('pbxConfig.toggleIntraPbx')" :label="$t('Hide number within own PBX')"
:disable="loading" :disable="loading"
@input="changeIntraPbx" @input="changeIntraPbx"
/> />
@ -106,7 +106,7 @@
/> />
<q-input <q-input
v-model="changes.name" v-model="changes.name"
:label="$t('pbxConfig.name')" :label="$t('Name')"
:disable="loading" :disable="loading"
@keyup.enter="save" @keyup.enter="save"
> >
@ -128,7 +128,7 @@
hide-hint hide-hint
:error="$v.changes.extension.$error" :error="$v.changes.extension.$error"
:error-message="extensionErrorMessage" :error-message="extensionErrorMessage"
:label="$t('pbxConfig.extension')" :label="$t('Extension')"
:disable="loading" :disable="loading"
:hint="getExtensionHint" :hint="getExtensionHint"
@keyup.enter="save" @keyup.enter="save"
@ -150,7 +150,7 @@
<q-input <q-input
readonly readonly
disable disable
:label="$t('pbxConfig.primaryNumber')" :label="$t('Primary Number')"
:value="getPrimaryNumber" :value="getPrimaryNumber"
/> />
<q-select <q-select
@ -160,7 +160,7 @@
emit-value emit-value
map-options map-options
:options="aliasNumberOptions" :options="aliasNumberOptions"
:label="$t('pbxConfig.aliasNumbers')" :label="$t('Alias Numbers')"
:disable="loading" :disable="loading"
> >
<template <template
@ -183,7 +183,7 @@
emit-value emit-value
map-options map-options
:options="groupOptions" :options="groupOptions"
:label="$t('pbxConfig.groups')" :label="$t('Groups')"
:disable="loading" :disable="loading"
> >
<template <template
@ -205,7 +205,7 @@
emit-value emit-value
map-options map-options
:options="soundSetOptions" :options="soundSetOptions"
:label="$t('pbxConfig.soundSet')" :label="$t('Sound Set')"
:disable="loading" :disable="loading"
> >
<template <template
@ -224,7 +224,7 @@
<q-toggle <q-toggle
v-model="changes.clirIntrapbx" v-model="changes.clirIntrapbx"
class="q-pa-sm" class="q-pa-sm"
:label="$t('pbxConfig.toggleIntraPbx')" :label="$t('Hide number within own PBX')"
:disable="loading" :disable="loading"
@input="changeIntraPbx" @input="changeIntraPbx"
/> />
@ -233,7 +233,7 @@
icon="filter_none" icon="filter_none"
flat flat
color="primary" color="primary"
:label="$t('pbxConfig.callQueue')" :label="$t('Call Queue')"
:disable="loading" :disable="loading"
@click="jumpToCallQueue" @click="jumpToCallQueue"
/> />

@ -16,7 +16,7 @@
:error-message="seatNameErrorMessage" :error-message="seatNameErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.name')" :label="$t('Name')"
@input="$v.data.name.$touch" @input="$v.data.name.$touch"
> >
<template <template
@ -37,7 +37,7 @@
:error-message="extensionErrorMessage" :error-message="extensionErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.extension')" :label="$t('Extension')"
:hint="getExtensionHint" :hint="getExtensionHint"
@input="$v.data.extension.$touch" @input="$v.data.extension.$touch"
> >
@ -68,7 +68,7 @@
map-options map-options
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.aliasNumbers')" :label="$t('Alias Numbers')"
:options="aliasNumberOptions" :options="aliasNumberOptions"
/> />
<q-select <q-select
@ -81,7 +81,7 @@
map-options map-options
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.groups')" :label="$t('Groups')"
:options="groupOptions" :options="groupOptions"
> >
<template <template
@ -100,7 +100,7 @@
map-options map-options
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.soundSet')" :label="$t('Sound Set')"
:options="soundSetOptions" :options="soundSetOptions"
> >
<template <template
@ -113,7 +113,7 @@
</q-select> </q-select>
<q-toggle <q-toggle
v-model="data.clirIntrapbx" v-model="data.clirIntrapbx"
:label="$t('pbxConfig.toggleIntraPbx')" :label="$t('Hide number within own PBX')"
:disable="loading" :disable="loading"
class="q-pa-md" class="q-pa-md"
dense dense
@ -128,7 +128,7 @@
color="default" color="default"
icon="clear" icon="clear"
:disable="loading" :disable="loading"
:label="$t('buttons.cancel')" :label="$t('Cancel')"
@click="cancel()" @click="cancel()"
/> />
<q-btn <q-btn
@ -137,7 +137,7 @@
icon="person" icon="person"
:loading="loading" :loading="loading"
:disable="$v.data.$invalid || loading" :disable="$v.data.$invalid || loading"
:label="$t('pbxConfig.createSeat')" :label="$t('Create seat')"
@click="save()" @click="save()"
/> />
</div> </div>
@ -210,12 +210,12 @@ export default {
]), ]),
seatNameErrorMessage () { seatNameErrorMessage () {
if (!this.$v.data.name.required) { if (!this.$v.data.name.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.seatName') field: this.$t('Seat name')
}) })
} else if (!this.$v.data.name.maxLength) { } else if (!this.$v.data.name.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.seatName'), field: this.$t('Seat name'),
maxLength: this.$v.data.name.$params.maxLength.max maxLength: this.$v.data.name.$params.maxLength.max
}) })
} else { } else {
@ -224,17 +224,17 @@ export default {
}, },
extensionErrorMessage () { extensionErrorMessage () {
if (!this.$v.data.extension.required) { if (!this.$v.data.extension.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.extension') field: this.$t('Extension')
}) })
} else if (!this.$v.data.extension.maxLength) { } else if (!this.$v.data.extension.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.extension'), field: this.$t('Extension'),
maxLength: this.$v.data.extension.$params.maxLength.max maxLength: this.$v.data.extension.$params.maxLength.max
}) })
} else if (!this.$v.data.extension.numeric) { } else if (!this.$v.data.extension.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('pbxConfig.extension') field: this.$t('Extension')
}) })
} else if (!this.$v.data.extension.isInRange) { } else if (!this.$v.data.extension.isInRange) {
return this.getExtensionHint return this.getExtensionHint
@ -244,12 +244,12 @@ export default {
}, },
webPasswordErrorMessage () { webPasswordErrorMessage () {
if (!this.$v.data.webPassword.required) { if (!this.$v.data.webPassword.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.webPassword') field: this.$t('Password')
}) })
} else if (!this.$v.data.webPassword.maxLength) { } else if (!this.$v.data.webPassword.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.webPassword'), field: this.$t('Password'),
maxLength: this.$v.data.webPassword.$params.maxLength.max maxLength: this.$v.data.webPassword.$params.maxLength.max
}) })
} else { } else {

@ -12,7 +12,7 @@
map-options map-options
dense dense
:options="filterTypeOptions" :options="filterTypeOptions"
:label="$t('pbxConfig.seatsFiltersFilterByLabel')" :label="$t('Filter by')"
/> />
</div> </div>
<div <div
@ -23,7 +23,7 @@
type="text" type="text"
dense dense
:disable="filterType === null" :disable="filterType === null"
:label="$t('pbxConfig.seatsFilterInputLabel')" :label="$t('Type something')"
@keypress.enter="triggerFilter" @keypress.enter="triggerFilter"
> >
<template <template
@ -49,7 +49,7 @@
<q-chip <q-chip
v-for="(filterItem, index) in filters" v-for="(filterItem, index) in filters"
:key="index" :key="index"
:label="$t('pbxConfig.seatsFiltersTypes.' + filterItem.name) + ': ' + filterItem.value" :label="getFilterLabel(filterItem)"
:disable="false" :disable="false"
icon="filter_alt" icon="filter_alt"
removable removable
@ -78,22 +78,32 @@ export default {
filterTypeOptions () { filterTypeOptions () {
return [ return [
{ {
label: this.$t('pbxConfig.seatsFiltersTypes.display_name'), label: this.$t('Name'),
value: 'display_name' value: 'display_name'
}, },
{ {
label: this.$t('pbxConfig.seatsFiltersTypes.pbx_extension'), label: this.$t('Extension'),
value: 'pbx_extension' value: 'pbx_extension'
}, },
{ {
label: this.$t('pbxConfig.seatsFiltersTypes.primary_number'), label: this.$t('Primary Number'),
value: 'primary_number' value: 'primary_number'
}, },
{ {
label: this.$t('pbxConfig.seatsFiltersTypes.alias_number'), label: this.$t('Alias Number'),
value: 'alias_number' value: 'alias_number'
} }
] ]
},
getFilterLabel (filterItem) {
const filterNameTranslation = {
display_name: this.$t('Name'),
pbx_extension: this.$t('Extension'),
primary_number: this.$t('Primary Number'),
alias_number: this.$t('Alias Number')
}
const filterNameTitle = filterNameTranslation[filterItem.name] || this.$t('Unknown name')
return filterNameTitle + ': ' + filterItem.value
} }
}, },
methods: { methods: {

@ -26,7 +26,7 @@
> >
<q-checkbox <q-checkbox
:value="soundSet.contract_default" :value="soundSet.contract_default"
:label="$t('pbxConfig.soundSetContractDefault')" :label="$t('Default')"
:left-label="true" :left-label="true"
@input="saveAsDefault" @input="saveAsDefault"
/> />
@ -39,7 +39,7 @@
<q-input <q-input
v-model="changes.name" v-model="changes.name"
:error="$v.changes.name.$error" :error="$v.changes.name.$error"
:label="$t('pbxConfig.soundSetName')" :label="$t('Name')"
@input="$v.changes.name.$touch" @input="$v.changes.name.$touch"
@keyup.enter="save" @keyup.enter="save"
> >
@ -59,7 +59,7 @@
<q-input <q-input
v-model="changes.description" v-model="changes.description"
:error="$v.changes.description.$error" :error="$v.changes.description.$error"
:label="$t('pbxConfig.soundSetDescription')" :label="$t('Description')"
@input="$v.changes.description.$touch" @input="$v.changes.description.$touch"
@keyup.enter="save" @keyup.enter="save"
> >
@ -77,7 +77,7 @@
</template> </template>
</q-input> </q-input>
<q-checkbox <q-checkbox
:label="$t('pbxConfig.soundSetDefault')" :label="$t('Default sound set for all seats and groups')"
:value="soundSet.contract_default" :value="soundSet.contract_default"
@input="saveAsDefault" @input="saveAsDefault"
/> />
@ -110,7 +110,7 @@
icon-color="negative" icon-color="negative"
@click="remove" @click="remove"
> >
{{ $t('buttons.remove') }} {{ $t('Remove') }}
</csc-list-menu-item> </csc-list-menu-item>
</template> </template>
</csc-list-item> </csc-list-item>

@ -6,7 +6,7 @@
:error-message="nameErrorMessage" :error-message="nameErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.name')" :label="$t('Name')"
hide-bottom-space hide-bottom-space
@input="$v.data.name.$touch" @input="$v.data.name.$touch"
/> />
@ -16,7 +16,7 @@
:error-message="descriptionErrorMessage" :error-message="descriptionErrorMessage"
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.description')" :label="$t('Description')"
hide-bottom-space hide-bottom-space
@input="$v.data.description.$touch" @input="$v.data.description.$touch"
/> />
@ -26,14 +26,14 @@
<q-checkbox <q-checkbox
v-model="data.contract_default" v-model="data.contract_default"
:disable="loading" :disable="loading"
:label="$t('pbxConfig.soundSetUseAsDefault')" :label="$t('Use as default for all seats and groups')"
/> />
</div> </div>
<div> <div>
<q-checkbox <q-checkbox
v-model="data.copy_from_default" v-model="data.copy_from_default"
:disable="loading" :disable="loading"
:label="$t('pbxConfig.soundSetUseLanguagePreset')" :label="$t('Use language specific preset')"
@input="toggleLoadFiles" @input="toggleLoadFiles"
/> />
</div> </div>
@ -45,7 +45,7 @@
radio radio
:disable="loading || !data.copy_from_default" :disable="loading || !data.copy_from_default"
:readonly="loading" :readonly="loading"
:label="$t('pbxConfig.language')" :label="$t('Language')"
:options="languageOptions" :options="languageOptions"
/> />
<div <div
@ -56,7 +56,7 @@
v-model="data.loopplay" v-model="data.loopplay"
class="col-auto" class="col-auto"
:disable="loading || !data.copy_from_default" :disable="loading || !data.copy_from_default"
:label="$t('pbxConfig.soundSetPlayAllLoop')" :label="$t('Play all files in loop')"
/> />
</div> </div>
<div <div
@ -69,7 +69,7 @@
icon="clear" icon="clear"
@click="cancel()" @click="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -79,7 +79,7 @@
:disable="$v.data.$invalid || !data.language" :disable="$v.data.$invalid || !data.language"
@click="save()" @click="save()"
> >
{{ $t('pbxConfig.createSoundSet') }} {{ $t('Create sound set') }}
</q-btn> </q-btn>
</div> </div>
<csc-object-spinner <csc-object-spinner
@ -153,12 +153,12 @@ export default {
computed: { computed: {
nameErrorMessage () { nameErrorMessage () {
if (!this.$v.data.name.required) { if (!this.$v.data.name.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.name') field: this.$t('Name')
}) })
} else if (!this.$v.data.name.maxLength) { } else if (!this.$v.data.name.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.name'), field: this.$t('Name'),
maxLength: this.$v.data.name.$params.maxLength.max maxLength: this.$v.data.name.$params.maxLength.max
}) })
} else { } else {
@ -167,12 +167,12 @@ export default {
}, },
descriptionErrorMessage () { descriptionErrorMessage () {
if (!this.$v.data.description.required) { if (!this.$v.data.description.required) {
return this.$t('validationErrors.fieldRequired', { return this.$t('{field} is required', {
field: this.$t('pbxConfig.description') field: this.$t('Description')
}) })
} else if (!this.$v.data.description.maxLength) { } else if (!this.$v.data.description.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('pbxConfig.description'), field: this.$t('Description'),
maxLength: this.$v.data.description.$params.maxLength.max maxLength: this.$v.data.description.$params.maxLength.max
}) })
} else { } else {

@ -9,12 +9,12 @@
map-options map-options
:disable="loading" :disable="loading"
:readonly="loading" :readonly="loading"
:label="$t('speedDial.slot')" :label="$t('Slot')"
:options="slotOptions" :options="slotOptions"
/> />
<csc-call-input <csc-call-input
v-model="destination" v-model="destination"
:label="$t('speedDial.destination')" :label="$t('Destination')"
@submit="save" @submit="save"
@error="error" @error="error"
/> />
@ -28,7 +28,7 @@
icon="clear" icon="clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading" v-if="!loading"
@ -38,7 +38,7 @@
:disable="destinationError" :disable="destinationError"
@click="save()" @click="save()"
> >
{{ $t('buttons.save') }} {{ $t('Save') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -52,7 +52,7 @@
flat flat
@click="enableForm()" @click="enableForm()"
> >
{{ $t('speedDial.addSpeedDial') }} {{ $t('Add Speed Dial') }}
</q-btn> </q-btn>
</div> </div>
<q-inner-loading <q-inner-loading
@ -109,7 +109,7 @@ export default {
enter: 'bounceInRight', enter: 'bounceInRight',
leave: 'bounceOutRight', leave: 'bounceOutRight',
position: 'top-center', position: 'top-center',
html: this.$t('speedDial.addNoSlotsDialogText'), html: this.$t('All available speed dial slots have already been assigned. Please delete one first.'),
icon: 'warning', icon: 'warning',
dismissible: true dismissible: true
}) })
@ -120,7 +120,7 @@ export default {
}, },
save () { save () {
if (this.destinationError) { if (this.destinationError) {
showGlobalError(this.$t('validationErrors.generic')) showGlobalError(this.$t('You have invalid form input. Please check and try again.'))
} else { } else {
this.$emit('save', { this.$emit('save', {
destination: this.destination, destination: this.destination,

@ -8,7 +8,7 @@
icon="lock" icon="lock"
flat flat
color="primary" color="primary"
:label="$t('userSettings.changePassword')" :label="$t('Change password')"
@click="enableInput" @click="enableInput"
/> />
</div> </div>
@ -24,7 +24,7 @@
v-model.trim="newPassword" v-model.trim="newPassword"
type="password" type="password"
clearable clearable
:label="$t('userSettings.newPasswordLabel')" :label="$t('New password')"
> >
<template <template
v-slot:prepend v-slot:prepend
@ -38,7 +38,7 @@
v-model.trim="newPasswordRetyped" v-model.trim="newPasswordRetyped"
type="password" type="password"
clearable clearable
:label="$t('userSettings.newPasswordRetypedLabel')" :label="$t('New password retyped')"
> >
<template <template
v-slot:prepend v-slot:prepend
@ -58,7 +58,7 @@
icon="clear" icon="clear"
@click="cancel" @click="cancel"
> >
{{ $t('buttons.cancel') }} {{ $t('Cancel') }}
</q-btn> </q-btn>
<q-btn <q-btn
flat flat
@ -67,7 +67,7 @@
:disable="!isValid" :disable="!isValid"
@click="openConfirmDialog" @click="openConfirmDialog"
> >
{{ $t('userSettings.saveNewPassword') }} {{ $t('Save new password') }}
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -131,8 +131,8 @@ export default {
}, },
openConfirmDialog () { openConfirmDialog () {
this.$q.dialog({ this.$q.dialog({
title: this.$t('userSettings.changePasswordDialogTitle'), title: this.$t('Change login password'),
message: this.$t('userSettings.changePasswordDialogText'), message: this.$t('You are about to change your login password. After the password was changed successfully, you get automatically logged out to authenticate with the new password. '),
color: 'primary', color: 'primary',
cancel: true, cancel: true,
persistent: true persistent: true

@ -7,7 +7,7 @@
v-model="changes.pin" v-model="changes.pin"
:loading="pinRequesting" :loading="pinRequesting"
:disable="pinRequesting" :disable="pinRequesting"
:label="$t('voicebox.label.changePin')" :label="$t('Change PIN')"
:error="$v.changes.pin.$error" :error="$v.changes.pin.$error"
:error-message="pinErrorMessage" :error-message="pinErrorMessage"
@keyup.enter="updatePin" @keyup.enter="updatePin"
@ -44,7 +44,7 @@
v-model="changes.email" v-model="changes.email"
:loading="emailRequesting" :loading="emailRequesting"
:disable="emailRequesting" :disable="emailRequesting"
:label="$t('voicebox.label.changeEmail')" :label="$t('Change Email')"
:error="$v.changes.email.$error" :error="$v.changes.email.$error"
:error-message="emailErrorMessage" :error-message="emailErrorMessage"
@keyup.enter="updateEmail" @keyup.enter="updateEmail"
@ -179,20 +179,20 @@ export default {
computed: { computed: {
pinErrorMessage () { pinErrorMessage () {
if (!this.$v.changes.pin.maxLength) { if (!this.$v.changes.pin.maxLength) {
return this.$t('validationErrors.maxLength', { return this.$t('{field} must have at most {maxLength} letters', {
field: this.$t('voicebox.pin'), field: this.$t('PIN'),
maxLength: this.$v.changes.pin.$params.maxLength.max maxLength: this.$v.changes.pin.$params.maxLength.max
}) })
} else if (!this.$v.changes.pin.numeric) { } else if (!this.$v.changes.pin.numeric) {
return this.$t('validationErrors.numeric', { return this.$t('{field} must consist of numeric characters only', {
field: this.$t('voicebox.pin') field: this.$t('PIN')
}) })
} else { } else {
return '' return ''
} }
}, },
emailErrorMessage () { emailErrorMessage () {
return this.$t('validationErrors.email') return this.$t('Input a valid email address')
}, },
canToggleDelete () { canToggleDelete () {
return this.attach return this.attach
@ -324,14 +324,14 @@ export default {
if (this.pinHasChanged && !this.$v.changes.pin.$error) { if (this.pinHasChanged && !this.$v.changes.pin.$error) {
this.$store.dispatch('voicebox/updatePin', this.changes.pin) this.$store.dispatch('voicebox/updatePin', this.changes.pin)
} else { } else {
showGlobalError(this.$t('validationErrors.pin')) showGlobalError(this.$t('Input a valid PIN'))
} }
}, },
updateEmail () { updateEmail () {
if (this.emailHasChanged && !this.$v.changes.email.$error) { if (this.emailHasChanged && !this.$v.changes.email.$error) {
this.$store.dispatch('voicebox/updateEmail', this.changes.email) this.$store.dispatch('voicebox/updateEmail', this.changes.email)
} else { } else {
showGlobalError(this.$t('validationErrors.email')) showGlobalError(this.$t('Input a valid email address'))
} }
} }
} }

@ -21,27 +21,27 @@ export function smartTime ($date) {
const diffMinutes = Math.floor(diffSeconds / 60) const diffMinutes = Math.floor(diffSeconds / 60)
const momentDate = moment(date) const momentDate = moment(date)
let seconds = i18n.t('filters.second') let seconds = i18n.t('second')
if (diffSeconds > 1) { if (diffSeconds > 1) {
seconds = i18n.t('filters.seconds') seconds = i18n.t('seconds')
} }
let minutes = 'minute' let minutes = 'minute'
if (diffSeconds > 120) { if (diffSeconds > 120) {
minutes = i18n.t('filters.minutes') minutes = i18n.t('minutes')
} }
if (diffSeconds < 60) { if (diffSeconds < 60) {
const descriptor = i18n.t('filters.ago') const descriptor = i18n.t('ago')
return `${diffSeconds} ${seconds} ${descriptor}` return `${diffSeconds} ${seconds} ${descriptor}`
} else if (diffSeconds < 3600) { } else if (diffSeconds < 3600) {
const descriptor = i18n.t('filters.ago') const descriptor = i18n.t('ago')
return `${diffMinutes} ${minutes} ${descriptor}` return `${diffMinutes} ${minutes} ${descriptor}`
} else if (isToday(date)) { } else if (isToday(date)) {
const descriptor = i18n.t('filters.today') const descriptor = i18n.t('Today')
return `${descriptor}, ${momentDate.format('HH:mm')}` return `${descriptor}, ${momentDate.format('HH:mm')}`
} else if (isYesterday(date)) { } else if (isYesterday(date)) {
const descriptor = i18n.t('filters.yesterday') const descriptor = i18n.t('Yesterday')
return `${descriptor}, ${momentDate.format('HH:mm')}` return `${descriptor}, ${momentDate.format('HH:mm')}`
} else if (isWithinLastWeek(date)) { } else if (isWithinLastWeek(date)) {
return momentDate.format('dddd, HH:mm') return momentDate.format('dddd, HH:mm')
@ -60,11 +60,21 @@ export const WeekdayMap = {
saturday: 7 saturday: 7
} }
export const WeekdayTranslationMap = {
sunday: i18n.t('Sunday'),
monday: i18n.t('Monday'),
tuesday: i18n.t('Tuesday'),
wednesday: i18n.t('Wednesday'),
thursday: i18n.t('Thursday'),
friday: i18n.t('Friday'),
saturday: i18n.t('Saturday')
}
export function weekday (weekdayNumber) { export function weekday (weekdayNumber) {
let weekdayString = '' let weekdayString = ''
Object.keys(WeekdayMap).forEach((weekday) => { Object.keys(WeekdayMap).forEach((weekday) => {
if (WeekdayMap[weekday] === weekdayNumber) { if (WeekdayMap[weekday] === weekdayNumber) {
weekdayString = i18n.t('pages.callForward.times.' + weekday) weekdayString = WeekdayTranslationMap[weekday]
} }
}) })
return weekdayString return weekdayString

@ -63,14 +63,14 @@ export function askForNotificationPermission () {
if (_.isObject(Notification)) { if (_.isObject(Notification)) {
Notification.requestPermission().then((perms) => { Notification.requestPermission().then((perms) => {
if (perms === 'denied' || perms === 'default') { if (perms === 'denied' || perms === 'default') {
showPermanentGlobalWarning(i18n.t('call.notificationBlocked')) showPermanentGlobalWarning(i18n.t('You have blocked incoming call notifications.'))
} }
resolve() resolve()
}).catch((err) => { }).catch((err) => {
reject(err) reject(err)
}) })
} else { } else {
showPermanentGlobalWarning(i18n.t('call.notificationNotSupported')) showPermanentGlobalWarning(i18n.t('Incoming call notifications are not supported.'))
resolve() resolve()
} }
}) })
@ -83,7 +83,7 @@ export function enableIncomingCallNotifications () {
if (navigator.serviceWorker) { if (navigator.serviceWorker) {
return navigator.serviceWorker.register(serviceWorkerPath) return navigator.serviceWorker.register(serviceWorkerPath)
} else { } else {
showPermanentGlobalWarning(i18n.t('call.notificationNotSupported')) showPermanentGlobalWarning(i18n.t('Incoming call notifications are not supported.'))
resolve() resolve()
} }
}).then(() => { }).then(() => {
@ -92,7 +92,7 @@ export function enableIncomingCallNotifications () {
resolve() resolve()
}).catch((err) => { }).catch((err) => {
console.debug(err) console.debug(err)
showPermanentGlobalWarning(i18n.t('call.notificationFailed')) showPermanentGlobalWarning(i18n.t('Could not enable incoming call notifications.'))
}) })
}) })
} }
@ -101,7 +101,7 @@ export function showCallNotification (number) {
if (navigator.serviceWorker) { if (navigator.serviceWorker) {
navigator.serviceWorker.getRegistration(serviceWorkerPath).then((registration) => { navigator.serviceWorker.getRegistration(serviceWorkerPath).then((registration) => {
if (registration && registration.showNotification) { if (registration && registration.showNotification) {
registration.showNotification(i18n.t('call.notificationTitle', { registration.showNotification(i18n.t('Incoming call from {number}', {
number: number number: number
}), { }), {
requireInteraction: true, requireInteraction: true,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save