From 6e60ba6900b6329168447af74af49a4660214d6e Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Wed, 30 Oct 2024 11:21:30 +0530 Subject: [PATCH 1/6] fix(PWA): broken translation strings --- frontend/src/components/SalarySlipItem.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/SalarySlipItem.vue b/frontend/src/components/SalarySlipItem.vue index 4455f2a7e8..ced288400e 100644 --- a/frontend/src/components/SalarySlipItem.vue +++ b/frontend/src/components/SalarySlipItem.vue @@ -8,10 +8,12 @@
- {{ __("{0}: {1}", null, [ + {{ + __("{0}: {1}", [ __("Gross Pay"), formatCurrency(doc.gross_pay, doc.currency), - ]) }} + ]) + }} ·
@@ -49,9 +51,9 @@ const title = computed(() => { return dayjs(props.doc.start_date).format("MMM YYYY") } else { // quarterly, bimonthly, etc - return `${dayjs(props.doc.start_date).format("MMM YYYY")} - ${dayjs(props.doc.end_date).format( - "MMM YYYY" - )}` + return `${dayjs(props.doc.start_date).format("MMM YYYY")} - ${dayjs( + props.doc.end_date + ).format("MMM YYYY")}` } }) From 0fbe4a4a5be37b0983d6d1519e07a0da208c5e96 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Wed, 30 Oct 2024 15:04:31 +0530 Subject: [PATCH 2/6] fix(PWA): broken translation strings in expense tables --- frontend/src/components/ExpenseItems.vue | 10 ++++++---- frontend/src/components/ExpensesTable.vue | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/ExpenseItems.vue b/frontend/src/components/ExpenseItems.vue index 49f2117a1f..55c9fc57e4 100644 --- a/frontend/src/components/ExpenseItems.vue +++ b/frontend/src/components/ExpenseItems.vue @@ -18,10 +18,12 @@
- {{ __("{0}: {1}", null, [ - __("Sanctioned"), - formatCurrency(item.sanctioned_amount || 0, currency), - ]) }} + {{ + __("{0}: {1}", [ + __("Sanctioned"), + formatCurrency(item.sanctioned_amount || 0, currency), + ]) + }} · diff --git a/frontend/src/components/ExpensesTable.vue b/frontend/src/components/ExpensesTable.vue index 7290874d2a..ebd9ce196c 100644 --- a/frontend/src/components/ExpensesTable.vue +++ b/frontend/src/components/ExpensesTable.vue @@ -37,10 +37,12 @@
- {{ __("{0}: {1}", null, [ - __("Sanctioned"), - formatCurrency(item.sanctioned_amount || 0, currency), - ]) }} + {{ + __("{0}: {1}", [ + __("Sanctioned"), + formatCurrency(item.sanctioned_amount || 0, currency), + ]) + }} · From 59d753f6d020022f20e140e51d60df1c44f71c06 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Wed, 30 Oct 2024 15:05:46 +0530 Subject: [PATCH 3/6] fix: translation function used without injecting --- frontend/src/components/AttendanceCalendar.vue | 1 + frontend/src/components/ExpenseTaxesTable.vue | 3 ++- frontend/src/components/FormView.vue | 2 ++ frontend/src/components/WorkflowActionSheet.vue | 5 ++++- frontend/src/views/attendance/ShiftAssignmentList.vue | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/AttendanceCalendar.vue b/frontend/src/components/AttendanceCalendar.vue index cc725044f1..1c5d45c501 100644 --- a/frontend/src/components/AttendanceCalendar.vue +++ b/frontend/src/components/AttendanceCalendar.vue @@ -65,6 +65,7 @@ import { createResource } from "frappe-ui" const dayjs = inject("$dayjs") const employee = inject("$employee") +const __ = inject("$translate") const firstOfMonth = ref(dayjs().date(1).startOf("D")) const colorMap = { diff --git a/frontend/src/components/ExpenseTaxesTable.vue b/frontend/src/components/ExpenseTaxesTable.vue index 984cbd56c5..581848f605 100644 --- a/frontend/src/components/ExpenseTaxesTable.vue +++ b/frontend/src/components/ExpenseTaxesTable.vue @@ -127,7 +127,7 @@