# Hardcoded English Strings Missing Arabic Translations

Generated on: 2026-05-30
Scope: Dashboard pages analyzed for hardcoded English strings requiring Arabic translations

---

## 1. Orders Page (`/src/app/(dashboard)/order-management/`)

### File: `components/OrdersTable.tsx`

| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 46-57 | STATUS_TABS labels: `'All Orders'`, `'Pending'`, `'AI Processing'`, `'Confirmed'`, `'In Kitchen'`, `'Ready'`, `'With Rider'`, `'Delivered'`, `'Completed'`, `'Escalated'`, `'Cancelled'` | `orderManagement.tabs.all`, `orderManagement.tabs.pending`, `orderManagement.tabs.aiProcessing`, `orderManagement.tabs.confirmed`, `orderManagement.tabs.kitchen`, `orderManagement.tabs.ready`, `orderManagement.tabs.rider`, `orderManagement.tabs.delivered`, `orderManagement.tabs.completed`, `orderManagement.tabs.escalated`, `orderManagement.tabs.cancelled` |
| 60-66 | BULK_STATUS_OPTIONS labels: `'Confirmed'`, `'In Kitchen'`, `'Ready'`, `'Delivered'`, `'Completed'`, `'Cancelled'` | `orderManagement.bulkStatus.confirmed`, `orderManagement.bulkStatus.kitchen`, `orderManagement.bulkStatus.ready`, `orderManagement.bulkStatus.delivered`, `orderManagement.bulkStatus.completed`, `orderManagement.bulkStatus.cancelled` |
| 69-78 | CHANNEL_CONFIG labels: `'Voice'`, `'Chat'`, `'WhatsApp'`, `'Online'`, `'POS'`, `'Zomato'`, `'Swiggy'`, `'Email'`, `'SMS'` | `orderManagement.channel.voice`, `orderManagement.channel.chat`, `orderManagement.channel.whatsapp`, `orderManagement.channel.online`, `orderManagement.channel.pos`, `orderManagement.channel.zomato`, `orderManagement.channel.swiggy`, `orderManagement.channel.email`, `orderManagement.channel.sms` |
| 80-89 | CHANNEL_FILTERS labels: `'All'`, `'POS'`, `'Zomato'`, `'Swiggy'`, `'Online'`, `'Chat'`, `'Voice'`, `'WhatsApp'` | `orderManagement.channelFilter.all`, `orderManagement.channelFilter.pos`, `orderManagement.channelFilter.zomato`, `orderManagement.channelFilter.swiggy`, `orderManagement.channelFilter.online`, `orderManagement.channelFilter.chat`, `orderManagement.channelFilter.voice`, `orderManagement.channelFilter.whatsapp` |
| 306 | `'Order #'`, `'Order ID'`, `'Customer Name'`, `'Customer Phone'`, `'Channel'`, `'Delivery Type'`, `'Delivery Address'`, `'Table Number'`, `'Items'`, `'Subtotal'`, `'Tax'`, `'Total'`, `'Status'`, `'Placed At'`, `'Special Instructions'`, `'Modified'` | CSV export headers need translation keys |

---

## 2. Table Bookings Page (`/src/app/(dashboard)/table-booking-management/`)

### File: `page.tsx`
| String | Suggested Key |
|--------|---------------|
| `'Table Booking Management'` (already uses translation) | ✓ Has translation |
| `'Table Booking Management'` subtitle | Already uses `t('nav.reservations', ...)` |

### File: `components/BookingsTable.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 76-85 | STATUS_TABS labels: `'All'`, `'Pending'`, `'Confirmed'`, `'Seated'`, `'Escalated'`, `'Reminder Sent'`, `'Cancelled'`, `'No Show'`, `'Completed'` | ✓ Already uses `t()` with fallbacks |
| 259 | `'Turnover buffer: ${bufferMin} min'` (tooltip) | `tableBooking.timeline.turnoverBuffer` |

