mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5827] Move non-English UI locale packs to their own branch, like docs-i18n #3213
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3213
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Sep 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5827
Originally assigned to: @SpicyMarinara on GitHub.
In one sentence: move the non-English UI locale packs out of the main branch into their own container the way
docs/translations live ondocs-i18n, so feature PRs stop having to carry translation work and translators can catch up in batches instead.What the tax actually is today
Worth being precise, because it is narrower than "every PR must ship translations" but sharper where it bites:
Adding a string is already free. A key missing from a pack falls back to English, and
check-locales.mjsonly reports coverage for it ([localization] pl: 591/9167 keys (6%)).Renaming or deleting a key is not free.
check-locales.mjsthrows on unknown keys — any key still present in a pack that no longer exists inen.jsonfailspnpm checkoutright:So a PR that renames one UI string has to sweep eleven packs — including
ko.jsonandzh-Hans.json— before it can go green. That is the part that turns a small UI change into a translation chore.Weight and noise. The non-English packs are about 1.9 MB across eleven files (
ko923 KB,zh-Hans805 KB,pl55 KB,de51 KB, then eight smaller ones) againsten.json's 860 KB. Every clone, diff, and review carries them, and translation churn sits in the same diffs as feature work.Why the
docs-i18nshape fitsdocs-i18nalready solves the same problem for prose: one folder per language on a separate branch, a generatedmanifest.json, packs downloaded into the data folder on demand, and English fallback so features are never blocked on translation. The catch-up workflow ([docs-i18n] <paths>follow-ups) is exactly the batching being asked for here.The part that makes this smaller than it sounds
The UI packs are already runtime assets, not bundled JSON.
locale-loader.tsglobs them as URLs:which is why the build emits them as standalone files (
dist/assets/ko-DoyObuap.jsis a 0.06 kB shim next to a 923 kB.json). The app already fetches the selected language over HTTP at runtime and already degrades per-key to English. Serving those files from the data folder — where docs packs already land — is a change of location, not an architecture change.Questions for the maintainer
These are the decisions that shape the work; happy to implement once they are called:
docs-i18nwith aui/subtree, or a separateui-i18nbranch? One branch means one catch-up cadence and one place for translators; two keeps the validators and manifests from having to understand both shapes.check-locales.mjsin the main repo validatesen.jsonalone, and a pack validator mirroringscripts/docs-i18n/validate-pack.mjs+build-manifest.mjsmoves to the i18n branch. Should coverage percentages still surface somewhere visible so packs do not rot unnoticed?CONTRIBUTING.md § Localizationanddocs/development/localization.mdboth describe the current in-repo layout, anddocs/development/localization.mddocuments a downloadable Agent handoff that would need repointing.What this does not change
English stays canonical and in-repo,
localization:ui-checkstill catches hard-coded JSX strings, and the fallback behaviour users see is the same one they see today for any untranslated key.Decisions (maintainer, 2026-09-04)
Answered, so this is now a plan rather than a proposal:
docs-i18n. UI packs go in a top-levelui/folder (ui/ko.json,ui/de.json, …) rather than inside each language folder:build-manifest.mjs/validate-pack.mjsare scoped to a language pack directory and hash everything in it, so aui.jsonliving insideko/would be swept into the docs manifest. A siblingui/folder leaves the existing docs tooling untouched, while translators still have one branch and one cadence.check-locales.mjsstays in the main repo and validatesen.jsonalone (canonical catalog, plus the existinglocalization:ui-checkfor hard-coded JSX strings). Aui/pack validator and the coverage report live ondocs-i18nnext to the docs validators, so a pack that rots is visible where translators work.CONTRIBUTING.md § Localizationanddocs/development/localization.mdcurrently document the in-repo layout andpnpm localization:check; after the move they need to describe theui/packs and the catch-up workflow the way CONTRIBUTING already documentsdocs-i18n.docs/development/localization.mdalso describes a downloadable Agent handoff that points at the in-repo path.Notes for whoever implements
docs-i18ncurrently carries ten language folders (de es fr hi ja ko pl pt-br ru zh-hans); the app ships eleven non-English UI packs —arexists in the app but has no docs pack.ui/can carryarregardless.pt-br,zh-hans) while the app's packs arept-BR.json,zh-Hans.json. The loader canonicalises filenames throughIntl.getCanonicalLocales, but keeping the app's casing inui/avoids relying on that.locale-loader.tsalready fetches packs by URL, so the work is pointing it at the downloaded pack directory (as the docs viewer does) and adding the download/refresh affordance next to the existing UI-language setting.Rollout (maintainer, decided)
One PR. The download path lands and the in-repo packs are deleted in the same change — no interim release carrying both copies, and no follow-up deletion PR.
Accepted consequence: anyone currently on a non-English UI drops to English on upgrade and re-selects their language to download the pack. That is a one-time minor inconvenience and worth it for the development cycle.
Implementation note that follows from this: the loader must treat "the selected language is no longer present locally" as a normal state, not an error — fall back to English cleanly and point the user at the download, rather than rendering blank or throwing. That path is exercised by every existing non-English user on the upgrade, so it is the first-run case, not an edge case.
arcontext: an Arabic docs pack is planned and has simply kept slipping, so a UI pack existing without a docs counterpart is expected and fine.@SpicyMarinara commented on GitHub (Sep 5, 2026):
Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.
@SpicyMarinara commented on GitHub (Sep 5, 2026):
Completed on staging in #5865 (merge
314a71a586).Moved community UI packs to docs-i18n/ui and added explicit download/refresh with offline installed-pack reuse. The content companion #5866 is also merged; Polish, German, and Arabic downloads were verified.
Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.