Skip to content

Commit

Permalink
fix: add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
acnormun committed Nov 1, 2024
1 parent 38bb746 commit a038dfd
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 22 deletions.
14 changes: 14 additions & 0 deletions src/assets/svgs/gmail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 1 addition & 19 deletions src/components/config/channels/email/Config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="app-config-email__header__title__icon-container">
<img class="app-config-email__header__title__icon-container__icon" :src="app.icon" />
</div>
<div class="app-config-email__header__title__name">{{ app.name }} - {{ app.code }}</div>
<div class="app-config-email__header__title__name">{{ app.name }}</div>
</div>
</div>

Expand Down Expand Up @@ -123,23 +123,12 @@
/>

<unnnic-button
v-if="selectedType === 'other'"
class="app-config-email__settings__buttons__save"
size="large"
:text="$t('apps.config.validate')"
:disabled="this.app.config.token"
@click="saveConfig"
/>

<GoogleLogin v-else prompt auto-login :callback="googleCallback">
<unnnic-button
class="app-config-email__settings__buttons__save"
size="large"
:text="$t('apps.config.validate')"
:disabled="this.app.config.token"
@click="saveConfig"
/>
</GoogleLogin>
</div>
</div>
</template>
Expand All @@ -149,7 +138,6 @@
import { auth_store } from '@/stores/modules/auth.store';
import { mapActions, mapState } from 'pinia';
import unnnic from '@weni/unnnic-system';
import { GoogleLogin } from 'vue3-google-login';
export default {
name: 'emailConfig',
Expand All @@ -159,9 +147,6 @@
default: () => {},
},
},
components: {
GoogleLogin,
},
data() {
return {
pageName: this.app.config.page_name,
Expand All @@ -174,9 +159,6 @@
username: this.app.config.username || null,
password: this.app.config.password || null,
enableLogin: false,
googleCallback: (response) => {
console.log('Response:', response);
},
};
},
computed: {
Expand Down
42 changes: 39 additions & 3 deletions src/components/config/channels/email/Setup.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
<template>
<unnnic-modal :close-icon="false" @click.stop text="dnmwkedjk">
<template #icon>dsjdqihd</template>
<unnnic-modal :close-icon="false" @click.stop :text="$t(`gmail.setup.title`)">
<template #icon> <img class="logo" src="../../../../assets/svgs/gmail.svg" alt="" /></template>
<template #message>
<div>
<span>diopwjeopdfjerojefj</span>
<span v-html="$t(`gmail.setup.description`)"></span>
</div>
</template>

<template #options>
<div>
<div class="facebook-setup__buttons">
<unnnic-button
class="facebook-setup__buttons__cancel"
type="tertiary"
size="large"
:text="$t('general.Cancel')"
@click="closePopUp"
/>

<GoogleLogin prompt auto-login>
<unnnic-button
class="app-config-email__settings__buttons__save"
size="large"
:text="$t('gmail.setup.buttons.continue')"
/>
</GoogleLogin>
</div>
</div>
</template>
</unnnic-modal>
</template>

<script>
import { GoogleLogin } from 'vue3-google-login';
export default {
name: 'gmailSetup',
components: {
GoogleLogin,
},
data() {
return {
gmailCallback: (response) => console.log(response),
};
},
methods: {
closePopUp() {
this.$emit('closePopUp');
},
},
};
</script>
38 changes: 38 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1642,5 +1642,43 @@
}
}
}
},
"email": {
"config": {
"title": "Email",
"description": "Connect your email and automate customer support more easily.",
"config_solution": "Solution Configuration",
"config_solution_subtitle": "Fill in the fields below to integrate an email",
"select": "Select the email type",
"smpt_server": {
"title": "SMTP Server",
"description": "SMTP server address for sending emails."
},
"smpt_port": {
"title": "SMTP Port",
"description": "SMTP server communication port."
},
"imap_server": {
"title": "IMAP Server",
"description": "IMAP server address for sending emails."
},
"imap_port": {
"title": "IMAP Port",
"description": "IMAP server communication port."
},
"username": "Username",
"username_description": "The email used for authentication.",
"password": "Password"
}
},
"gmail": {
"setup": {
"title": "Connect to Gmail",
"description": "Click Continue to open the Gmail login page. After logging in, your account will be automatically integrated.",
"buttons": {
"cancel": "Cancel",
"continue": "Continue"
}
}
}
}
38 changes: 38 additions & 0 deletions src/locales/es_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,44 @@
}
}
}
},
"email": {
"config": {
"title": "Correo Electrónico",
"description": "Conecte su correo electrónico y automatice el servicio al cliente con mayor facilidad.",
"config_solution": "Configuración de la Solución",
"config_solution_subtitle": "Complete los campos a continuación para integrar un correo electrónico",
"select": "Seleccione el tipo de correo electrónico",
"smpt_server": {
"title": "Servidor SMTP",
"description": "Dirección del servidor SMTP para enviar correos electrónicos."
},
"smpt_port": {
"title": "Puerto SMTP",
"description": "Puerto de comunicación del servidor SMTP."
},
"imap_server": {
"title": "Servidor IMAP",
"description": "Dirección del servidor IMAP para enviar correos electrónicos."
},
"imap_port": {
"title": "Puerto IMAP",
"description": "Puerto de comunicación del servidor IMAP."
},
"username": "Usuario",
"username_description": "El correo electrónico utilizado para autenticarse.",
"password": "Contraseña"
}
},
"gmail": {
"setup": {
"title": "Conectar a Gmail",
"description": "Haga clic en Continuar para abrir la página de inicio de sesión de Gmail. Después de iniciar sesión, su cuenta se integrará automáticamente.",
"buttons": {
"cancel": "Cancelar",
"continue": "Continuar"
}
}
}

}
38 changes: 38 additions & 0 deletions src/locales/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -1644,6 +1644,44 @@
}
}
}
},
"email": {
"config": {
"title": "Email",
"description": "Conecte seu e-mail e automatize o atendimento ao cliente com mais facilidade.",
"config_solution": "Configuração de Solução",
"config_solution_subtitle": "Preencha os campos abaixo para integrar um e-mail",
"select": "Selecione o tipo de email",
"smpt_server": {
"title": "Servidor SMTP",
"description": "Endereço do servidor SMTP para envio de e-mails."
},
"smpt_port": {
"title": "Porta SMTP",
"description": "Porta de comunicação do servidor SMTP."
},
"imap_server": {
"title": "Servidor IMAP",
"description": "Endereço do servidor IMAP para envio de e-mails."
},
"imap_port": {
"title": "Porta IMAP",
"description": "Porta de comunicação do servidor IMAP."
},
"username": "Usuário",
"username_description": "O e-mail utilizado para ser autenticado.",
"password": "Senha"
}
},
"gmail": {
"setup": {
"title": "Conectar ao Gmail",
"description": "Clique em Continuar para abrir a página de login do Gmail. Depois de fazer login, sua conta será integrada automaticamente.",
"buttons": {
"cancel": "Cancelar",
"continue": "Continuar"
}
}
}

}

0 comments on commit a038dfd

Please sign in to comment.