Repository navigation
fix(i18n): restore two permanently-red locale and sidebar guards - #6
Draft
paopaonyapi-creator wants to merge 1 commit into
Draft
paopaonyapi-creator wants to merge 1 commit into
paopaonyapi-creator wants to merge 1 commit into
Conversation
Two of the five GUI-test failures were stale expectations rather than broken code, and each was hiding something different: - zh.ts had no nav.browser key, so every locale's key set no longer matched English and the parity assertion failed for all ten locales. Adding it makes "every locale key set matches the English source" pass again; measured across the catalogs, all ten now hold the same 2703 keys with no extras. - sidebar-rows asserted "the exact twelve" while App.tsx ships twenty-five rows, so the guard had been red on every branch since the Phase 20.x-25 subsystems each added a row. A test that is always red protects nothing: it trains everyone to ignore the whole job. The list is extended to the real rows in real order, and the ordering assertion is kept because its stated purpose is catching one row silently swapped for another, which a count would not. Two failures remain and are deliberately not touched here: "does not ship accidental English values" (French) and "zh-TW ships no untranslated English placeholders beyond the intentional allowlist", together 271 keys whose values are still the seeded English placeholder. Fixing those means either writing translations as a native reader or widening an allowlist a reviewer curated key by key. Both are a human call, and neither belongs in a guard-restoration commit.
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
This pull request is being kept as a draft automatically. Once every issue above is resolved, it will be marked ready for review again. |
Owner
Author
|
Gate result, recorded so the "no screenshot" claim above is checkable rather than asserted Two things worth noting:
The screenshot is not blocked by anything about the change; it is blocked by this host. A capture |
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.
Part of #5. Restores two GUI guards that had gone permanently red. This PR has no screenshot on
purpose — see "Why there is no screenshot" below; the GUI-screenshot gate is armed by this diff
and I am not claiming a waiver for it.
Summary
gui/src/i18n/zh.tshad nonav.browserkey, so no locale's key set matched English any moreand
every locale key set matches the English sourcewas failing. Adding it makes all tencatalogs carry the same 2703 keys, zero missing, zero extra.
gui/tests/sidebar-rows.test.tsasserted "the exact twelve" rows whileApp.tsxshipstwenty-five, so that guard had been red on every branch since the Phase 20.x–25 subsystems
each added a nav row. The expected list now matches the real rows in real order.
The second item is the reason this PR exists. An always-failing assertion protects nothing and
trains everyone to skim past the entire job — the same shape as #3 and lidge-jun#5650, where a guard was
present but its signal was uninterpretable. The order-sensitive assertion is kept deliberately:
the test's own comment states a count would still pass if one row were silently swapped for
another, which is the change it is guarding against.
Verification
Measured across the ten catalogs after the
zh.tsaddition:de fr ja ko ru tr th zh zh-TWeachreport
missing=0 extra=0 keys=2703.The two remaining failures are deliberately not touched here:
does not ship accidental English values(French) andzh-TW ships no untranslated English placeholders beyond the intentional allowlist, together 271 keys still carrying the seeded English placeholder. Closing them meanseither writing translations as a native reader or widening an allowlist that the zh-TW test comment
says was curated key by key. Neither is a mechanical fix and neither belongs in a guard-restoration
commit.
A third failure that used to sit in this set — a
render explodedload error fromCannot find module './export/export-package-builder'— is #3. It is gone on this branch becausethe branch is stacked on #4, which is itself the confirmation that the diagnosis was correct.
What was actually verified, and what was not
Verified:
bun run build:guiproducedgui/dist/assets/index-DkhwK8P_.js, which contains浏览器工作台; served over loopback withlocalStorage["ocx-lang"]="zh"seeded (the same keydetectInitial()ingui/src/i18n/shared.tsreads when a user picks 中文 in the languageswitcher), the rendered sidebar contains, in NAV order:
so the key resolves in the UI, not just in the catalog. Not verified: any rasterised image. The
bundle hash is quoted precisely so the claim is checkable against the commit.
Why there is no screenshot
enforce-targetarms the GUI-screenshot requirement fromguiPathsChanged(changedFilePaths)—diff paths, not wording — so this PR is legitimately in scope for it.
I could not produce the image on this host, and did not substitute anything for it:
take_screenshotreturnsviewport=0x0, visible=false, attached=false(it does connect:cdpAttached=true), and thestate did not change across
navigate_page+select_page+ three attempts;file at all — consistent with a managed policy on this machine;
(
index-wpTOyepx.js, no浏览器工作台), so a screenshot taken from it would have shown thepre-fix UI while looking like proof of the post-fix UI. That is the one thing worth refusing
here, and it is why
gui/distwas rebuilt before anything was rendered.I am not requesting the maintainer waiver. Its stated purpose in
pr-quality.cjsis to absorbfalse positives where the diff is backend-only; this diff genuinely changes shipped GUI text, so
the gate is armed correctly. If a reviewer decides a DOM-level verification is enough for a
one-string locale addition, that is your call to make, not one for me to pre-empt.
Checklist