Repository navigation
feat(i18n): complete Persian translation coverage and terminology - #335
Merged
Merged
Conversation
Translate the remaining 740 English-identical and 18 still-English fa.json
values (settings, WhatsApp, print-test, products, setup, pos, common), apply
the contributor-confirmed Economic Code terminology (کد اقتصادی) to the tax
identifier labels, and fix pre-existing broken values found by the audit:
swapped pos pax increase/decrease labels and garbled or mixed-language staff
namespace strings.
Add two regression guards to tests/translations.test.ts: fa.json values must
not fall back to an identical English value (small allowlist for brand names,
format strings, examples, measurements), and fa.json must keep the same
{param} placeholders as en.json.
Refs #241
18 tasks done
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
Complete the Persian (fa-IR) translation coverage in fa.json to full English key parity, apply the contributor-confirmed Iranian Economic Code terminology (کد اقتصادی) through the i18n system, fix pre-existing broken or incorrect Persian values found in the audit, and add regression guards so fa.json cannot silently fall back to English values or drop interpolation placeholders. Do not enable Persian in Setup/Settings selectors, do not change RTL layout, locale/accounting policy, or printing.
What Changed
fa-IR) translations infrontend/src/lib/i18n/fa.jsonto achieve full key parity with English, adopted Iranian Economic Code (کد اقتصادی) terminology for tax identification fields, and fixed inverted pax controls and corrupt staff strings.tests/translations.test.tsto prevent untranslated English fallbacks infa.jsonand ensure placeholder interpolation parity withen.json.Risk Assessment
✅ Low: The changes are low-risk translation string updates in fa.json and declarative integrity checks in tests/translations.test.ts without modifications to runtime application logic, selectors, RTL layout, or printing.
Testing
Executed the translation integrity test suite (
npm run test:translations) verifying 100% key parity across 1,688 keys, absence of duplicate keys, malformed values, undefined keys across 1,329 frontend t() calls, and placeholder alignment. Verified mutation detection in translation regression guards, ran full Next.js frontend compilation, executed behavioral tests for parameter interpolation and Iranian Economic Code terminology, confirmed exclusion of Persian from user selectors, and captured high-resolution visual screenshot artifacts./var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06MGQJVCEH5H6YR7386DJ6N/persian_ui_verification_showcase.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06MGQJVCEH5H6YR7386DJ6N/persian_economic_code_terminology.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06MGQJVCEH5H6YR7386DJ6N/persian_pos_pax_controls.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M06MGQJVCEH5H6YR7386DJ6N/persian_staff_management_modal.png)Evidence: Rendered Persian UI HTML showcase artifact
Evidence: Persian translation behavioral verification execution log
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm run test:translationsts-node --transpile-only -P tests/tsconfig.json tests/translations.test.tscd frontend && npx next buildMutation testing of translation regression guards (verifying failure detection for untranslated strings and mismatched placeholders)Runtime behavioral validation of t() parameter interpolation and ICU plural rules for fa-IRPlaywright end-to-end visual rendering and screenshot capture of Persian UI components✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Refs #241