Repository navigation
fix(i18n): replace raw error string interpolation with localized fallbacks - #353
Merged
Merged
Conversation
Failure toasts and inline error states now always render a localized t() fallback instead of interpolating raw backend error/message strings or JS error messages. Backend, logs, and telemetry keep English. Adds cloudDeletionFailed, cloudDeletionCancelFailed, verificationEmailFailed, and printTest.kotDisabled keys in en/es/pt/fa. Refs #241
…ocalized error fallbacks
18 tasks done
khaira777
added a commit
that referenced
this pull request
Aug 17, 2026
* fix(i18n): localize remaining raw backend error/message surfaces Sweep leftover user-facing English that PR #353 missed: the POS printer support-error card (heading, body, Get help/Dismiss, queued toast), the import success toast, the support submit toast, and the PrinterStatus lastError string. Raw English is kept only in telemetry payloads and detection logic, never rendered to the user. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <[email protected]> * no-mistakes(document): Localize remaining UI error surfaces and pass lint checks --------- Co-authored-by: Codebuff <[email protected]>
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
Localize all remaining user-facing error surfaces in the frontend so customers never see raw English backend error/message strings or JS error messages. The chosen approach is 'localized fallback only': failure toasts and inline error states render a localized t() fallback instead of interpolating raw error text, with no backend reason/code changes (backend, logs, and telemetry stay English). This completes the remaining 'Still English-only' items from the Iran/Persian locale effort (#241); TaxConfigurationPanel and the server-standalone page were already localized in earlier PRs, and web-print.ts is intentionally left for Batch H. Four new i18n keys were added in en/es/pt/fa. Backend-side English error strings that are used only for logic/telemetry (e.g. KDS 'kds is disabled' regex matching, printer error telemetry) were intentionally kept.
What Changed
t()fallback strings.README.md.Risk Assessment
✅ Low: The change safely replaces raw English error interpolation with localized fallback strings across frontend error surfaces while preserving backend logic, logging, and telemetry.
Testing
Executed automated translation integrity suites, RTL screen regressions, and Playwright end-to-end browser tests with mock backend error injections (HTTP 400/409/429/500), verifying that frontend error surfaces display localized fallbacks across en/es/pt/fa without leaking backend messages, and captured reviewer-visible screenshots into the evidence directory.
/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-login-fallback-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-login-fallback-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-login-fallback-es.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-login-fallback-pt.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-login-lockout-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-recover-pin-fallback-en.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-recover-pin-fallback-es.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/error-recover-pin-fallback-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/settings-store-rtl-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4/settings-health-check-dialog-rtl-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/localize-error-fallbacks.spec.ts- new test file written by agent: frontend/e2e/localize-error-fallbacks.spec.tsnpm run test:translationsnpm run test:rtl-foundationnpm run test:rtl-setup-auth-settingsnpm run test:rtl-dashboard-pos-commonnpm run test:rtl-kds-server-whatsappnpm run test:currencyEVIDENCE_DIR=/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4 npx playwright test e2e/localize-error-fallbacks.spec.tsEVIDENCE_DIR=/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M08KC186JQ29G9DS41MZFZH4 npx playwright test e2e/rtl-setup-auth-settings.spec.ts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.