Skip to content

Commit 6a43b65

Browse files
finish translate
1 parent dca4ea2 commit 6a43b65

File tree

12 files changed

+249
-100
lines changed

12 files changed

+249
-100
lines changed

src/components/instance/message/HasWhatsapp.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-ripple
88
>
99
<v-icon start>mdi-account-question</v-icon>
10-
Tem Whatsapp?
10+
{{ $t("phoneHasWhatsApp.title") }}
1111
<v-spacer></v-spacer>
1212
<v-btn
1313
size="small"
@@ -27,18 +27,20 @@
2727

2828
<v-text-field
2929
v-model="phone"
30-
label="Número"
30+
:label="$t('phoneHasWhatsApp.phone')"
3131
outlined
3232
clearable
3333
variant="outlined"
3434
density="compact"
35-
class=" mt-3"
35+
class="mt-3"
3636
hint="DDI + DDD + Número"
3737
/>
3838

3939
<v-alert v-if="response" :type="response.exists ? 'success' : 'error'">
4040
{{
41-
response.exists ? "Whatsapp encontrado" : "Whatsapp não encontrado"
41+
response.exists
42+
? $t("phoneHasWhatsApp.exists")
43+
: $t("phoneHasWhatsApp.notExists")
4244
}}
4345

4446
<v-chip v-if="response.exists" text-color="white" class="ml-2">
@@ -55,7 +57,7 @@
5557
@click="verifyPhone"
5658
variant="tonal"
5759
>
58-
Consultar
60+
{{ $t("phoneHasWhatsApp.verify") }}
5961
</v-btn>
6062
</v-card-actions>
6163
</v-card>
@@ -95,7 +97,7 @@ export default {
9597
this.response = false;
9698
9799
const phone = this.formatPhone(this.phone);
98-
if (phone.length < 10) throw new Error("Número inválido");
100+
if (phone.length < 10) throw new Error(this.$t("phoneHasWhatsApp.invalid"));
99101
100102
const response = await instanceController.chat.hasWhatsapp(
101103
this.instance.instance.instanceName,

src/components/instance/message/MyChats.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-ripple
88
>
99
<v-icon start>mdi-message</v-icon>
10-
Minhas conversas
10+
{{ $t("chats.title") }}
1111
<v-spacer></v-spacer>
1212
<v-btn
1313
size="small"
@@ -27,7 +27,7 @@
2727

2828
<v-text-field
2929
v-model="search"
30-
label="Pesquisar"
30+
:label="$t('search')"
3131
outlined
3232
clearable
3333
variant="outlined"
@@ -38,9 +38,9 @@
3838

3939
<v-data-table
4040
:headers="[
41-
{ title: 'Número', value: 'id' },
41+
{ title: 'Whatsapp', value: 'id' },
4242
{
43-
title: 'Ultima mensagem',
43+
title: $t('chats.headers.lastMsgTimestamp'),
4444
value: 'lastMsgTimestamp',
4545
options: { format: 'DD/MM/YYYY HH:mm' },
4646
},

src/components/instance/message/MyContacts.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-ripple
88
>
99
<v-icon start>mdi-account-box</v-icon>
10-
Meus contatos
10+
{{ $t("contacts.title") }}
1111
<v-spacer></v-spacer>
1212
<v-btn
1313
size="small"
@@ -27,7 +27,7 @@
2727

2828
<v-text-field
2929
v-model="search"
30-
label="Pesquisar"
30+
:label="$t('search')"
3131
outlined
3232
clearable
3333
variant="outlined"
@@ -38,9 +38,9 @@
3838

3939
<v-data-table
4040
:headers="[
41-
{ title: 'Nome', value: 'pushName', sortable: true },
41+
{ title: $t('name'), value: 'pushName', sortable: true },
4242
{
43-
title: 'Número',
43+
title: 'Whatsapp',
4444
value: 'id',
4545
},
4646
]"

src/components/instance/message/MyGroups.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-ripple
88
>
99
<v-icon start>mdi-account-group</v-icon>
10-
Meus Grupos
10+
{{ $t("groups.title") }}
1111
<v-spacer></v-spacer>
1212
<v-btn
1313
size="small"
@@ -27,7 +27,7 @@
2727

2828
<v-text-field
2929
v-model="search"
30-
label="Pesquisar"
30+
:label="$t('search')"
3131
outlined
3232
clearable
3333
variant="outlined"
@@ -38,10 +38,10 @@
3838

3939
<v-data-table
4040
:headers="[
41-
{ title: 'Nome', value: 'subject' },
41+
{ title: $t('name'), value: 'subject' },
4242
{ title: 'ID', value: 'id', align: 'center' },
4343
{
44-
title: 'Criado em',
44+
title: $t('groups.headers.creation'),
4545
value: 'creation',
4646
align: 'center',
4747
},

src/components/instance/message/OpenSendMessage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-ripple
88
>
99
<v-icon start>mdi-message-text</v-icon>
10-
Mandar mensagem
10+
{{ $t("sendMessage.title") }}
1111
<v-spacer></v-spacer>
1212
<v-btn
1313
size="small"

src/components/instance/profile/BasicInfo.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-ripple
88
>
99
<v-icon start>mdi-account</v-icon>
10-
Nome e Recado
10+
{{ $t("profile.title") }}
1111

1212
<v-spacer></v-spacer>
1313
<v-btn
@@ -31,23 +31,23 @@
3131
class="flex-grow-1 flex-shrink-0"
3232
v-model="data.name"
3333
:disabled=" loading"
34-
label="Nome"
34+
:label="$t('profile.name')"
3535
counter
3636
maxlength="25"
3737
:rules="[
38-
(v) => !!v || 'Nome é obrigatório',
39-
(v) => v.length <= 25 || 'Nome deve ter no máximo 25 caracteres',
38+
(v) => !!v || $t('required', { field: $t('profile.name') }),
39+
(v) => v.length <= 25 || $t('maxLength', { field: $t('profile.name'), length: 25 }),
4040
]"
4141
></v-text-field>
4242
<v-text-field
4343
class="flex-grow-1 flex-shrink-0"
4444
v-model="data.status"
4545
:disabled="loading"
46-
label="Recado (Status)"
46+
:label="$t('profile.status')"
4747
:rules="[
48-
(v) => !!v || 'Nome é obrigatório',
48+
(v) => !!v || $t('required', { field: $t('profile.status') }),
4949
(v) =>
50-
v.length <= 139 || 'Recado deve ter no máximo 139 caracteres',
50+
v.length <= 139 || $t('maxLength', { field: $t('profile.status'), length: 139 }),
5151
]"
5252
counter
5353
maxlength="139"
@@ -67,7 +67,7 @@
6767
@click="saveOptions"
6868
variant="tonal"
6969
>
70-
Salvar
70+
{{ $t("save") }}
7171
</v-btn>
7272
</v-card-actions>
7373
</v-card>

