diff --git a/app/[locale]/print/[year]/[month]/page.tsx b/app/[locale]/print/[year]/[month]/page.tsx index 028117b..d8b736e 100644 --- a/app/[locale]/print/[year]/[month]/page.tsx +++ b/app/[locale]/print/[year]/[month]/page.tsx @@ -31,6 +31,7 @@ export default async function PrintPage({ params }: PrintPageProps) { // Get translations for the current locale const t = await getTranslations("home-page.print-preview"); + const yearMonth = `${year}-${month.toString().padStart(2, '0')}`; const translations = { title: t("title"), barcodesFound: t("barcodes-found"), @@ -39,7 +40,9 @@ export default async function PrintPage({ params }: PrintPageProps) { printFooter: t("print-footer", { date: new Date().toLocaleDateString() }), tableHeaderIndex: t("table-header-index"), tableHeaderBillInfo: t("table-header-bill-info"), - tableHeaderBarcode: t("table-header-barcode") + tableHeaderBarcode: t("table-header-barcode"), + emptyStateTitle: t("empty-state-title"), + emptyStateMessage: t("empty-state-message", { yearMonth }) }; // If no barcode data found, show empty state @@ -47,9 +50,9 @@ export default async function PrintPage({ params }: PrintPageProps) { return (
-

No Barcode Data Found

+

{translations.emptyStateTitle}

- No bills with 2D barcodes found for {year}-{month.toString().padStart(2, '0')} + {translations.emptyStateMessage}

diff --git a/messages/en.json b/messages/en.json index 1dd7618..90aef68 100644 --- a/messages/en.json +++ b/messages/en.json @@ -70,7 +70,9 @@ "print-footer": "Generated on {date} • Evidencija Režija Print System", "table-header-index": "#", "table-header-bill-info": "Bill Information", - "table-header-barcode": "2D Barcode" + "table-header-barcode": "2D Barcode", + "empty-state-title": "No Barcode Data Found", + "empty-state-message": "No bills with 2D barcodes found for {yearMonth}" } }, "bill-delete-form": { diff --git a/messages/hr.json b/messages/hr.json index 2db0fc6..bc3cae3 100644 --- a/messages/hr.json +++ b/messages/hr.json @@ -70,7 +70,9 @@ "print-footer": "Generirano {date} • Evidencija Režija Sustav Ispisa", "table-header-index": "#", "table-header-bill-info": "Informacije o Računu", - "table-header-barcode": "2D Barkod" + "table-header-barcode": "2D Barkod", + "empty-state-title": "Nema Podataka o Barkodovima", + "empty-state-message": "Nema računa s 2D barkodovima za {yearMonth}" } }, "bill-delete-form": {