diff --git a/src/components/instance/message/HasWhatsapp.vue b/src/components/instance/message/HasWhatsapp.vue
index 8b9d3e1..294fc88 100644
--- a/src/components/instance/message/HasWhatsapp.vue
+++ b/src/components/instance/message/HasWhatsapp.vue
@@ -7,7 +7,7 @@
v-ripple
>
mdi-account-question
- Tem Whatsapp?
+ {{ $t("phoneHasWhatsApp.title") }}
{{
- response.exists ? "Whatsapp encontrado" : "Whatsapp não encontrado"
+ response.exists
+ ? $t("phoneHasWhatsApp.exists")
+ : $t("phoneHasWhatsApp.notExists")
}}
@@ -55,7 +57,7 @@
@click="verifyPhone"
variant="tonal"
>
- Consultar
+ {{ $t("phoneHasWhatsApp.verify") }}
@@ -95,7 +97,7 @@ export default {
this.response = false;
const phone = this.formatPhone(this.phone);
- if (phone.length < 10) throw new Error("Número inválido");
+ if (phone.length < 10) throw new Error(this.$t("phoneHasWhatsApp.invalid"));
const response = await instanceController.chat.hasWhatsapp(
this.instance.instance.instanceName,
diff --git a/src/components/instance/message/MyChats.vue b/src/components/instance/message/MyChats.vue
index 3d44044..ba352b2 100644
--- a/src/components/instance/message/MyChats.vue
+++ b/src/components/instance/message/MyChats.vue
@@ -7,7 +7,7 @@
v-ripple
>
mdi-message
- Minhas conversas
+ {{ $t("chats.title") }}
mdi-account-group
- Meus Grupos
+ {{ $t("groups.title") }}
mdi-account
- Nome e Recado
+ {{ $t("profile.title") }}
- Salvar
+ {{ $t("save") }}
diff --git a/src/components/instance/profile/Privacy.vue b/src/components/instance/profile/Privacy.vue
index abc9803..dd5a4c9 100644
--- a/src/components/instance/profile/Privacy.vue
+++ b/src/components/instance/profile/Privacy.vue
@@ -7,7 +7,7 @@
v-ripple
>
mdi-shield-account
- Privacidade
+ {{ $t("privacy.title") }}
@@ -97,7 +109,7 @@
@click="savePrivacy"
variant="tonal"
>
- Salvar
+ {{ $t("save") }}
@@ -125,46 +137,54 @@ export default {
required: true,
},
},
- data: () => ({
- AppStore: useAppStore(),
- expanded: false,
- loading: false,
- error: false,
- valid: false,
- WAPrivacyValue: [
- { value: "all", title: "Todos" },
- { value: "contacts", title: "Contatos" },
- { value: "contact_blacklist", title: "Contatos exeto os da lista negra" },
- { value: "none", title: "Ninguém" },
- ],
- WAPrivacyOnlineValue: [
- { value: "all", title: "Todos" },
- { value: "match_last_seen", title: "Igual ao visto por último" },
- ],
- WAReadReceiptsValue: [
- { value: "all", title: "Todos" },
- { value: "none", title: "Ninguém" },
- ],
+ data() {
+ return {
+ AppStore: useAppStore(),
+ expanded: false,
+ loading: false,
+ error: false,
+ valid: false,
+ WAPrivacyValue: [
+ { value: "all", title: this.$t("privacy.options.all") },
+ { value: "contacts", title: this.$t("privacy.options.contacts") },
+ {
+ value: "contact_blacklist",
+ title: this.$t("privacy.options.contactBlacklist"),
+ },
+ { value: "none", title: this.$t("privacy.options.none") },
+ ],
+ WAPrivacyOnlineValue: [
+ { value: "all", title: this.$t("privacy.options.all") },
+ {
+ value: "match_last_seen",
+ title: this.$t("privacy.options.matchLastSeen"),
+ },
+ ],
+ WAReadReceiptsValue: [
+ { value: "all", title: this.$t("privacy.options.all") },
+ { value: "none", title: this.$t("privacy.options.none") },
+ ],
- privacyData: {
- readreceipts: "all",
- profile: "all",
- status: "all",
- online: "all",
- last: "all",
- groupadd: "all",
- calladd: "all",
- },
- defaultChatwootData: {
- readreceipts: "all",
- profile: "all",
- status: "all",
- online: "all",
- last: "all",
- groupadd: "all",
- calladd: "all",
- },
- }),
+ privacyData: {
+ readreceipts: "all",
+ profile: "all",
+ status: "all",
+ online: "all",
+ last: "all",
+ groupadd: "all",
+ calladd: "all",
+ },
+ defaultChatwootData: {
+ readreceipts: "all",
+ profile: "all",
+ status: "all",
+ online: "all",
+ last: "all",
+ groupadd: "all",
+ calladd: "all",
+ },
+ };
+ },
methods: {
toggleExpanded() {
if (this.loading) return;
@@ -190,7 +210,7 @@ export default {
},
async loadPrivacy() {
try {
- if(!this.isOpen) return;
+ if (!this.isOpen) return;
this.loading = true;
this.error = false;
const privacyData = await instanceController.profile.getPrivacy(
diff --git a/src/components/instance/profile/ProfilePhoto.vue b/src/components/instance/profile/ProfilePhoto.vue
index 2e1edd3..39edbc5 100644
--- a/src/components/instance/profile/ProfilePhoto.vue
+++ b/src/components/instance/profile/ProfilePhoto.vue
@@ -7,7 +7,7 @@
v-ripple
>
mdi-account-box
- Foto de Perfil
+ {{ $t("profilePicture.title") }}
mdi-account-question
- Sem foto de perfil
+ {{ $t("profilePicture.noPhoto") }}
@@ -51,7 +51,7 @@
size="50"
/>
mdi-upload
- Selecionar foto
+ {{ $t("profilePicture.upload") }}
mdi-delete
- Remover foto
+ {{ $t("profilePicture.remove") }}
- Mandar mensagem
+ {{ $t("sendMessage.title") }}
-
+
@@ -65,7 +68,7 @@
@@ -119,7 +128,9 @@
- Fechar
+ {{
+ $t("close")
+ }}
- Enviar
+ {{ $t("sendMessage.send") }}
@@ -196,9 +207,7 @@ export default {
this.success = {
messageId: messagesId.join(", "),
- message: `Mensage${
- this.numbers.length != 1 ? "ns" : "m"
- } enviada com sucesso`,
+ message: this.$t("sendMessage.success", this.numbers.length),
};
this.message = defaultMessage();
this.numbers = [];
diff --git a/src/i18n/en.js b/src/i18n/en.js
index d47268d..367764b 100644
--- a/src/i18n/en.js
+++ b/src/i18n/en.js
@@ -19,10 +19,12 @@ export default {
noInstances: "No instances found",
unknown: "Unknown",
required: "{field} is required",
+ maxLength: "{field} must have a maximum of {length} characters",
https: "{field} must start with https://",
httpHttps: "{field} must start with http:// or https://",
enabled: "Enabled",
events: "Events",
+ name: "Name",
version: {
availableFrom: "Available from version {version}",
},
@@ -124,4 +126,61 @@ export default {
closed: "Closed",
}
},
+ sendMessage: {
+ title: "Send message",
+ to: "To",
+ noContacts: "No contacts",
+ message: "Message",
+ presence: "Presence",
+ delay: "Delay",
+ delayHelp: "Delay in milliseconds",
+ send: "Send",
+ success: "Message sent successfully | Messages sent successfully",
+ },
+ phoneHasWhatsApp: {
+ title: "Has WhatsApp?",
+ phone: "WhatsApp number",
+ verify: "Verify",
+ exists: "WhatsApp found",
+ notExists: "WhatsApp not found",
+ invalid: "Invalid number",
+ },
+ contacts: {
+ title: "My contacts",
+ },
+ groups: {
+ title: "My groups",
+ headers: { creation: "Created at", }
+ },
+ chats: {
+ title: "My chats",
+ headers: { lastMsgTimestamp: "Last message", }
+ },
+ profile: {
+ title: "Name and Status",
+ name: "Name",
+ status: "Status"
+ },
+ profilePicture: {
+ title: "Profile Picture",
+ noPhoto: "No profile photo",
+ upload: "Select Photo",
+ remove: "Remove Photo",
+ },
+ privacy: {
+ title: "Privacy",
+ lastSeen: "Last Seen",
+ online: "Online",
+ profilePhoto: "Profile Photo",
+ status: "Status",
+ readreceipts: "Read Receipts",
+ groupadd: "Be Added to Groups",
+ options: {
+ all: "Everyone",
+ contacts: "My Contacts",
+ contactBlacklist: "My Contacts, Except Blacklisted",
+ matchLastSeen: "Match Last Seen",
+ none: "Nobody",
+ }
+ }
}
\ No newline at end of file
diff --git a/src/i18n/pt.js b/src/i18n/pt.js
index 82f9c56..123c479 100644
--- a/src/i18n/pt.js
+++ b/src/i18n/pt.js
@@ -19,10 +19,12 @@ export default {
noInstances: "Nenhuma instância encontrada",
unknown: "Desconhecido",
required: "{field} é obrigatório",
+ maxLength: "{field} deve ter no máximo {length} caracteres",
https: "{field} deve começar com https://",
httpHttps: "{field} deve começar com http:// ou https://",
enabled: "Habilitado",
events: "Eventos",
+ name: "Nome",
version: {
availableFrom: "Disponível a partir da versão {version}",
},
@@ -123,5 +125,62 @@ export default {
paused: "Pausado",
closed: "Fechado",
}
+ },
+ sendMessage: {
+ title: "Enviar mensagem",
+ to: "Para",
+ noContacts: "Sem contatos",
+ message: "Mensagem",
+ presence: "Presença",
+ delay: "Atraso",
+ delayHelp: "Atraso em milisegundos",
+ send: "Enviar",
+ success: "Mensagem enviada com sucesso | Mensagens enviadas com sucesso",
+ },
+ phoneHasWhatsApp: {
+ title: "Tem WhatsApp?",
+ phone: "Número do WhatsApp",
+ verify: "Consultar",
+ exists: "WhatsApp encontrado",
+ notExists: "WhatsApp não encontrado",
+ invalid: "Número inválido",
+ },
+ contacts: {
+ title: "Meus contatos",
+ },
+ groups: {
+ title: "Meus grupos",
+ headers: { creation: "Criado em", }
+ },
+ chats: {
+ title: "Minhas conversas",
+ headers: { lastMsgTimestamp: "Última mensagem", }
+ },
+ profile: {
+ title: "Nome e Recado",
+ name: "Name",
+ status: "Recado (status)"
+ },
+ profilePicture: {
+ title: "Foto de perfil",
+ noPhoto: "Sem foto de perfil",
+ upload: "Selecionar Foto",
+ remove: "Remover Foto",
+ },
+ privacy: {
+ title: "Privacidade",
+ lastSeen: "Visto por último",
+ online: "Online",
+ profilePhoto: "Foto de perfil",
+ status: "Recado (status)",
+ readreceipts: "Confirmação de leitura",
+ groupadd: "Ser adicionado a grupos",
+ options: {
+ all: "Todos",
+ contacts: "Meus contatos",
+ contactBlacklist: "Meus contatos, exceto os da lista negra",
+ matchLastSeen: "Igual ao visto por último",
+ none: "Ninguém",
+ }
}
}
\ No newline at end of file
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 394d295..d104c9b 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -37,7 +37,7 @@