Conversation
Contributor
|
Hi @samzong, DetailsInstructions for interacting with me using comments are available here. |
…ebug log keys, CI guard
889ca3f to
f8845c0
Compare
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.
Summary
Fix i18n structural integrity across the PWA package: en.json becomes the authoritative superset, all
defaultValueanti-patterns are eliminated,GatewayDebugLoggains full i18n support with stable React keys, and the CI check script is extended to guard both desktop and PWA.Type of change
[Fix]bug fix[Build]CI, packaging, or tooling changeWhy is this needed?
GatewayDebugLogwas the only PWA component with hardcoded English strings while every other component usesuseTranslation(). Deeper investigation revealed systemic i18n issues:en.json(the fallback locale) was missing 8 keys that existed in other locales, 12t()calls useddefaultValueas a crutch (scattering English text between locale files and component code),DebugLogEntrylacked stable IDs causing React key misuse (key={i}), 10 dead locale keys existed from desktop copy-paste, and the CI check script only covered the desktop package.What changed?
app.name,shell.reconnect,settings.*,drawer.title/search,tools.emptyDetails)app.name,drawer.title,drawer.search,tools.emptyDetailsto all non-English localesdefaultValueusage: Removed 12 occurrences across 7 component files +error-classify.ts(kept dynamic-key fallback informatErrorForToast)idfield toDebugLogEntryindebug.ts;GatewayDebugLoguseskey={entry.id}instead ofkey={i}debugLogi18n namespace: 6 new keys across all 8 locales;GatewayDebugLognow usesuseTranslation()for all user-visible stringschat.you,gateway.notFound,pairing.{error,retryButton,scanning,title},shell.{bootstrapping,connected},tools.{expandButton,collapseButton})check-i18n.mjsnow covers both desktop and PWA packages, and detectsdefaultValueanti-pattern on static keysArchitecture impact
DebugLogEntryinterface inpackages/pwa/src/lib/debug.tsgains anid: numberfield;error-classify.tsin core removes redundantdefaultValueon static keysdocs/architecture-invariants.md: noneLinked issues
Closes the GatewayDebugLog i18n gap identified during PWA development.
Validation
pnpm lintpnpm testpnpm typecheckpnpm check:i18npnpm buildCommands, screenshots, or notes:
Screenshots or recordings
No UI layout changes. All modifications are string substitutions (hardcoded → i18n) and locale file updates.
Release note
NONE.Checklist
[Feat],[Fix],[UI],[Docs],[Refactor],[Build], or[Chore]