Repository navigation
fix: i18n for remaining hardcoded strings - #140
Merged
Merged
Conversation
BerryUIKI
force-pushed
the
feat/i18n-completion
branch
from
August 19, 2026 02:34
a97b367 to
96eee92
Compare
…logs) - Add typed zh/en keys to locale catalog for dashboard, performance, agent panel/config, options filters, research dialogs, and artifacts - i18n TodayPage/OverviewTab/PerformanceTab/ActivityTab - i18n AgentPanel and AgentConfigGuide (remove (t as any) fallbacks) - i18n GreeksCalculator, OptionContractTable, CreateResearchProjectDialog, CreateAccountDialog - Wrap dashboard/performance tests with en LocaleContext provider
BerryUIKI
force-pushed
the
feat/i18n-completion
branch
from
August 19, 2026 03:36
96eee92 to
1b924ba
Compare
NoviUIKI
approved these changes
Aug 19, 2026
NoviUIKI
left a comment
Collaborator
There was a problem hiding this comment.
Review summary — PR #140
Verdict: ✅ Approve
Clean, well-typed i18n refactor. I verified the diff, ran the typecheck, and executed the affected tests.
Critical
- None.
Important
- None.
Suggestions (non-blocking)
getSampleMessages(t)re-allocates on every render (AgentPanel.tsx:132). The list was previously a module-level constant; each render now rebuilds it. Negligible at 3 items, but worth memoizing if the panel grows.OverviewTab.tsxmixestwith the lower-leveltranslate/formatMessageAPIs and a manual!== 1singular/plural branch. It works for zh/en, but it diverges from the standardtusage elsewhere in this PR and won't generalize to locales with richer plural rules. A small plural helper would keep it uniform.- Scope note: the PR also bundles a small behavior change (option-contract delete now surfaces an error banner) and pre-adds artifact-delete keys that a later PR in this stack (#142) actually consumes. Harmless, just slightly beyond "i18n".
Strengths
- Removes the
(t("...") as any) || "fallback"pattern in favor of fully typedMessageKeykeys. SinceMessageKeyis the intersection of the zh/en catalogs, a missing key can't even compile. - Adds
htmlFor/idlabel associations inGreeksCalculator— an accessibility win. - Wraps the dashboard tests in a
LocaleContext.Provider, so they render deterministically (and no longer crash ont). CreateResearchProjectDialogvalidation errors are now localized and the generic failure message is only used when the error carries no message.
Verification
tsc --noEmit(apps/desktop): passes.vitestonPerformanceTab.test.tsx+dashboard-tabs.test.tsx: 12/12 pass.git diff --check: clean.
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
Complete i18n for the remaining hardcoded strings (tasks #4 #7).
Changes
(t as any)fallbacks