src/components/instance/profile/Privacy.vue

Lines changed: 74 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-ripple
88
>
99
<v-icon start>mdi-shield-account</v-icon>
10-
Privacidade
10+
{{ $t("privacy.title") }}
1111
<v-spacer></v-spacer>
1212
<v-btn
1313
size="small"
@@ -29,48 +29,60 @@
2929
<v-select
3030
v-model="privacyData.last"
3131
:items="WAPrivacyValue"
32-
label="Visto por último"
33-
:rules="[(v) => !!v || 'Visto por último é obrigatório']"
32+
:label="$t('privacy.lastSeen')"
33+
:rules="[
34+
(v) => !!v || $t('required', { field: $t('privacy.lastSeen') }),
35+
]"
3436
density="comfortable"
3537
prepend-inner-icon="mdi-clock-outline"
3638
></v-select>
3739
<v-select
3840
v-model="privacyData.online"
3941
:items="WAPrivacyOnlineValue"
40-
label="Online"
41-
:rules="[(v) => !!v || 'Online é obrigatório']"
42+
:label="$t('privacy.online')"
43+
:rules="[
44+
(v) => !!v || $t('required', { field: $t('privacy.online') }),
45+
]"
4246
density="comfortable"
4347
prepend-inner-icon="mdi-cellphone"
4448
></v-select>
4549
<v-select
4650
v-model="privacyData.profile"
4751
:items="WAPrivacyValue"
48-
label="Foto do Perfil"
49-
:rules="[(v) => !!v || 'Foto de Perfil é obrigatório']"
52+
:label="$t('privacy.profilePhoto')"
53+
:rules="[
54+
(v) => !!v || $t('required', { field: $t('privacy.profilePhoto') }),
55+
]"
5056
density="comfortable"
5157
prepend-inner-icon="mdi-account-box"
5258
></v-select>
5359
<v-select
5460
v-model="privacyData.status"
5561
:items="WAPrivacyValue"
56-
label="Recado (Status)"
57-
:rules="[(v) => !!v || 'Recado é obrigatório']"
62+
:label="$t('privacy.status')"
63+
:rules="[
64+
(v) => !!v || $t('required', { field: $t('privacy.status') }),
65+
]"
5866
density="comfortable"
5967
prepend-inner-icon="mdi-text-short"
6068
></v-select>
6169
<v-select
6270
v-model="privacyData.readreceipts"
6371
:items="WAReadReceiptsValue"
64-
label="Confirmação de leitura"
65-
:rules="[(v) => !!v || 'Confirmação de leitura é obrigatório']"
72+
:label="$t('privacy.readreceipts')"
73+
:rules="[
74+
(v) => !!v || $t('required', { field: $t('privacy.readreceipts') }),
75+
]"
6676
density="comfortable"
6777
prepend-inner-icon="mdi-check-all"
6878
></v-select>
6979
<v-select
7080
v-model="privacyData.groupadd"
7181
:items="WAPrivacyValue"
72-
label="Ser adicionado em grupos"
73-
:rules="[(v) => !!v || 'Ser adicionado em grupos é obrigatório']"
82+
:label="$t('privacy.groupadd')"
83+
:rules="[
84+
(v) => !!v || $t('required', { field: $t('privacy.groupadd') }),
85+
]"
7486
density="comfortable"
7587
prepend-inner-icon="mdi-account-multiple-plus"
7688
></v-select>
@@ -97,7 +109,7 @@
97109
@click="savePrivacy"
98110
variant="tonal"
99111
>
100-
Salvar
112+
{{ $t("save") }}
101113
</v-btn>
102114
</v-card-actions>
103115
</v-card>
@@ -125,46 +137,54 @@ export default {
125137
required: true,
126138
},
127139
},
128-
data: () => ({
129-
AppStore: useAppStore(),
130-
expanded: false,
131-
loading: false,
132-
error: false,
133-
valid: false,
134-
WAPrivacyValue: [
135-
{ value: "all", title: "Todos" },
136-
{ value: "contacts", title: "Contatos" },
137-
{ value: "contact_blacklist", title: "Contatos exeto os da lista negra" },
138-
{ value: "none", title: "Ninguém" },
139-
],
140-
WAPrivacyOnlineValue: [
141-
{ value: "all", title: "Todos" },
142-
{ value: "match_last_seen", title: "Igual ao visto por último" },
143-
],
144-
WAReadReceiptsValue: [
145-
{ value: "all", title: "Todos" },
146-
{ value: "none", title: "Ninguém" },
147-
],
140+
data() {
141+
return {
142+
AppStore: useAppStore(),
143+
expanded: false,
144+
loading: false,
145+
error: false,
146+
valid: false,
147+
WAPrivacyValue: [
148+
{ value: "all", title: this.$t("privacy.options.all") },
149+
{ value: "contacts", title: this.$t("privacy.options.contacts") },
150+
{
151+
value: "contact_blacklist",
152+
title: this.$t("privacy.options.contactBlacklist"),
153+
},
154+
{ value: "none", title: this.$t("privacy.options.none") },
155+
],
156+
WAPrivacyOnlineValue: [
157+
{ value: "all", title: this.$t("privacy.options.all") },
158+
{
159+
value: "match_last_seen",
160+
title: this.$t("privacy.options.matchLastSeen"),
161+
},
162+
],
163+
WAReadReceiptsValue: [
164+
{ value: "all", title: this.$t("privacy.options.all") },
165+
{ value: "none", title: this.$t("privacy.options.none") },
166+
],
148167
149-
privacyData: {
150-
readreceipts: "all",
151-
profile: "all",
152-
status: "all",
153-
online: "all",
154-
last: "all",
155-
groupadd: "all",
156-
calladd: "all",
157-
},
158-
defaultChatwootData: {
159-
readreceipts: "all",
160-
profile: "all",
161-
status: "all",
162-
online: "all",
163-
last: "all",
164-
groupadd: "all",
165-
calladd: "all",
166-
},
167-
}),
168+
privacyData: {
169+
readreceipts: "all",
170+
profile: "all",
171+
status: "all",
172+
online: "all",
173+
last: "all",
174+
groupadd: "all",
175+
calladd: "all",
176+
},
177+
defaultChatwootData: {
178+
readreceipts: "all",
179+
profile: "all",
180+
status: "all",
181+
online: "all",
182+
last: "all",
183+
groupadd: "all",
184+
calladd: "all",
185+
},
186+
};
187+
},
168188
methods: {
169189
toggleExpanded() {
170190
if (this.loading) return;
@@ -190,7 +210,7 @@ export default {
190210
},
191211
async loadPrivacy() {
192212
try {
193-
if(!this.isOpen) return;
213+
if (!this.isOpen) return;
194214
this.loading = true;
195215
this.error = false;
196216
const privacyData = await instanceController.profile.getPrivacy(

0 commit comments

Comments
 (0)