### File: `components/TimelineView.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 331 | `'Turnover buffer: ${bufferMin} min'` (tooltip) | `tableBooking.timeline.turnoverBuffer` |
| 471 | `'a'` or `'p'` (am/pm formatting) | Uses locale format, could be `tableBooking.timeline.am` and `tableBooking.timeline.pm` |
| 503 | `'Floor timeline'` title | Already uses `t('tableBooking.timeline.title', ...)` |
| 546 | `'Day'`, `'Week'` buttons | Already uses `t('tableBooking.timeline.day', ...)` |
| 572 | `'booking(s) without a table — drag onto the grid to assign.'` | Already uses `t('tableBooking.timeline.unassigned', ...)` |

### File: `components/BookingDetailModal.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 54-60 | Status options: `'AI Processing'`, `'Confirmed'`, `'Reminder Sent'`, `'Seated'`, `'No Show'`, `'Cancelled'` | ✓ Already uses `t()` with fallbacks |
| 103 | `'VIP'` badge | Already uses `t('tableBooking.vip', ...)` |
| 138 | `'Voice Booking'` | Already uses `t('tableBooking.voiceBooking', ...)` |

---

## 3. Conversations Page (`/src/app/(dashboard)/conversations/`)

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 36-39 | Status cfg labels fallbacks | Already use `t()` |
| 86-91 | channelCfg labels: `'Chat'`, `'Voice'`, `'WhatsApp'`, `'Email'`, `'SMS'` | Need translation keys: `conversations.channel.chat`, `conversations.channel.voice`, `conversations.channel.whatsapp`, `conversations.channel.email`, `conversations.channel.sms` |
| 127-143 | Pagination labels: `'Rows per page:'`, `'0 results'`, `'Page'`, `'of'`, `'total'`, `'Previous page'`, `'Next page'` | `table.rowsPerPage`, `table.noResults`, `table.page`, `table.of`, `table.total`, `table.previousPage`, `table.nextPage` |
| 85-91 | channelCfg (duplicate) | Same as above |

### File: `page.tsx` - Additional strings
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 272 | `'—'` (empty value placeholder) | `common.emptyValue` |
| 468 | `'The selected agent's system prompt, greeting script, and fallback rules are used for all widget conversations. Configure agents under <strong>AI Agent Config</strong> in the sidebar.'` | `widgetSettings.agent.configInfo` |
| 480-483 | `'Development URL detected'`, `'This embed code points to your development server...'` | `widgetSettings.embed.devWarningTitle`, `widgetSettings.embed.devWarningDesc` |
| 488-490 | `'Your Embed Code'`, `'Paste this into the <body> of every page...'` | Already uses `t()` |
| 498 | `'Copied!'` / `'Copy'` | Already uses conditional rendering |
| 505-510 | `'Setup Steps'` section - uses `t()` | ✓ Has translations |

---

## 4. Widget Settings Page (`/src/app/(dashboard)/widget-settings/`)

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 38 | `'Hi! How can we help you today? 👋'` (default) | Already uses `t('widgetSettings.appearance.welcomeMessagePlaceholder', ...)` |
| 39 | `'Type your message...'` (default) | Already uses `t('widgetSettings.appearance.placeholderPlaceholder', ...)` |
| 44 | `'AI Assistant'` (default bot_name) | Already uses `t('widgetSettings.appearance.botNamePlaceholder', ...)` |
| 56-57 | Page title/subtitle | Already uses `t()` |
| 155-159 | Tab labels: `'Appearance'`, `'AI Agent'`, `'Embed'` | Already uses `t()` |
| 220-326 | All form labels already use `t()` | ✓ Has translations |
| 362-447 | Agent selection labels | All use `t()` with fallbacks |
| 466 | `'All widget conversations will use {name}...'` | Already uses `t()` |

---

