Repository navigation
refactor(i18n): migrate KDS and Server App components to use-intl - #402
Merged
Merged
Conversation
Phase 3 batch 5D (issue #379). Replace useI18n()/t() with useTranslations() across the dashboard and standalone KDS pages, the Server App page, seven KDS components, and the useKdsConnection hook. STATUS_CONFIG.labelKey and ORDER_TYPE_LABEL_KEYS are now exhaustively typed leaf-key maps; the order-type badge renderers and the server-app toastApiError bridge handle the dynamic dotted-key cases. KdsHtmlLang and useServerKdsInfo already used registry helpers/server-sync and needed no change. No wording or logic changes; the legacy bridge remains for batch 5E.
This was referenced Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Migrate the Kitchen Display System (dashboard-embedded /kds and standalone /kds-standalone pages), the Server App standalone page, and the associated KDS components and connection hook from the legacy useI18n()/t() flat-key API to use-intl useTranslations(), completing Phase 3 batch 5D (issue #379) of the i18n migration epic (#372).
Scope is the KDS/Server App surface: the 3 pages (kds/page.tsx, kds-standalone/page.tsx, server-standalone/page.tsx), the 7 KDS components (KdsColumn, KdsHeader, KdsItemModal, KdsKanbanBoard, KdsLoginForm, KdsTabsView, KdsHtmlLang), the useKdsConnection hook, and the shared order-types map. KdsHtmlLang and useServerKdsInfo already use registry helpers / server-sync and required no functional change.
Key decisions:
Constraints: no wording, logic, WebSocket lifecycle, reconnection timing, server language inheritance, or RTL behavior changes; no new dependencies or migrations; the legacy useI18n bridge stays for the remaining batch 5E (#380) and is removed by #381; the two e2e assertions pinning setup/fa behavior must not be altered.
What Changed
/kds,/kds-standalone), Server App (/server-standalone), and related KDS components (KdsColumn,KdsHeader,KdsItemModal,KdsKanbanBoard,KdsLoginForm,KdsTabsView) from legacyuseI18n()flat keys touseTranslations()fromuse-intl.ORDER_TYPE_LABEL_KEYSanduseKdsConnectionSTATUS_CONFIGmappings to exhaustively typedordersandkdsnamespace leaf keys.frontend/e2e/i18n-batch-5d.spec.tsverifying localized rendering and layout across KDS and Server App views in English, Spanish, and Persian (RTL).Risk Assessment
✅ Low: The migration from legacy flat-key useI18n to typed use-intl useTranslations across KDS and Server App surfaces is cleanly implemented with exhaustively typed leaf keys and no behavioral regressions.
Testing
Executed comprehensive targeted validation covering translation schema parity, leaf key safety, RTL/LTR layout invariants, KDS contract tests, and Playwright end-to-end flows. Captured visual screenshots across all migrated surfaces (KDS Login, Tabs View, Item Modal, Kanban Board, Server App Login, and Server App Tableside Ordering) in both English and Persian (RTL) with all checks passing.
/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-login-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-login-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-tabs-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-tabs-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-item-modal-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-item-modal-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-kanban-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/kds-kanban-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/server-login-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/server-login-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/server-standalone-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M0D9465DMYWJPCZS0XR240HB/server-standalone-fa.png)Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
frontend/e2e/i18n-batch-5d.spec.ts- new test file written by agent: frontend/e2e/i18n-batch-5d.spec.tsnpm run test:translationsnpm run test:rtl-kds-server-whatsappnpm run test:kds-integrationnpm run test:kds-contractnpm run test:kds-frontend-conflictnpm run test:kds-window-hardeningnpx playwright test e2e/kds-login.spec.tsnpx playwright test e2e/kds-kanban-skip-confirm.spec.tsnpx playwright test e2e/i18n-batch-5d.spec.ts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.