Repository navigation
feat: add Marathi (mr) locale support - #1498
Conversation
Add complete Marathi (mr, mr-IN, मराठी) translation coverage across all 3,477 leaf keys in mr.json, register mr in the language registry, add Marathi seed data for Express and Demo modes, regenerate backend print labels, extend locale test matrices, and update language documentation. Fixes #1473
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
PR Summary by QodoAdd Marathi locale across FloCafe
AI Description
Diagram
High-Level Assessment
Files changed (24)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt |
…main/setup/seed-data.ts`, `main/status-messages.ts`, and `tests/print-kernel.test.ts` that caused `Lint & Build Validation (Linux)` and `Required Checks Gate` to fail. Verified with `node scripts/ci/check-changed-format.cjs --base 76eaf82`, `npm run lint`, `npm run lint:budget`, `npm run build`, `npm run build:frontend`, `npm run i18n:check`, `npm run docs:check`, `npm run test:print-kernel`, `npm run test:status-messages`, `npm run test:script-coverage`, and `git diff --check`
Intent
Implement full Marathi (
mr,mr-IN,मराठी) language support across the entire FloCafe application, including the main POS app, KDS, Server App, Customer Display, Setup, Settings, thermal print/KOT labels, WhatsApp plain-text reports, and sample seed data.Fixes #1473
What Changed
mr,mr-IN,मराठी) locale infrontend/src/lib/i18n/languages.tsand added the complete 3,599-key message catalog infrontend/src/lib/i18n/messages/mr.json.main/print/print-labels.generated.ts), localized restaurant sample seed data (main/setup/seed-data.ts), and startup/shutdown status messages (main/status-messages.ts).Risk Assessment
✅ Low: All Marathi (mr, mr-IN) locale additions, status messages, print labels, seed data, documentation updates, and test coverage are complete and consistent with no remaining defects.
Testing
Built the backend and static frontend export, ran all targeted i18n, print-kernel, print-label, receipt, setup-seed, RTL/LTR, localized-error, locale-chunk, and WhatsApp report suites, and drove the live application via Playwright across Setup, POS, Dashboard, Settings, Print-Test, standalone KDS, standalone Server App, and Customer Display in Marathi (
mr/mr-IN) with visual screenshot and HTML receipt evidence captured in the evidence directory; all checks and live scenarios passed.Evidence: Rendered HTML receipt in Marathi UI (mr-IN) for an Argentina tenant
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 4 issues found → auto-fixed ✅
frontend/src/lib/i18n/languages.ts:200- Marathi ('mr', 'mr-IN') is registered in LANGUAGES (frontend/src/lib/i18n/languages.ts:200), but main/status-messages.ts:299 was not updated with a 'mr' entry in TABLES. At runtime, resolveStatusLanguage('mr') and resolveStatusLanguage('mr-IN') in main/status-messages.ts:308-319 fall back to 'en', so getStatusMessage(key, 'mr') (main/status-messages.ts:321-323) renders English instead of Marathi across all 8 native Electron startup/shutdown status window messages (starting, checking, backingUp, services, welcome, closing, shutdownBackup, saved). In addition, tests/status-messages.test.ts:37-38 asserts that every locale in frontend/src/lib/i18n/languages.ts is present in STATUS_LANGUAGES and will fail on 'mr' (see also docs/guides/adding-a-language.md:102-109).frontend/src/lib/i18n/messages/mr.json:1- Adding frontend/src/lib/i18n/messages/mr.json increases the number of locale files in frontend/src/lib/i18n/messages/ from 26 to 27, but tests/reports-whatsapp.test.ts:285 still asserts assert.equal(localeFiles.length, 26, 'the full-report localization test covers all supported locales') and will fail with 27 !== 26.frontend/src/lib/i18n/messages/mr.json:2738- 26 strings in frontend/src/lib/i18n/messages/mr.json encode the Marathi independent vowel 'ॲ' (U+0972 DEVANAGARI LETTER CANDRA A) as the decomposed ZWJ sequence 'अ\u200dॅ' (U+0905 + U+200D ZERO WIDTH JOINER + U+0945) instead of canonical 'ॲ' used in the earlier sections of mr.json. For example, setup.masterPinRecoveryNote (frontend/src/lib/i18n/messages/mr.json:2738) quotes auth.forgotPasswordLink using 'अ\u200dॅक्सेस', which does not match auth.forgotPasswordLink at frontend/src/lib/i18n/messages/mr.json:38 ('ॲक्सेस'). Sibling occurrences in frontend/src/lib/i18n/messages/mr.json:2738, 2751, 2812, 2818, 2830, 2853, 2854, 2880, 2905, 2922, 2923, 2924, 2925, 2927, 2928, 2929, 2950, 2996, 3070, 3126, 3165, 3176, 3287, 3290, 3293, and 3302. In addition, mrFallbackErrors in tests/translations.test.ts:2552-2573 does not reject invisible formatting characters (/[\u200B\u200C\u200D\u00AD\uFEFF]/u) or test NFC/invisible-character negative fixtures in runNegativeTests (tests/translations.test.ts:3892-3903; see also docs/guides/adding-a-language.md:68).README.md:197- Several documentation and comment locations touched in this branch retain pre-Marathi locale counts or lists: README.md:197 still says '26 localized languages' while listing 27 languages at README.md:208-248; docs/guides/adding-a-language.md:132-138 still lists '25 of 26', 'All 26', '22 of 26', and '20 of 26' even though those 6 test suites were updated to 27 in this branch; docs/reference/translation-terminology.md:58 lists ha.json, jv.json, ne.json, ru.json, and th.json for NFC enforcement while omitting mr.json (which is enforced at tests/translations.test.ts:2566 and listed in docs/guides/adding-a-language.md:67); and the header comment in tests/translations.test.ts:68-70 stops at item 25 (Javanese safeguards) without listing item 26 (Marathi safeguards).🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
npm run test:translationsnode scripts/generate-print-labels.cjs --checknpm run test:print-labelsnpm run test:print-kernelnpm run test:status-messagesnpm run test:browser-receiptsEVIDENCE_DIR=~/.no-mistakes/evidence/01M6THGXTHQ35YMZWYSKZ5TFCE npm run test:decoupled-ui-localenpm run test:i18n-audit-remediationsnpm run test:rtl-dashboard-pos-commonnpm run test:rtl-kds-server-whatsappnpm run test:rtl-setup-auth-settingsnpm run test:phase7-setup-i18nnode tests/run-electron-node-test.cjs tests/reports-whatsapp.test.tsnpm run test:issue-241-localized-errorsnpm run build && npm run build:frontend && npm run test:locale-chunkscd frontend && E2E_BASE_URL=http://127.0.0.1:4301 E2E_KDS_BASE_URL=http://127.0.0.1:4302 E2E_SERVER_APP_BASE_URL=http://127.0.0.1:4303 npx playwright test e2e/phase7-setup-print-i18n.spec.ts --config=playwright.config.ts --project=chromiumLive Playwright browser walk across/setup,/pos,/dashboard,/settings,/print-test,/kds-standalone,/server-standalone, and/customer-displayin Marathi (mr/mr-IN) with screenshot capture into~/.no-mistakes/evidence/01M6THGXTHQ35YMZWYSKZ5TFCE✅ **Document** - passed
✅ No issues found.
markdownlint-cli2,oxlint, oroxfmtCLI binaries becausenode_modulesis not installed in this isolated worktree and those tools are not on PATH; verified documentation structure, relative links, index completeness, policy checks, andoxfmtformatting rules (100-column width, 2-space indent) manually and vianode scripts/docs/check-docs.cjsandgit diff --check.✅ **Push** - passed
✅ No issues found.