I’ll add a dedicated Administrator portal to the app: admin role, owner approval workflow, global monitoring dashboards, branch oversight, and platform settings/parameters. First I’m reviewing the auth/store so I can wire it cleanly across the existing owner, driver, and restaurant flows.
The language system is wired in and building cleanly. I’m finishing by updating the shared order-status strings so the timeline/status chips switch language too, then I’ll confirm the final build.
I changed the shared order helpers to use translation keys. Now I’m updating the customer, owner, driver, and restaurant screens to render those keys through t(), then I’ll rebuild.
I’ve updated the shared order model to use translation keys. Now I’m wiring those keys into the screens that consume status/timeline labels.
The translation-key refactor touched shared helpers, so I’m checking the affected files and fixing the local t() scope/usages directly.
I found the remaining scope issues: the translated status labels are used inside nested components, so each of those components needs its own useT() hook. I’m applying that now.
A couple of nested components still missed their useT() injection. I’m reading those exact spots and fixing them precisely.
I found a missing useT() inside OrderCard, plus a leftover untranslated status label in the driver delivery card. I’m fixing those and removing a few now-unused t hooks.
I still have one missed insertion in OrderCard, so I’m reading that exact block and applying a final narrow fix, along with the one remaining driver status label.
I see the exact spots. Applying the last two fixes now.
The remaining driver error is just the local useT() hook inside the active-delivery card. I’m adding it and then running the final build.
I found it. Adding the hook now.
Build succeeded.
I added a working English / Spanish language switcher with:
What’s included
- Global i18n provider:
src/i18n.tsx
- Persistent language preference in localStorage
- Automatic browser-language detection on first visit
- Reusable
LangSwitch component with EN/ES toggle
- Language switchers added to:
- Auth screen
- Customer app header
- Owner portal header
- Driver app header
- Restaurant terminal header
Translated now
- Auth screen core text
- Customer home hero
- Customer orders heading and status/timeline labels
- Shared order status labels and ETA text through
utils/order.ts
- Status pills/timeline in customer, owner, driver, and restaurant flows
Architecture
- Central dictionary for both languages
- Typed translation keys
- Variable interpolation support like
{name}, {amount}, {count}
This gives the app a real language system and visible EN/ES switching across the main shell and shared order-status flows.
Files built: src/utils/order.ts, src/customer/orders.tsx, src/owner/OwnerApp.tsx, src/driver/DriverApp.tsx, src/restaurant/RestaurantApp.tsx