| refactor(i18n): move source files to core + polish wave
The i18n module previously lived in atomcode-tuix/src/i18n/ so all
core renderers wanting localised output had to either reach into the
tuix crate (a dependency inversion) or hardcode strings. Now that
coding_plan::setup::SetupReport::render and similar core paths
need the same t(Msg::*) lookup, the natural home for the i18n
module is atomcode-core. Tuix keeps a one-line re-export shim so
every existing crate::i18n::* call site compiles unchanged.
Bundled in the same wave because they depend on the move or land
naturally alongside it:
* coding_plan/setup.rs — JediTerm SGR-9 fallback. When the
TERMINAL_EMULATOR env var marks the host as JetBrains JediTerm
(Android Studio / IntelliJ / etc.), strikethrough renders
inconsistently, so locked-model rows fall back to ASCII ✗ +
"(Locked: require plan upgrade)" text marker. Threaded through a
testable render_with_terminal_caps(is_jediterm: bool) so both
shapes are unit-coverable without env mutation.
* event_loop/commands.rs — /language slash command now emits the
unified Msg::LanguageSwitched { label, locale } line (matches the
LanguagePicker's confirmation shape, not the older bare-locale-code
one). /status instruction-files block migrated to
Msg::StatusInstructionFilesHeader/Present/Missing.
* modals/language_picker.rs — already on LanguageSwitched, kept
in sync.
* render/alt_screen.rs — adds regression test
command_output_survives_subsequent_input_prompt_redraw: pins the
/language flow where the picker emits a CommandOutput then the
event loop immediately redraws the input prompt (no menu). The
confirmation must stay in body_lines AND in painted output past
that second redraw, otherwise the user sees no feedback that the
locale switch took effect.
All existing i18n tests (13 in core, multiple in tuix), coding_plan
suite (51), and the new alt_screen regression pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| 25 天前 |