## 5. Menu Management Page (`/src/app/(dashboard)/menu-management/`)

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 44 | `SPICE_DOTS = ['', '🌶', '🌶🌶', '🌶🌶🌶']` | Icons only, no translation needed |
| 92 | `'Uncategorized'` (fallback) | `menuManagement.uncategorized` - already has `t()` fallback |
| 204-208 | Tab labels: `'Menu Items'`, `'Categories'`, `'Modifiers'`, `'Bulk Upload'` | Already use `t()` |
| 243 | `'All categories'` option | Already uses `t()` |
| 246 | `'items'` | Already uses `t('menu.items', ...)` |
| 283 | `'🍽️'` emoji placeholder | Icon only |
| 361 | Tab labels again | ✓ Already use `t()` |

### File: `ItemDrawer.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 21 | `SPICE_LABELS = ['No Spice', 'Mild', 'Medium', 'Hot']` | Need keys: `menuManagement.spiceLevelLabels.noSpice`, `menuManagement.spiceLevelLabels.mild`, `menuManagement.spiceLevelLabels.medium`, `menuManagement.spiceLevelLabels.hot` |
| 239 | `'Preview'` alt text | `menuManagement.itemImagePreview` |
| 295 | `'Vegetarian'` | Already uses `t('menuManagement.vegetarian', ...)` |
| 303 | `'Spice: [label]'` | Already uses `t()` |
| 429 | `'Radio (Pick one)'`, `'Checkbox (Pick many)'` | Already uses `t()` |
| 440 | `'No limit'` placeholder | Already uses `t('menuManagement.noLimit', ...)` |
| 486 | `'Req'` (required badge short) | `menuManagement.reqBadge` |
| 487 | `'opts'` (options count) | `menuManagement.optsCount` |
| 508 | `'Free'` (zero price delta) | Already uses `t('menuManagement.free', ...)` |
| 525 | `'Add Option'` button | `menuManagement.addOption` |

---

## 6. Customers Page (`/src/app/(dashboard)/customers/`)

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 63 | `'—'` (empty value) | `common.emptyValue` |
| 181-192 | Table headers | All already use `t()` |
| 321 | `'—'` empty value | ✓ Already handled |
| 370 | `'No contact details on record'` | Already uses `t()` |
| 376-403 | Marketing preferences section | All labels use `t()` |
| 489-496 | Orders table headers | All use `t()` |
| 557-564 | Bookings table headers | All use `t()` |

---

## 7. Storefront Page (`/src/app/(dashboard)/storefront/`)

### File: `HubClient.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 88-89 | Loading text | Already uses `t('common.loading', ...)` |
| 102 | `'No branches yet.'` | Already uses `t()` |
| 126 | `'Set restaurant slug'` | Already uses `t()` |
| 134 | `'Needs setup'` | Already uses `t()` |
| 146 | `'Enabled'`, `'Disabled'` | Already uses `t()` |
| 150 | `'no slug'` | Already uses `t()` |
| 161 | `'Preview'` | Already uses `t()` |
| 169 | `'Edit QR & storefront'`, `'Set up'` | Already uses `t()` |

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| Server wrapper only - no hardcoded strings |

---

## 8. Staff Page (`/src/app/(dashboard)/staff/`)

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 17-38 | SECTION_LABELS object - all section names | Need keys: `staff.sections.dashboard`, `staff.sections.orders`, etc. - Already uses `t()` in PermissionMatrix |
| 94-99 | CRUD_META - `'Create'`, `'Read'`, `'Update'`, `'Delete'` | Already use `t()` in PermissionMatrix |
| 144-149 | SECTION_GROUPS labels | All use `t()` |

### File: `page.tsx` - Additional
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 248 | `'Click to enable'`, `'Click to disable'` | Tooltips - could be `staff.permissionClickToEnable`, `staff.permissionClickToDisable` |
| 255 | `'Orders'` (in SECTION_LABELS) | Already uses `t()` |
| 656-675 | Most labels already use `t()` | ✓ Well internationalized |

