Skip to content

Commit

Permalink
Merge pull request #674 from webitel/fix/locales-in-popups
Browse files Browse the repository at this point in the history
fix: locales in popups[WTEL-4500]
  • Loading branch information
Lera24 authored May 27, 2024
2 parents bc50224 + bda7fc9 commit 5bf6a99
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 8 deletions.
16 changes: 16 additions & 0 deletions src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,14 @@ export default {
addFlowSchema: 'Add flow schema',
editFlowSchema: 'Edit flow schema',
},
supervisors: {
addSupervisor: 'Add supervisor',
editSupervisor: 'Edit supervisor',
},
agents: {
addAgent: 'Add agent',
editAgent: 'Edit agent',
},
},

members: {
Expand Down Expand Up @@ -910,6 +918,14 @@ export default {
active: 'Active',
},
},
skills: {
editSkill: 'Edit skill',
addSkill: 'Add skill',
},
buckets: {
addBucket: 'Add bucket',
editBucket: 'Edit bucket',
},
},

res: {
Expand Down
16 changes: 16 additions & 0 deletions src/app/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,14 @@ export default {
addFlowSchema: 'Добавить схему',
editFlowSchema: 'Редактировать схему',
},
supervisors: {
addSupervisor: 'Добавить супервизора',
editSupervisor: 'Редактировать супервизора',
},
agents: {
addAgent: 'Добавить оператора',
editAgent: 'Редактировать оператора',
},
},

members: {
Expand Down Expand Up @@ -909,6 +917,14 @@ export default {
active: 'Активное действие',
},
},
skills: {
editSkill: 'Редактировать навык',
addSkill: 'Добавить навык',
},
buckets: {
addBucket: 'Добавить корзину',
editBucket: 'Редактировать корзину',
},
},

res: {
Expand Down
16 changes: 16 additions & 0 deletions src/app/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,14 @@ export default {
addFlowSchema: 'Додати схему',
editFlowSchema: 'Редагувати схему',
},
supervisors: {
addSupervisor: 'Додати супервізора',
editSupervisor: 'Редагувати супервізора',
},
agents: {
addAgent: 'Додати оператора',
editAgent: 'Редагувати оператора',
},
},

members: {
Expand Down Expand Up @@ -910,6 +918,14 @@ export default {
active: 'Активна дія',
},
},
skills: {
editSkill: 'Редагувати навичку',
addSkill: 'Додати навичку',
},
buckets: {
addBucket: 'Додати кошик',
editBucket: 'Редагувати кошик',
},
},

res: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $tc('objects.lookups.buckets.buckets', 1) }}
{{ popupTitle }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -72,6 +72,13 @@ export default {
},
},
},
computed: {
popupTitle() {
return this.id
? this.$t('objects.ccenter.queues.buckets.editBucket')
: this.$t('objects.ccenter.queues.buckets.addBucket');
}
},
methods: {
loadBucketsOptions(params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $tc('objects.ccenter.queues.hooks.hooks', 1) }}
{{ popupTitle }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -90,6 +90,10 @@ export default {
this.setItemProp({ prop: 'event', value: value.value });
},
},
popupTitle() {
const action = this.id ? this.$t('reusable.edit') : this.$t('reusable.add');
return action + ' ' + this.$tc('objects.ccenter.queues.hooks.hooks', 1).toLowerCase();
},
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $tc('objects.lookups.skills.skills', 1) }}
{{ popupTitle }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -129,6 +129,11 @@ export default {
},
];
},
popupTitle() {
return this.id
? this.$t('objects.ccenter.queues.skills.editSkill')
: this.$t('objects.ccenter.queues.skills.addSkill');
}
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $tc('objects.ccenter.res.res', 1) }}
{{ popupTitle }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -72,6 +72,12 @@ export default {
resource: { required },
},
},
computed: {
popupTitle() {
const action = this.id ? this.$t('reusable.edit') : this.$t('reusable.add');
return action + ' ' + this.$tc('objects.ccenter.res.res', 1).toLowerCase();
}
},
methods: {
loadDropdownOptionsList(params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $tc('objects.ccenter.res.numbers', 1) }}
{{ popupTitle }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -55,6 +55,12 @@ export default {
display: { required },
},
},
computed: {
popupTitle() {
const action = this.id ? this.$t('reusable.edit') : this.$t('reusable.add');
return action + ' ' + this.$tc('objects.ccenter.res.numbers', 1).toLowerCase();
}
}
};
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $tc('objects.ccenter.agents.agents', 1) }}
{{ popupTitle }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -59,6 +59,13 @@ export default {
agent: { required },
},
},
computed: {
popupTitle() {
return this.id
? this.$t('objects.ccenter.teams.agents.editAgent')
: this.$t('objects.ccenter.teams.agents.addAgent');
},
},
methods: {
loadAgentsOptions(params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $tc('objects.ccenter.agents.supervisors', 1) }}
{{ popupTitle }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -69,6 +69,11 @@ export default {
return getNamespacedState(state, this.namespace).parentId;
},
}),
popupTitle() {
return this.id
? this.$t('objects.ccenter.teams.supervisors.editSupervisor')
: this.$t('objects.ccenter.teams.supervisors.addSupervisor');
},
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ $t('objects.lookups.blacklist.newNumber') }}
{{ popupTitle }}
</template>
<template #main>
<form class="opened-blacklist-number-popup__wrapper">
Expand Down Expand Up @@ -72,6 +72,12 @@ export default {
number: { required },
},
},
computed: {
popupTitle() {
const action = this.id ? this.$t('reusable.edit') : this.$t('reusable.add');
return action + ' ' + this.$tc('objects.ccenter.res.numbers', 1).toLowerCase();
},
},
watch: {
showExpireDate() {
if (this.itemInstance.expireAt && this.showExpireDate) return;
Expand Down

0 comments on commit 5bf6a99

Please sign in to comment.