feat(wizard): first-launch language picker + i18n the wizard#442
Merged
Conversation
Two related fixes for non-English first-runs: 1. Add a language step at the very start of the setup wizard. Cursor defaults to detectSystemLanguage() result. Selection saves immediately, so all later wizard steps render in the chosen language. Re-runs (`reasonix setup`) start there too — cursor defaults to currently saved language so Enter is a no-op for users who don't want to change it. 2. Localize every hardcoded string in the wizard via a new wizard.* i18n namespace (~30 keys, EN + zh-CN). Previously a Chinese user who hit /language partway through never saw zh-CN copy because the wizard rendered raw English. Now language → applies → review step renders in zh-CN. Why this matters: Intl.DateTimeFormat().resolvedOptions().locale isn't always correct (terminal env strips LANG, CI returns "C", etc.), and the prior workflow only let users discover /language *after* finishing setup in English. Tests: ink-testing-library renders the Wizard and confirms the language step is shown first with both options visible, in EN and zh-CN. wizard.test.ts → wizard.test.tsx (now contains JSX).
2 tasks
This was referenced May 8, 2026
Merged
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
…e#442) Two related fixes for non-English first-runs: 1. Add a language step at the very start of the setup wizard. Cursor defaults to detectSystemLanguage() result. Selection saves immediately, so all later wizard steps render in the chosen language. Re-runs (`reasonix setup`) start there too — cursor defaults to currently saved language so Enter is a no-op for users who don't want to change it. 2. Localize every hardcoded string in the wizard via a new wizard.* i18n namespace (~30 keys, EN + zh-CN). Previously a Chinese user who hit /language partway through never saw zh-CN copy because the wizard rendered raw English. Now language → applies → review step renders in zh-CN. Why this matters: Intl.DateTimeFormat().resolvedOptions().locale isn't always correct (terminal env strips LANG, CI returns "C", etc.), and the prior workflow only let users discover /language *after* finishing setup in English. Tests: ink-testing-library renders the Wizard and confirms the language step is shown first with both options visible, in EN and zh-CN. wizard.test.ts → wizard.test.tsx (now contains JSX).
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.
Why
Two related gaps for non-English first-runs:
/languageslash command after finishing setup in English.Intl.DateTimeFormat().resolvedOptions().localeis unreliable: terminal envs stripLANG, CI returns"C", some Mac configs land onen-USeven with Chinese system language./language zh-CNmid-flow, every subsequent wizard screen still rendered in English.What
Language step
detectSystemLanguage()result, marked(detected)setLanguage()+notifyLanguageChange()immediately, so review/saved steps render in the chosen languagereasonix setup) start at the language step too — cursor defaults to the saved language so Enter is a no-op for users who don't want to changeWizard i18n
~30 keys under a new
wizard.*namespace, EN + zh-CN translations:Reuses
t("ui.welcome")for the post-save line that already had a translation.Test plan
ink-testing-libraryrenders Wizard, confirms language step is shown first with both options visible"选择语言")buildSpecround-trip tests still pass (4 existing + 2 new = 6)tests/wizard.test.ts→tests/wizard.test.tsxsince it now contains JSXIndependent of #440 / #441
This branch is off
mainand doesn't touch errors.ts. Mergeable in any order relative to the other two.