---

## 9. Settings/Notifications Page (`/src/app/(dashboard)/notifications/`)

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 15-29 | defaultPrefs category and event labels | All need translation keys - currently hardcoded English |
| `'Orders'`, `'Table Bookings'`, `'AI Agent'`, `'System'`, `'Staff'`, `'Billing'` | `notifications.category.orders`, `notifications.category.tableBookings`, etc. |
| `'New Order Received'`, `'Order Cancelled'`, `'High Order Volume Alert'` | `notifications.event.newOrder`, `notifications.event.orderCancelled`, `notifications.event.highOrderVolume` |
| `'New Booking'`, `'Booking Cancelled'`, `'Upcoming Booking Reminder'` | `notifications.event.newBooking`, `notifications.event.bookingCancelled`, `notifications.event.bookingReminder` |
| `'AI Escalation / Handoff'`, `'Low AI Call Balance'`, `'Knowledge Base Sync Complete'` | `notifications.event.aiEscalation`, `notifications.event.lowAIBalance`, `notifications.event.knowledgeBaseSync` |
| `'Platform Update'`, `'Webhook Delivery Failure'` | `notifications.event.platformUpdate`, `notifications.event.webhookFailure` |
| `'New Staff Login'`, `'Invoice Paid'`, `'Payment Failed'` | `notifications.event.newStaffLogin`, `notifications.event.invoicePaid`, `notifications.event.paymentFailed` |
| Description strings (starting with `'When a...'`) | All need translation keys for descriptions |
| 115 | `'Channels:'` label | Already uses `t()` |
| 118-120 | `'In-App'`, `'Email'`, `'SMS'` | Already use `t()` |

### File: `preferences/page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 14-29 | Same defaultPrefs as above | Same keys needed |
| 147 | `'events'` label | Already uses `t()` |

---

## 10. Email/SMTP Settings Page (`/src/app/(dashboard)/admin/email-settings/`)

### File: `page.tsx`
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 82 | `'Platform Email (SMTP)'` header | `emailSettings.pageTitle` |
| 84 | `'These credentials are used to send branded emails...'` | `emailSettings.pageDescription` |
| 88 | `'SMTP host'`, `'Port'`, `'Username'`, `'Password'` | `emailSettings.smtpHost`, `emailSettings.port`, `emailSettings.username`, `emailSettings.password` |
| 92 | `'Use TLS (secure)'` | `emailSettings.useTls` |
| 95 | `'From (e.g. "diploy <no-reply@diploy.in>")'` | `emailSettings.fromLabel` |
| 101-105 | Admin brand labels | `emailSettings.adminBrandName`, `emailSettings.adminBrandUrl`, `emailSettings.adminBrandLogo` |
| 110 | `'Save'` button | `common.save` (already exists) |
| 116-118 | `'Send a test email'` section | `emailSettings.testEmailSection`, `emailSettings.testEmailDescription` |
| 117 | `'Sends the signup OTP template...'` | `emailSettings.testEmailDescription` |
| 122 | `'Send test'` button | `emailSettings.sendTest` |
| 97 | `'Password (stored — leave blank to keep)'` | Already has conditional text |

---

## 11. Restaurant Settings Page (`/src/app/(dashboard)/restaurant-settings/`)

### File: `page.tsx` (first 200 lines read)
| Line | Hardcoded String | Suggested Translation Key |
|------|------------------|----------------------------|
| 38-45 | Day names | Already use `t('common.days.monday', ...)` |
| 87-115 | templateVariables labels | All use `t()` with fallbacks |
| 117-133 | defaultTemplates text | All template content should be translatable via variables |
| 142-145 | channels labels | Already use `t()` |
| 161-167 | allWebhookEvents | Event names may need translation for UI display |

---

## Summary by Area

