HOCO B2B
Team tasksImad

MOB-07 — Localisation & formatting

ARB files (fr now; ar and en scaffolded), RTL-safe layouts, DZD money and date formatting helpers.

FieldDetails
Task codeMOB-07
PhaseP0 — Foundations (cadrage, UX/UI, architecture & contract)
Product scopeV1
StatusPlanned
StartTue 20 Oct 2026
DueTue 20 Oct 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort0.5 person-day(s) planned · 2 from scratch · size XS
Area · appMobile foundation · mobile
Depends onMOB-01
Unblocks—
Milestones—

Summary

ARB files (fr now; ar and en scaffolded), RTL-safe layouts, DZD money and date formatting helpers.

Description

Both apps ship in French in V1 but Arabic (RTL) and English must be possible without refactoring (NFR-06), and every amount, date and phone must be formatted the same way everywhere. Scope: hoco_l10n with ARB files (fr template, ar and en scaffolded), generated localisations, enum labels taken from enums.json, client fallback messages per error code, and helpers for DZD centimes, Africa/Algiers dates and E.164 phones; plus the RTL-safe layout rules every feature follows. Translation of Arabic copy is out of scope. It needs the enum list from the spec (already in enums.json) and, later, final microcopy from Akram's screens. Every feature task uses these formatters and keys; MOB-17 verifies RTL readiness with them.

Subtasks

#SubtaskOwner
1hoco_l10n package with l10n.yaml, app_fr.arb as template, app_en.arb filled, app_ar.arb scaffolded with the same keys; flutter gen-l10n wired into melos genImad
2tool/gen_enum_labels.dart generating French labels and tones from content/spec/enums.json (e.g. OrderStatus.VALIDATED → « Validée », StockAvailability.OUT_OF_STOCK → « En rupture ») with an unknown-value fallbackImad
3Client fallback messages per error code (network « Pas de connexion internet », GPS_OUT_OF_TOLERANCE, ACCOUNT_PENDING_VALIDATION…) used when the server message is missingImad
4Money helpers: formatDzd(centimes) → « 1 250,00 DA », compact KPI form, and parsing of typed amounts into integer centimesImad
5Date helpers on the timezone package: formatDate/formatDateTime in Africa/Algiers, relative times (« il y a 5 min »), algiersBusinessDay(utc) for tours and objectivesImad
6Phone helpers: normalise 0555…, 555… and +213… to E.164 and display as « 0555 12 34 56 »Imad
7LocaleController provider (fr default; ar and en behind a debug/feature flag in V1) persisted locally and pushed to the API via Accept-LanguageImad
8RTL rules: EdgeInsetsDirectional / AlignmentDirectional only, a custom lint or grep check in CI banning EdgeInsets.only(left/right) in feature codeImad

Deliverables

  • packages/hoco_l10n/lib/l10n/app_fr.arb, app_en.arb, app_ar.arb
  • packages/hoco_l10n/lib/src/format/money.dart, date.dart, phone.dart
  • packages/hoco_l10n/tool/gen_enum_labels.dart and the generated enum_labels.g.dart

Acceptance criteria

  • formatDzd(125000) renders « 1 250,00 DA » (narrow no-break space as thousands separator)
  • 2026-11-03T23:30:00Z renders as 4 nov. 2026 at 00:30 and belongs to business day 2026-11-04 (Africa/Algiers)
  • « 0555 12 34 56 » normalises to +213555123456
  • Every value of every enum in enums.json has a French label; an unknown value shows a generic label without crashing
  • Switching the locale to ar mirrors layouts (Directionality RTL) without overflow on the gallery screens (NFR-06)

Requirements covered

RequirementTitleRelease
NFR-06French in V1; Arabic (RTL) and English prepared from day oneV1

Test measures

  • Unit tests for money, date (including the UTC → Algiers day boundary) and phone helpers
  • CI check that all ARB files have the same keys and that enum labels match enums.json
  • Golden of one sample screen in fr (LTR) and ar (RTL)

Risks

  • Arabic copy will not exist in V1 — keep ar behind a flag and use pseudo-localisation to catch truncation early

KPI

  • Delivered by Tue 20 Oct 2026 within 0.5 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page