Extend i18n integration across dashboards, reports, and components

- Updated `en.json` and `da.json` with comprehensive translation keys for department dashboards, booking reports, tables, and POS components.
- Replaced hardcoded strings with dynamic translations using `$t` in multiple components for multilingual consistency.
- Improved maintainability by organizing and centralizing reusable translation keys.
This commit is contained in:
Jeppe Bundgaard
2026-02-17 15:25:32 +01:00
parent 2266e3908f
commit fe3f4b10f0
4 changed files with 604 additions and 589 deletions
+533 -580
View File
File diff suppressed because it is too large Load Diff
+64 -2
View File
@@ -1457,6 +1457,12 @@
"assistance": "Assistance"
},
"department_dashboard": {
"overview": {
"title": "Overview",
"subtitle": "See how your departments are performing",
"cards": "Cards",
"list": "List"
},
"nav": {
"dashboard": "Dashboard",
"pos": "POS System",
@@ -1947,11 +1953,67 @@
"title": "Navigation"
},
"product_sales": {
"title": "Product Sales"
"title": "Product Sales",
"subtitle_suffix": "product sales"
},
"today_form": {
"title": "Today's Form"
}
},
"tabs": {
"todays_report": "Today's report",
"previous_report": "Previous report",
"history": "History"
},
"todays_prefix": "Today's",
"reports": {
"bookings": {
"title": "Bookings",
"subtitle": "bookings",
"possible_count": "Possible count",
"completed_count": "Completed count"
},
"revenue": {
"title": "Revenue",
"subtitle": "revenue",
"possible_revenue": "Possible revenue",
"revenue": "Revenue"
},
"avg_revenue": {
"title": "Avg. revenue per wash",
"subtitle": "avg. revenue per wash",
"label": "Avg. revenue per wash"
},
"washes": {
"title": "Washes",
"subtitle": "washes",
"possible_washes": "Possible washes",
"completed_washes": "Completed washes"
},
"transactions": {
"title": "Transactions",
"subtitle": "transactions",
"possible_transactions": "Possible transactions",
"transaction_count": "Transaction count"
},
"products_sold": {
"title": "Products sold",
"subtitle": "products sold",
"possible_sold": "Possible sold",
"sold": "Sold"
},
"water_usage": {
"title": "Water usage",
"subtitle": "water usage",
"water_usage": "Water usage"
},
"water_usage_per_wash": {
"title": "Water usage per wash",
"subtitle": "water usage per wash",
"avg_water_usage": "Avg. water usage per wash"
}
},
"update_report": "Update report",
"update_todays_report": "Update today's report"
},
"goals": {
"title": "Goals",
@@ -32,11 +32,11 @@ const listDisplay = ref<listDisplayType>(listDisplayTabIndexes.cards);
<template>
<RestrictedPageWrapper :hasPermission="SessionUser.canAccessAdmin()">
<DepartmentDashboardPageWrapper
title="Overblik"
subtitle="Se hvordan dine afdelinger klarer sig"
:title="$t('department_dashboard.overview.title')"
:subtitle="$t('department_dashboard.overview.subtitle')"
>
<b-tabs type="is-boxed" v-model="listDisplay" expanded>
<b-tab-item label="Kort"
<b-tab-item :label="$t('department_dashboard.overview.cards')"
icon-pack="fas"
icon="th-large"
:visible="true"
@@ -45,7 +45,7 @@ const listDisplay = ref<listDisplayType>(listDisplayTabIndexes.cards);
<DepartmentDailyReport :departmentSpecific="false"/>
</template>
</b-tab-item>
<b-tab-item label="Liste"
<b-tab-item :label="$t('department_dashboard.overview.list')"
icon-pack="fas"
icon="list"
>
@@ -105,17 +105,17 @@ getDepartment().then(
<!-- Total count -->
<div class="column is-narrow is-2 has-text-centered is-offset-6">
<h3 class="title is-5">{{ bookings_count.completed }}</h3>
<h6 class="subtitle is-6">{{SessionUser.objects.global.language.completed}}</h6>
<h6 class="subtitle is-6">{{ $t('bookings.completed') }}</h6>
</div>
<!-- Pending count -->
<div class="column is-narrow is-2 has-text-centered">
<h3 class="title is-5">{{ bookings_count.pending }}</h3>
<h6 class="subtitle is-6">{{SessionUser.objects.global.language.pending}}</h6>
<h6 class="subtitle is-6">{{ $t('bookings.pending') }}</h6>
</div>
<!-- Cancelled count -->
<div class="column is-narrow is-2 has-text-centered">
<h3 class="title is-5">{{ bookings_count.cancelled }}</h3>
<h6 class="subtitle is-6">{{SessionUser.objects.global.language.cancelled}}</h6>
<h6 class="subtitle is-6">{{ $t('bookings.cancelled') }}</h6>
</div>
</div>
</div>