# Demo Label Reconciliation — Arabic Alignment Wave

**Date:** 2026-07-26
**Source of truth:** demo i18n bundles `Navagoo_MI/navagoo-app/src/i18n/{en,ar}.ts`
(3044 leaf strings each, key-for-key parity).
**Target:** portal Yii flat maps `common/messages/{ar,en}/{backend,frontend}.php`.

## What this wave did

1. Flattened the demo's nested `en.ts`/`ar.ts` into a normalized
   `english-leaf → arabic-leaf` dictionary (2341 concepts; 2256 unambiguous,
   85 context-dependent left untouched).
2. **Arabic values only** were realigned to the demo's phrasing/register where our
   English **key** exactly matched a demo English leaf and the demo's Arabic differed.
   No keys added/removed (parity gate preserved). Placeholders preserved.
   - `common/messages/ar/frontend.php` — **215** Arabic values realigned.
   - `common/messages/ar/backend.php` — **248** Arabic values realigned.
3. Added the pending key
   `'This payment method is currently unavailable. Please choose another.'`
   to both `en/frontend.php` (self) and `ar/frontend.php`
   (`طريقة الدفع هذه غير متاحة حاليًا. يرجى اختيار طريقة أخرى.`).

Demo leaves that the demo itself left untranslated (English text in the Arabic
bundle, 32 of them) were **skipped** — we do not propagate a non-translation.

## English keys — NO renames applied (this section is for your decision)

The English `=>` values and keys were **not** modified (renaming a key breaks every
`Yii::t()` call site). This section records where the demo's English **spelling**
differs from ours, so you can decide whether to standardize.

### Key finding: there are ZERO genuine wording differences

Every one of the 134 concept matches where the demo's English surface form differs
from ours is a **capitalization-only** difference. Our English keys already match the
demo's terminology word-for-word — only the casing convention differs:

- **Portal convention:** Title Case for labels (`Booking Status`, `Payment Methods`,
  `Save Changes`).
- **Demo convention:** sentence case leaves (`Booking status`, `Payment methods`,
  `Save changes`) — a natural artifact of the demo's namespaced-key style.

No rename is required for terminology parity. A rename here would be a **pure
style/casing normalization**, high-churn and low-value, and every one is a breaking
key change touching live `Yii::t()` call sites.

### Notable case-only differences (portal key · demo English · exact call-site count)

Call-site count = occurrences of the exact quoted literal in `*.php`/`*.js`
(excluding the message files themselves).

| Portal key (unchanged) | Demo English | Call sites | Tier |
|---|---|---|---|
| `Save Changes` | `Save changes` | 27 | backend |
| `Promo Code` | `Promo code` | 24 | backend, frontend |
| `In Progress` | `in progress` | 24 | backend, frontend |
| `Discount Value` | `Discount value` | 23 | backend, frontend |
| `No Show` | `no show` | 18 | backend, frontend |
| `Booking Status` | `Booking status` | 16 | backend, frontend |
| `Payment Processing Fee` | `Payment processing fee` | 16 | backend, frontend |
| `Sign In` | `Sign in` | 14 | backend, frontend |
| `Confirm Password` | `Confirm password` | 14 | backend, frontend |
| `Full name` | `Full Name` | 11 | backend, frontend |
| `Verification Code` | `Verification code` | 9 | backend, frontend |
| `Pending Approval` | `Pending approval` | 7 | backend, frontend |
| `Start Date` | `Start date` | 7 | backend |
| `End Date` | `End date` | 7 | backend |
| `Net Earnings` | `Net earnings` | 3 | backend, frontend |
| `Payment Methods` | `Payment methods` | 4 | backend, frontend |
| `Included Services` | `Included services` | 4 | backend |
| `Linkedin` | `LinkedIn` | 10 | backend |

Other high-frequency single-word case flips (`Shop`/`shop`, `Active`/`active`,
`New`/`new`, `Email`/`email`, `Paid`/`paid`, `Pending`/`pending`, `Completed`/
`completed`, `Male`/`male`, `Female`/`female`, `Monthly`/`monthly`, `None`/`none`,
`Returning`/`returning`, `Live`/`LIVE`) exist too. Their raw substring counts run
into the hundreds/thousands, but that is mostly noise (`Shop` matches
`ShopController`, `shop_id`, etc.) — they are common labels, not distinct concepts
worth a breaking rename.

**Recommendation:** leave the English keys as-is. Terminology already matches the
demo; casing is a cosmetic house-style choice and renaming would churn 130+ keys
across live call sites for no functional gain. If a single casing standard is
desired later, do it as its own dedicated pass with a codemod that updates keys +
call sites atomically, not piecemeal.

## Verification

- `php -l` clean on all touched files (`ar/frontend.php`, `ar/backend.php`,
  `en/frontend.php`).
- i18n parity (mirrors `.claude/hooks/i18n-check.sh`) — en/ar key counts identical
  per category, 0 missing keys, 0 untranslated Arabic values:

  | Category | en keys | ar keys | before → after |
  |---|---|---|---|
  | frontend | 1953 | 1953 | 1952 → 1953 (+1 pending key, both sides) |
  | backend | 3413 | 3413 | 3413 → 3413 (values only) |
  | common | 232 | 232 | untouched |
