Documented release: v0.1.0-alpha.2 · 2026-11-24 (commit b1c6ebb158) No scripts · No telemetry · A–Z Index

Settings, Shortcuts & Languages

CurveBook stores interface preferences and custom keyboard bindings locally in plain versioned JSON files with zero remote syncing or cloud accounts.


Preference Keys & Storage Paths

Desktop GUI settings persist in preferences.json, governed by docs/schemas/preferences.schema.json (CURRENT_PREFERENCES_VERSION = 1, MAX_PREFERENCES_FILE_BYTES = 4 MiB):

KeyJSON TypeAllowed Values / Meaning
versioninteger (0..=1)Schema version (1 written by current CurveBook; files with version > 1 are refused rather than overwritten).
localestring | nullBCP-47 UI locale code (e.g., "en", "de", "pt-BR", "ar"). Defaults to "en" when omitted or null.
themestring | nullDesktop theme mode: "light", "dark", or "high-contrast".
shortcutsobject | nullMap of command_id -> key-combo string (e.g., {"ui.gallery.toggle": "Ctrl+Alt+G"}), merged atop default bindings.

Forward-compatible extension keys (additionalProperties: true) are preserved on deserialize/upgrade; corrupt preferences.json or shortcuts.json files emit a stderr warning and fall back cleanly to built-in defaults rather than blocking startup.

Storage Paths & Environment Overrides

By default (unless overridden), curvebook resolves configuration (preferences.json, shortcuts.json) and recovery (recovery/) paths (apps/curvebook/src/main.rs) in priority order:

  1. --portable-dir <dir> CLI flag -> <dir>/curvebook-data/
  2. CURVEBOOK_CONFIG_DIR environment variable -> <CURVEBOOK_CONFIG_DIR>/
  3. Portable marker file portable.txt located beside the curvebook binary -> <exe_dir>/curvebook-data/
  4. Platform Standard Directories:
    • macOS: ~/Library/Application Support/CurveBook/ (both preferences and recovery)
    • Windows: %APPDATA%\CurveBook\ (preferences/shortcuts) and %LOCALAPPDATA%\CurveBook\ (recovery data)
    • Linux & FreeBSD: $XDG_CONFIG_HOME/curvebook/ (fallback ~/.config/curvebook/) and $XDG_DATA_HOME/curvebook/ (fallback ~/.local/share/curvebook/), with strict UID 0700 fallback validation when $HOME is unset.

Setting CURVEBOOK_NO_PREFS=1 (or true/yes/on) runs in stateless mode without loading or writing preferences, shortcuts, or recovery journals.


Keyboard Shortcut Customization

All engine commands (cmd::registry()) and interactive UI commands (UI_COMMANDS) register customizable bindings in ShortcutRegistry (crates/ui-egui/src/menus/shortcuts.rs):

  • Context Scoping (ShortcutScope): Bindings declare Global, ResultSheet, or NonResultSheet scope so context-sensitive shortcuts (such as Cmd/Ctrl+T switching parameters on a ResultSheet vs. creating a data table elsewhere) coexist without false conflicts.
  • Persistence & Conflict Detection: Overrides save atomically to preferences.json (shortcuts map) and shortcuts.json, enforce conflict detection across overlapping ShortcutScopes, and can be reset individually or wholesale to defaults (shortcuts.reset_all()).

UI Locales & Beta Translation Status ([Draft])

CurveBook's i18n catalog (crates/ui-egui/src/i18n.rs) provides full key coverage across every supported BCP-47 locale (LOCALES, verified at zero missing keys via cargo xtask i18n-report):

Region / GroupLocale CodesScript DirectionBeta Review Status
EnglishenLTRPrimary reviewed source (English (en))
Tier-1 Scientificde, es, fr, ja, ko, pt-BR, zh-CN, zh-TWLTRMarked [Draft] in Beta pending native-speaker scientific review
Tier-2 Europeanit, nl, pl, ru, trLTRMarked [Draft] in Beta pending native-speaker scientific review
Right-to-Left (RTL)ar, heRTLCatalog & PDF/SVG BiDi ready; desktop GUI picker deferred to 1.0 (normalize_beta_gui_locale falls back to "en" in Beta)
  • [Draft] Beta indicator: Every non-English entry in the UI locale picker appends [Draft] (<Autonym> (<code>) [Draft]) to indicate machine-drafted translations awaiting community/native review.
  • Locale normalization (normalize_locale): Regional variants normalize cleanly onto supported tags (e.g., en-US -> en, zh-Hans -> zh-CN, zh-Hant -> zh-TW, pt -> pt-BR). See Localization Architecture.

Right-to-Left (RTL) & Bidirectional Text

Full desktop GUI layout mirroring (ar and he, is_rtl_locale == true) is deferred to 1.0 under R12.5. In Beta, the desktop View › Language picker exposes only active LTR/CJK locales (BETA_ACTIVE_LOCALES), and normalize_beta_gui_locale falls back cleanly to "en" if an RTL code is loaded from preferences.json.

Unicode bidirectional visual run reordering (reorder_visual_bidi in curvebook-text) remains active for multi-script figure labels and PDF/SVG exports, while the ar/he translation entries and horizontal layout mirroring primitives (mirror_x_for_rtl in crates/ui-egui) remain built in ahead of 1.0 enablement.


Locale Number, Tick & Delimiter Formatting

UI locale selection integrates with LocaleNumberPolicy (crates/text/src/number.rs) and CsvOptions defaults without altering stored f64 values or numerical computations:

  • Decimal & Thousands Formatting: Continental European locales default cleanly to , decimal display and ;-delimited regional CSV presets (CsvOptions::european_csv()), while English/CJK locales default to . decimals and ,-delimited CSVs.
  • Statistical Precision: Internally, every transform, statistical hypothesis test, nonlinear solver, and Monte Carlo RNG evaluates over IEEE-754 double-precision values independent of active display locale.
Ready · Offline Desktop · CLI · Local MCP Pure Rust Zero Telemetry MIT / Apache-2.0