Aman-Mittal commented on PR #625:
URL: 
https://github.com/apache/fineract-backoffice-ui/pull/625#issuecomment-5848645427

   CI caught something the local `mocked` run could not: the `mobile` project's 
`date-picker-revisit` spec visits `/accounting/closures`, which no `mocked` 
spec does, and the gate reported five raw keys there — `Office`, `Closing 
Date`, `Comments`, `Status`, `Actions`.
   
   Working as intended, and a defect worth having found. Two commits added:
   
   **`fix(i18n): give table column headers translation keys`**
   
   `data-table.component.ts` renders every column header as `col.label | 
translate`, which makes `ColumnDef.label` a translation key by contract while 
its type stays `string`. Eight components filled it with English. Each reached 
`translate()`, missed, and rendered the phrase back unchanged — 
indistinguishable from working until the language changes.
   
   47 labels across 8 files. **42 already had a key**: 
`ACCOUNTING_CLOSURES.CLOSING_DATE` existed and the component simply was not 
naming it. 12 keys are new.
   
   **`ci(i18n): reject ColumnDef labels that are phrases`**
   
   The eight were caught by luck — one mobile spec happens to open that screen. 
A phrase label on a screen no spec visits would sit there indefinitely, so this 
adds a fourth static check (`PHRASES`) that does not depend on e2e coverage. 
Verified it fails by reverting one label.
   
   That check's first report was itself a finding: `collectFiles` still 
excluded `.spec.ts`, but ADR 0004 moved the suite to Vitest and no `.spec.ts` 
files remain — so all 251 `.test.ts` files were being scanned and a fixture's 
`label: 'Name'` was being read as a real reference. Now excluded.
   
   ### Re-verified
   
   - `npm run lint`, `npm run format:check`, `npm run check:nav-ids` — clean
   - `npm run i18n:check` — all four checks pass
   - `npm run test:unit` — 1576 passed
   - `npx playwright test --project=mobile e2e/date-picker-revisit.spec.ts` — 6 
passed (was 2 failed)
   - Combined `mobile` + `mocked` run in progress; I will report it here rather 
than assume it.
   
   ### Split out
   
   #627 covers three screens (`working-days`, `loan-schedule-modify`, 
`system-status`) that hold English in `label:` but render it with **no 
translate pipe at all**. They never miss, never render a raw key and never fail 
this gate — they are simply untranslatable. Different defect, different fix, so 
it is not folded in here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to