ADR-0019 §9 sweep (3/3): ui.rs prose strings (caught in manual sanity)
Surprise gap from the post-sweep sanity check — `ui.rs` had a substantial set of TUI-rendered strings that the previous two sweep passes didn't cover. Caught by grepping for capitalised literals in `ui.rs` after running the binary smoke check. ## Migrated - **modal.*** — load picker title / empty state / path prompt; rebuild confirm title / "Continue?" prompt. (modal.path_entry's title comes from `save.*` since it's the save / save-as dialog.) - **save.*** — `save` no-op hint, modal titles for Save / Save as, modal prompt body. - **status.*** — status bar `Project:` label and the `(no project)` placeholder. - **panel.*** — `Tables` panel title, `(none yet)` placeholder for empty tables, `(no active hint)` placeholder for the hint panel. - **shortcut.*** — the bottom-bar keyboard hint labels (submit, confirm, cancel, yes, no, load, select, browse_path, back_to_list, switch, advanced_once, cancel_one_shot, quit). Each is a translatable label paired with a key name (Enter / Esc / Ctrl-C / etc.) at the call site. Keystroke names are deliberately left as literals — translating them would mean retraining users away from what their keyboard says. The `push_shortcut` closure's parameter type changed from `&'static str` to `&str` so it accepts the catalog-returned String. ## Deliberately left - **Echo prefix tags**: `[simple] `, `[advanced] `, `[system] `, `[error] `. Their column widths are hardcoded into the wrap-width calculation in `render_output_panel`; translating them would silently break alignment. Worth a follow-up pass if a future locale needs different prefixes (would need `mode.label()` and the echo-tag widths to live behind a single locale-aware function). - **Mode labels**: `SIMPLE` / `ADVANCED` / `Advanced:` rendered in the input panel border. Same alignment reasoning as the echo tags — also they're keywords (the user types `mode simple` to switch), so translating the display label without translating the command word would be confusing. Left as is. - **Visual decoration**: `[Y]`, `[N]`, `[TEMP] `, `>` cursor markers, `█` cursor block, `↑↓` arrow glyph, `›` selection marker. Universal symbols / labels rather than translatable prose. ## Catalog totals The catalog now has ~170 entries across 16 categories. `tests/engine_vocabulary_audit` passes — no engine vocabulary leaks anywhere user-reachable. ## Tally 610 tests passing (no change — pure refactor with identical-output catalog substitutions). Clippy clean with nursery lints. Release builds at 7.8 MB. ADR-0019 §9 is now genuinely complete.
This commit is contained in:
@@ -309,6 +309,48 @@ modal:
|
||||
path_entry_empty_name: "path entry: empty name"
|
||||
path_entry_empty_path: "path entry: empty path"
|
||||
load_picker_nothing: "nothing to load"
|
||||
# Modal titles + body prose rendered by ui.rs.
|
||||
load_picker_title: "Load project"
|
||||
load_picker_empty: "(no projects in data directory)"
|
||||
load_picker_path_prompt: "Path to project directory:"
|
||||
rebuild_confirm_title: "Rebuild project"
|
||||
rebuild_confirm_prompt: "Continue?"
|
||||
|
||||
# ---- Save / save-as command surfaces ---------------------------------
|
||||
save:
|
||||
# `save` on a named project is a no-op with a friendly hint.
|
||||
already_saved: "already auto-saved; use `save as` to copy to a different location"
|
||||
# Modal titles for `save` (on a temp) vs `save as`.
|
||||
title_as: "Save as"
|
||||
title_save: "Save"
|
||||
# Prompt body for the path-entry modal opened by save / save as.
|
||||
path_prompt: "Name (under data dir/projects) or absolute path:"
|
||||
|
||||
# ---- Status bar (project label) and panels ---------------------------
|
||||
status:
|
||||
no_project: "(no project)"
|
||||
project_label: "Project: "
|
||||
|
||||
panel:
|
||||
tables_title: "Tables"
|
||||
tables_empty: "(none yet)"
|
||||
hint_empty: "(no active hint)"
|
||||
|
||||
# ---- Shortcut hints (paired with key names in the bottom bar) -------
|
||||
shortcut:
|
||||
submit: "submit"
|
||||
confirm: "confirm"
|
||||
cancel: "cancel"
|
||||
yes: "yes"
|
||||
no: "no"
|
||||
load: "load"
|
||||
select: "select"
|
||||
browse_path: "browse path"
|
||||
back_to_list: "back to list"
|
||||
switch: "switch"
|
||||
advanced_once: "advanced once"
|
||||
cancel_one_shot: "cancel one-shot"
|
||||
quit: "quit"
|
||||
|
||||
# ---- mode / messages banners (app-level commands) -------------------
|
||||
mode:
|
||||
|
||||
Reference in New Issue
Block a user