Localize user and admin invoice pages.

Move both invoice views onto a shared invoices dictionary — statuses,
filters, payment/line-item/transaction labels, manual status controls and
toasts — with locale-aware Link, dates and RTL-aware table/search layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
keyhan
2026-06-11 13:00:15 +03:30
parent e99dccaff1
commit f8ee1ca168
5 changed files with 215 additions and 97 deletions
+62
View File
@@ -335,6 +335,68 @@ const en: Dictionary = {
hours: '{n} hours',
days: '{n} days',
},
invoices: {
status: {
draft: 'Draft',
issued: 'Unpaid',
partially_paid: 'Partially paid',
paid: 'Paid',
void: 'Void',
failed: 'Failed',
},
title: 'Invoices',
subtitle: 'Review what each payment was for and pay open invoices.',
walletBalance: 'Wallet balance',
toman: 'Toman',
filterAll: 'All',
filterUnpaid: 'Unpaid',
loadingInvoices: 'Loading invoices...',
noInvoices: 'No invoices found',
total: 'Total',
due: 'Due',
paidLabel: 'Paid',
method: 'Method',
selectInvoice: 'Select an invoice to view details',
downloadPdf: 'Download PDF',
lineItems: 'Line items',
payment: 'Payment',
walletCoversNote: 'Wallet balance covers {wallet} Toman. The remaining {rest} Toman will be paid through the gateway.',
processing: 'Processing...',
pay: 'Pay',
paidOn: 'Paid on {date}',
paymentFailed: 'Payment failed',
waitingRemaining: 'Waiting for the remaining payment.',
paymentComplete: 'Payment complete',
paymentCompleteUpdated: 'Payment complete and service updated',
gatewayFailed: 'Gateway payment failed',
invoicePaid: 'Invoice paid',
invoicePaidUpdated: 'Invoice paid and service updated',
downloadFailed: 'Failed to download invoice PDF',
adminTitle: 'Invoice Management',
adminSubtitle: 'Track all user invoices, payments, gateway refs, and wallet transactions.',
searchPlaceholder: 'Search invoice, email, or application',
allStatuses: 'All statuses',
allMethods: 'All methods',
methodWallet: 'Wallet',
methodGateway: 'Gateway',
methodMixed: 'Mixed',
colInvoice: 'Invoice',
colUser: 'User',
colStatus: 'Status',
colMethod: 'Method',
colDue: 'Due',
selectInvoiceShort: 'Select an invoice',
tracking: 'Tracking',
transactions: 'Transactions',
noTransactions: 'No linked transactions yet',
manualStatusChange: 'Manual status change',
reasonPlaceholder: 'Reason is required for audit visibility',
failedBtn: 'Failed',
voidBtn: 'Void',
statusUpdated: 'Invoice status updated',
statusUpdateFailed: 'Failed to update invoice status',
reasonRequired: 'Reason is required for manual status changes',
},
},
};