Skip to content

Commit

Permalink
Merge pull request #51 from webitel/fix/communication-popup-locale
Browse files Browse the repository at this point in the history
Fix/communication popup locale [WTEL-3883]
  • Loading branch information
dlohvinov authored Mar 1, 2024
2 parents d395734 + 453647d commit 4409de3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
6 changes: 4 additions & 2 deletions src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ export default {
destination: 'Destination',
setAsPrimary: 'Set as primary',
emails: {
title: 'The email',
addTitle: 'Add the email',
editTitle: 'Edit the email',
dummy: 'There are no email addresses yet',
},
phones: {
title: 'The phone number',
addTitle: 'Add the phone number',
editTitle: 'Edit the phone number',
dummy: 'There are no phone numbers yet',
},
},
Expand Down
6 changes: 4 additions & 2 deletions src/app/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ export default {
destination: 'Назначение',
setAsPrimary: 'Установить как основной',
emails: {
title: 'Электронный адрес',
addTitle: 'Добавить електронный адрес',
editTitle: 'Редактировать електронный адрес',
dummy: 'Электронные адреса еще не добавлены',
},
phones: {
title: 'Номер телефона',
addTitle: 'Добавить номер телефона',
editTitle: 'Редактировать номер телефона',
dummy: 'Телефонные номера еще не добавлены',
},
},
Expand Down
6 changes: 4 additions & 2 deletions src/app/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ export default {
destination: 'Призначення',
setAsPrimary: 'Встановити як основний',
emails: {
title: 'Електронна адреса',
addTitle: 'Додати електронну адресу',
editTitle: 'Редагувати електронну адресу',
dummy: 'Електронні адреси ще не додано',
},
phones: {
title: 'Номер телефону',
addTitle: 'Додати номер телефону',
editTitle: 'Редагувати номер телефону',
dummy: 'Телефонні номери ще не додано',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
@close="close"
>
<template #header>
{{ item ? t('reusable.edit') : t('reusable.add') }}
{{ currentCommunication.locale.toLowerCase() ||
t('contacts.communications.communications', 1).toLowerCase()
}}
{{ item ? currentCommunication.updateText : currentCommunication.addText }}
</template>
<template #main>
<form
Expand Down Expand Up @@ -88,21 +85,23 @@ const TypeSelect = ref(null);
const communicationOptions = [
{
value: 'email', // should be same as backend field for destination
locale: t('contacts.communications.emails.title'),
addText: t('contacts.communications.emails.addTitle'),
updateText: t('contacts.communications.emails.editTitle'),
filterField: EngineCommunicationChannels.Email,
addNamespace: `${props.namespace}/ADD_EMAIL`,
updateNamespace: `${props.namespace}/UPDATE_EMAIL`,
},
{
value: 'number',
locale: t('contacts.communications.phones.title'),
addText: t('contacts.communications.phones.addTitle'),
updateText: t('contacts.communications.phones.editTitle'),
filterField: EngineCommunicationChannels.Phone,
addNamespace: `${props.namespace}/ADD_PHONE`,
updateNamespace: `${props.namespace}/UPDATE_PHONE`,
},
// {
// value: 'messaging',
// locale: ,
// text: ,
// filterField: EngineCommunicationChannels.Messaging,
// namespace: ,
// },
Expand Down

0 comments on commit 4409de3

Please sign in to comment.