Repository navigation
Open
Labels
area: localizationTranslations, language packs, locale formatting, fontsdocumentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is neededneeds designNeeds design notes or acceptance criteria before code PRs
Description
What are you trying to do?
Shops should be able to use Posnic in their own language, and contributors should be able to improve translations without touching business logic.
This issue is for the localization foundation: translation key structure, contribution guide, missing-string detection, fonts, formatting, review process, and fallback behavior.
Non-negotiable boundaries
- Translation work must not rename persisted fields, API routes, database values, tax meanings, receipt totals, or business logic.
- English fallback must remain available everywhere.
- Language packs must be reviewable by native speakers or people who understand retail/POS vocabulary.
- UI changes must preserve usability on desktop and small laptop screens.
Required PR slices
- Inventory PR: list existing translated files, untranslated UI surfaces, current language switch path, and screens that still hardcode English.
- Key contract PR: document translation key naming, placeholder rules, plural/count handling, fallback behavior, and how feature teams add new strings.
- Extraction/check PR: add a script/test that detects missing keys, unused keys, broken placeholders, duplicate keys, and accidental English-only strings in core screens.
- Font/rendering PR: verify fonts and text rendering for supported scripts, including receipts, tables, buttons, inputs, dialogs, and reports.
- Contribution guide PR: add language-pack instructions, glossary rules, review expectations, screenshot requirements, and how to request a new language.
- Language switch PR: confirm users can select a language through a stable documented path without editing source code manually.
- Language-pack PRs: accept one language per PR after the framework and checks are ready.
Acceptance criteria
- A contributor can add a new language by adding a language file and one documented metadata entry, without editing unrelated application logic.
- Translation keys have a documented naming convention and are grouped by product area or workflow.
- Missing keys fall back to English in a predictable way and are reported by an automated check.
- Placeholder checks fail when a translation removes, renames, duplicates, or changes required placeholders for amounts, dates, counts, invoice numbers, branch names, user names, customer names, tax labels, or product names.
- The automated check can be run locally and in CI, with the command documented in the contributor quickstart or localization docs.
- Common POS screens are covered by either automated string checks or documented screenshot checks: login, dashboard, new sale, checkout/payment, products/items, customers, suppliers, reports, settings, and receipt/invoice print.
- Long translated labels do not overflow buttons, menus, table headers, dialogs, or receipt layouts at supported desktop and small laptop widths.
- Date, number, currency, and tax labels are either locale-aware or explicitly documented as not yet localized.
- Existing English UI behavior remains unchanged except where strings are intentionally moved into the translation system.
- No generated machine translation is accepted without human review for retail/POS vocabulary.
Out of scope for this issue
- Translating every language in one PR.
- Changing tax, receipt, invoice, or database semantics.
- Replacing business workflows while moving strings.
- Claiming a language is production-ready without screenshot or reviewer evidence.
Good first contributions
- Document untranslated screens.
- Add missing-key or placeholder validation tests.
- Add glossary entries for retail/POS terms.
- Fix one screen so its labels come from the translation system.
Metadata
Metadata
Assignees
Labels
area: localizationTranslations, language packs, locale formatting, fontsdocumentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is neededneeds designNeeds design notes or acceptance criteria before code PRs
Activity
sridharkalaibala commentedon Sep 1, 2026
Status update: some of this shipped today
Posting so nobody starts work that is already done. Checked against the four PR slices in the description.
Slice 1 — Inventory: mostly done
tests/tools/i18n-coverage.jsnow answers this on demand rather than as a one-off document:Tamil had been 89% complete for months without anyone knowing, because a missing key falls back silently to English.
#36 is still worth doing — a screen-by-screen checklist is a different and more useful thing than a key count.
Slice 2 — Key contract: partly done
Fallback behaviour is documented and enforced:
t(key, english)returns the English it was handed whenever a key is missing, blank, or the pack has not loaded. Key naming and how feature teams add strings are indocs/TRANSLATING.md.Still open: plural/count handling, and the placeholder rules. Nothing in the app uses placeholders in translated strings yet, so this needs designing before it needs building.
Slice 3 — Extraction and checks: done, except placeholders
--missing <lang>Plus one that was not on the list: mojibake detection. Nine Tamil strings had been shipping to the sale screen as UTF-8-saved-as-cp1252, showing
பà¯à®¤à®¿à®¯where they meantபுதிய. Invisible to a reviewer who does not read the script. Both the tool and CI now refuse it.Slice 4 — Fonts and rendering: not started
Still entirely open, and the right next design task on this issue.
What changed underneath
Translation used to happen at build time, which wrote a complete second copy of every page per language — 2.3 MB of duplicated markup to deliver 43 KB of Tamil. Pages now ship once in English carrying their keys, and the words are fetched at runtime.
Adding a language costs 43 KB and one line of config, not 2.3 MB and edits to fifteen files. That was the thing making "one language at a time" impractical.
languages/at the repository rootdocs/TRANSLATING.md— the whole job on one pagelanguages/MULTI_LANGUAGE_ARCHITECTURE.mdStill open on this issue
Merge Ask Posnic, Insights and Actions into develop for testing