From e6dc98bbd7661192a53804197c9833b3e7dfddd4 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 15 Apr 2024 19:43:52 +0530 Subject: [PATCH] fix: added translation in Contact Page --- frontend/src/pages/Contact.vue | 47 ++++++++++++++++++---------------- frontend/src/pages/Deal.vue | 2 +- frontend/src/pages/Lead.vue | 2 +- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/frontend/src/pages/Contact.vue b/frontend/src/pages/Contact.vue index ae17eb00..61b0a1d0 100644 --- a/frontend/src/pages/Contact.vue +++ b/frontend/src/pages/Contact.vue @@ -24,13 +24,13 @@ { icon: 'upload', label: contact.data.image - ? 'Change image' - : 'Upload image', + ? __('Change image') + : __('Upload image'), onClick: openFileSelector, }, { icon: 'trash-2', - label: 'Remove image', + label: __('Remove image'), onClick: () => changeContactImage(''), }, ], @@ -71,7 +71,10 @@ > · - +
- + @@ -161,7 +164,7 @@ :class="{ 'text-gray-900': selected }" > - {{ tab.label }} + {{ __(tab.label) }}
-
No {{ tab.label }} Found
+
{{ __('No {0} Found', [__(tab.label)]) }}
@@ -251,7 +254,7 @@ const showContactModal = ref(false) const detailMode = ref(false) const breadcrumbs = computed(() => { - let items = [{ label: 'Contacts', route: { name: 'Contacts' } }] + let items = [{ label: __('Contacts'), route: { name: 'Contacts' } }] items.push({ label: contact.data?.full_name, route: { name: 'Contact', params: { contactId: props.contactId } }, @@ -262,7 +265,7 @@ const breadcrumbs = computed(() => { function validateFile(file) { let extn = file.name.split('.').pop().toLowerCase() if (!['png', 'jpg', 'jpeg'].includes(extn)) { - return 'Only PNG and JPG images are allowed' + return __('Only PNG and JPG images are allowed') } } @@ -278,11 +281,11 @@ async function changeContactImage(file) { async function deleteContact() { $dialog({ - title: 'Delete contact', - message: 'Are you sure you want to delete this contact?', + title: __('Delete contact'), + message: __('Are you sure you want to delete this contact?'), actions: [ { - label: 'Delete', + label: __('Delete'), theme: 'red', variant: 'solid', async onClick(close) { @@ -367,37 +370,37 @@ function getDealRowObject(deal) { const dealColumns = [ { - label: 'Organization', + label: __('Organization'), key: 'organization', width: '11rem', }, { - label: 'Amount', + label: __('Amount'), key: 'annual_revenue', width: '9rem', }, { - label: 'Status', + label: __('Status'), key: 'status', width: '10rem', }, { - label: 'Email', + label: __('Email'), key: 'email', width: '12rem', }, { - label: 'Mobile no', + label: __('Mobile no'), key: 'mobile_no', width: '11rem', }, { - label: 'Deal owner', + label: __('Deal owner'), key: 'deal_owner', width: '10rem', }, { - label: 'Last modified', + label: __('Last modified'), key: 'modified', width: '8rem', }, diff --git a/frontend/src/pages/Deal.vue b/frontend/src/pages/Deal.vue index 6462d410..dc335cb9 100644 --- a/frontend/src/pages/Deal.vue +++ b/frontend/src/pages/Deal.vue @@ -426,7 +426,7 @@ function validateRequired(fieldname, value) { const breadcrumbs = computed(() => { let items = [{ label: __('Deals'), route: { name: 'Deals' } }] items.push({ - label: __(organization.value?.name), + label: organization.value?.name, route: { name: 'Deal', params: { dealId: deal.data.name } }, }) return items diff --git a/frontend/src/pages/Lead.vue b/frontend/src/pages/Lead.vue index ff1ff642..cf22dc8c 100644 --- a/frontend/src/pages/Lead.vue +++ b/frontend/src/pages/Lead.vue @@ -390,7 +390,7 @@ function validateRequired(fieldname, value) { const breadcrumbs = computed(() => { let items = [{ label: __('Leads'), route: { name: 'Leads' } }] items.push({ - label: __(lead.data.lead_name), + label: lead.data.lead_name, route: { name: 'Lead', params: { leadId: lead.data.name } }, }) return items