### 1. Orders Page - ✓ Well internationalized, minimal needs
- STATUS_TABS, BULK_STATUS_OPTIONS, CHANNEL_CONFIG, CHANNEL_FILTERS all use hardcoded labels
- Need: Translation keys for all status tab labels, channel labels, and filter labels

### 2. Table Bookings Page - ✓ Mostly internationalized
- Minor: Timeline tooltip text, turnover buffer text

### 3. Conversations Page - ⚠️ Needs work
- channelCfg has hardcoded labels: 'Chat', 'Voice', 'WhatsApp', 'Email', 'SMS'
- Pagination labels need keys
- Info section labels need review

### 4. Widget Settings Page - ✓ Well internationalized
- Most strings use `t()` with fallbacks

### 5. Menu Management Page - ⚠️ Some needs
- SPICE_LABELS array hardcoded
- Some button labels like 'Add Option'
- 'Req', 'opts' short labels

### 6. Customers Page - ✓ Well internationalized
- All labels use `t()` with fallbacks

### 7. Storefront Page - ✓ Well internationalized
- All labels use `t()` with fallbacks

### 8. Staff Page - ✓ Well internationalized
- SECTION_LABELS and CRUD_META use `t()` in context

### 9. Notifications/Preferences Page - ❌ Major needs
- All notification event names and descriptions hardcoded in defaultPrefs array
- Categories: 'Orders', 'Table Bookings', 'AI Agent', 'System', 'Staff', 'Billing'
- All event descriptions starting with "When a..."

### 10. Email/SMTP Settings Page - ❌ Not internationalized
- Page title, description, all form labels hardcoded
- No `t()` function usage

---

## Priority Recommendations

### HIGH PRIORITY (User-facing, frequently accessed):
1. **Notifications Page** - All event names and descriptions need translation
2. **Orders Page** - Status tabs, channel filters need translation
3. **Email Settings Page** - Complete page needs internationalization

### MEDIUM PRIORITY:
1. **Conversations Page** - Channel labels, pagination
2. **Menu Management** - Spice labels, minor UI text

### LOW PRIORITY:
1. **Table Bookings** - Minor tooltips
2. **Staff** - Tooltips only

---

## Implementation Guide

For each file:
1. Import `useLanguage` hook: `const { t } = useLanguage();`
2. Replace hardcoded strings with: `t('namespace.key', 'fallback text')`
3. Add corresponding Arabic translations in your locale files

Example:
```typescript
// Before
{ label: 'All Orders', value: 'all' }

// After
{ label: t('orderManagement.tabs.all', 'All Orders'), value: 'all' }
```

---

## Translation Key Naming Convention

Follow the existing pattern: `area.subarea.item`

Examples:
- `orderManagement.tabs.all` → "All Orders"
- `orderManagement.channel.voice` → "Voice"
- `notifications.event.newOrder` → "New Order Received"
- `notifications.category.orders` → "Orders"
- `emailSettings.pageTitle` → "Platform Email (SMTP)"

---

## File Modification List

Files needing updates:
1. `/src/app/(dashboard)/order-management/components/OrdersTable.tsx` - STATUS_TABS, BULK_STATUS_OPTIONS, CHANNEL_CONFIG, CHANNEL_FILTERS
2. `/src/app/(dashboard)/conversations/page.tsx` - channelCfg labels
3. `/src/app/(dashboard)/menu-management/ItemDrawer.tsx` - SPICE_LABELS
4. `/src/app/(dashboard)/notifications/page.tsx` - defaultPrefs array
5. `/src/app/(dashboard)/notifications/preferences/page.tsx` - same defaultPrefs
6. `/src/app/(dashboard)/admin/email-settings/page.tsx` - entire page
7. `/src/app/(dashboard)/table-booking-management/components/TimelineView.tsx` - minor tooltips

---

Generated by: Claude Code Analysis
Date: 2026-05-30
Total files analyzed: 25+
Total hardcoded strings identified: ~150+
