Repository navigation
feat: add Brazilian Portuguese to the Console - #83
Merged
Merged
Conversation
Add pt, ptHelp and ptScreens dictionaries mirroring the Chinese ones, cycle the page toggle through en, zh and pt, and route hard-coded zh-CN formatting through localeTag(). English stays the default and the stored language is validated. Extend i18n coverage and public-locale tests to Portuguese and list the three languages in the README. Signed-off-by: EduardoAndradeMachado <[email protected]>
Keep pt, ptHelp and ptScreens out of the login and Console chunks. The language changes immediately and the store loads its catalogue on every language change, so a stalled or failed download never blocks the UI. First paint and the Console wait at most 1.5 s. English shows meanwhile, and a late catalogue re-renders mounted copy through catalogRevision. A failed download is retried on the next language change or reload. Signed-off-by: EduardoAndradeMachado <[email protected]>
EduardoAndradeMachado
force-pushed
the
feat/i18n-pt-br
branch
from
November 6, 2026 21:35
2d1f8a8 to
54dd898
Compare
EduardoAndradeMachado
marked this pull request as ready for review
November 6, 2026 21:35
Signed-off-by: Feng Ruohang <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
Vonng
added a commit
that referenced
this pull request
Nov 9, 2026
Replace the language cycle and Portuguese-only asynchronous loader with a shared dropdown and static locale registry. English remains the default and fallback; Chinese coverage is mandatory. Add French, German, Russian, Spanish, Japanese, Arabic and Turkish while preserving the Portuguese contribution from #83. Use locale-aware formatting and plural rules, mirror UI layout for Arabic, and isolate raw protocol data. Add catalog validation, contextual coverage and safe key migration tooling. Language switching works offline and preserves form state. Implements pgsty/silo#277. Validated with 775 frontend unit tests, 18 targeted layout/tooling tests, 14 final catalog regressions, type checking, formatting, dead-code checks, TestCafe TypeScript 4.9 compilation, and production bundle budgets. Signed-off-by: Feng Ruohang <[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.
Contribution Licensing (no CLA, inbound=outbound, DCO required)
This pull request contributes to PGSTY SILO Console (
pgsty/silo-console).Code contributions are accepted under
GNU AGPL v3.0 or later
(
AGPL-3.0-or-later), the same license as SILO Console.By submitting this pull request I represent that I have the right to contribute
the changes under that license and retain copyright in my original work.
No CLA, copyright assignment, or separate Apache-2.0 license grant is required.
Existing copyright and license notices remain intact; separately licensed
material keeps its applicable terms. Every commit must carry a DCO
Signed-off-bytrailer (git commit -s); seeCONTRIBUTING.md.
Description and motivation
Adds a complete Brazilian Portuguese translation of the Console. The decisions below are yours to make.
pt.ts,ptHelp.tsandptScreens.tsmirror the three Chinese dictionaries, with all 2,249 keys covered. No English source strings changed.i18n-coverageandpublic-localenow also cover Portuguese, including a check that the Console entry registers the feature copy of each translated language.zh-CNdate and number formatting goes throughlocaleTag().The new files keep the
Pigstynotice because they are translations of your dictionaries. Tell me if you prefer something else.I prepared this translation with AI assistance. Corrections from other Brazilian Portuguese speakers are welcome.
Questions for maintainers
ConsoleKBargrows from 94.30 KB to 133.73 KB for every user. The second commit (feat: load Portuguese dictionaries on demand) fetchesptandptHelponly when Portuguese is stored or chosen, andptScreensonly when the Console opens in Portuguese. With it, login is 239.78 KB andConsoleKBaris 94.32 KB. The language changes immediately and the store loads the catalogue, so a slow or failed download never blocks the UI: first paint waits at most 1.5 s, English shows meanwhile, and a late catalogue re-renders mounted copy through a newsystem.catalogRevision. Chinese still loads up front as before. If you'd rather keep everything eager, drop that commit: the first one stands on its own.web-app/README.mdasks for a separateweb: rebuild embedded GUI assetscommit. This PR does not touchbuild/, so the embedded binary won't include Portuguese yet. Should I add that commit, or do you prefer to generate it?Validation
Run on Linux with Node 24.22.1 (
.nvmrc), on a 2 vCPU VM:yarn typecheck,check-deadcode.sh,check-prettier.shandcheck-warnings.shpassed.yarn buildandyarn check:bundlepassed: 258.61 KB with the first commit, 239.78 KB with both.language-catalog,i18n-coverage,public-locale,iam-browserandresponsive.unitwith both commits passed.Trace ... at 768px en darkfailed the hover-tooltip assertion in 3 runs; the others wereacceptance-forms:455,preview-renderers:156,bucket-usage-refresh:245andff-controls:50and:531. All 761 tests passed at least once on this branch, and each failed test passed when re-run. In the last full run, on the final code, 760 passed and 1 failed (ff-controls:531, which then passed 5 of 5).Tracefailure by repeating it under CPU load (16 of 16 on each side) or with only the two files active at that moment (3 of 3). I don't know the cause, and nothing in this diff touches those components, but with these numbers I can't say it is unrelated to this branch. All runs used a 2 vCPU VM.iam.spec.tsandresponsive.spec.tswere changed but not run, because they need a running server.language-catalog, through the screen loader. After a failed download, Portuguese retries when the language changes again or on reload, and whether a browser refetches a failedimport()depends on its version.Manual check: 37 routes at 1440, 768 and 350x700 in Portuguese against a real SILO (
RELEASE.2026-10-26), read-only, with no horizontal overflow. This covered each route's initial state, not dialogs or detail pages.Screenshots of the login in Portuguese at 1440 and 350:
With the second commit, I also checked in the browser that English never requests the Portuguese files, that cycling to Portuguese downloads them and switches the text, and that a stored
ptshows Portuguese on first paint.Compatibility and documentation impact
Frontend only, with no API, permission or SILO integration changes. The default language stays English, and existing
enandzhpreferences keep working. The rootREADME.mdnow lists the three languages.Checklist
git commit -s) per the DCO