fix(backoffice): wording quality pass across orders, moderation, transactions, users, customers

- Replaced hardcoded English audit/timeline text (order status changes,
  review moderation events, user role/status changes) with proper
  adminXxx.timelineEvent.*/adminUsers.audit.* i18n keys, so Recent
  Activity/Timeline/Audit panels no longer mix English into ru/hy UI.
- Translated raw internal codes rendered directly to users: transaction
  payment method ('card'/'qr'/'cash_on_delivery' -> adminTransactions.methodValue.*)
  and user roles/permissions ('products.manage' etc -> adminUsers.roleValue.*/
  adminUsers.permission.*), replacing developer-facing enum leakage with
  real copy.
- Fixed wrong-noun list-footer counts: Orders/Transactions/Moderation
  list pages all reused adminProducts.items ("N товаров"/"N products")
  regardless of what was actually listed; each now has its own itemsCount
  key ("N заказов", "N транзакций", "N отзывов").
- Fixed customer detail page's "Back" button reusing adminOrders.back
  ("Back to orders") instead of a customers-specific label.
- Added translation keys to en/ru/hy + translations.ts interface for all
  of the above.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-07-25 21:20:37 +04:00
parent 72846b44b1
commit b909a195f7
28 changed files with 311 additions and 42 deletions

View File

@@ -1231,6 +1231,7 @@ export const en: Translations = {
adminModeration: {
search: 'Search by customer, product, or review text…',
selectAllRows: 'Select all reviews',
itemsCount: 'reviews',
allStatuses: 'All statuses',
allRatings: 'All ratings',
rating: 'Rating',
@@ -1287,6 +1288,16 @@ export const en: Translations = {
rejected: 'Rejected',
spam: 'Spam',
},
timelineEvent: {
submitted: 'Review submitted',
statusChanged: 'Status changed to "{{status}}"',
restored: 'Review restored',
hidden: 'Review hidden',
},
actor: {
admin: 'Admin',
customer: 'Customer',
},
targetType: {
product: 'Product',
review: 'Review',
@@ -1315,6 +1326,11 @@ export const en: Translations = {
createdAt: 'Placed',
items: 'Items',
timeline: 'Timeline',
timelineEvent: {
created: 'Order created',
statusChanged: 'Status changed to "{{status}}"',
refundRequested: 'Refund requested',
},
notes: 'Notes to customer',
internalNotes: 'Internal notes',
addNote: 'Add note',
@@ -1349,6 +1365,7 @@ export const en: Translations = {
refund_requested: 'Refund requested',
refunded: 'Refunded',
},
itemsCount: 'orders',
ordersToday: 'Orders today',
paidCount: 'Paid',
customersCount: 'Customers',
@@ -1360,6 +1377,7 @@ export const en: Translations = {
alertRefundRequested: 'orders have a refund request waiting',
},
adminCustomers: {
back: 'Back to customers',
search: 'Search by name, email, or phone…',
name: 'Name',
email: 'Email',
@@ -1749,11 +1767,34 @@ export const en: Translations = {
expired: 'Expired',
revoked: 'Revoked',
},
roleValue: {
owner: 'Owner',
admin: 'Admin',
editor: 'Editor',
viewer: 'Viewer',
},
permission: {
all: 'Full access to everything',
productsManage: 'Manage products',
productsView: 'View products',
categoriesManage: 'Manage categories',
ordersManage: 'Manage orders',
ordersView: 'View orders',
mediaManage: 'Manage media library',
},
actor: {
admin: 'Admin',
},
audit: {
roleChanged: 'Role changed to "{{role}}"',
statusChanged: 'Status changed to "{{status}}"',
},
},
adminTransactions: {
search: 'Search transactions',
type: 'Type',
method: 'Payment method',
itemsCount: 'transactions',
fraud: 'Fraud check',
flagged: 'Flagged',
flag: 'Flag as suspicious',
@@ -1775,6 +1816,11 @@ export const en: Translations = {
refund: 'Refund',
qr_payment: 'QR payment',
},
methodValue: {
card: 'Card',
qr: 'QR code',
cash_on_delivery: 'Cash on delivery',
},
},
adminMonitoring: {
eventsEmptyTitle: 'No events found',