Skip to content

[15] Settings: themes, i18n (pt-BR / en-US) and persisted defaults #18

Description

@jvwaldrich0

Task 15 of 16 — these are sequential, do them in order.

Previous: #17 · Next: #19

Port target: cloudpark-toolkit (Go) → this repo (Rust). Reference paths below are relative to that repo.

Goal

Settings: theme picker, language, and persisted defaults.

Scope

  • Settings overlay on esc at the index root.
  • Themes: the palette list from task 03 (Default, Matrix, Ocean, Mono, Dracula, Gruvbox, Nord, Sunset, Forest, Rose), applied live to every screen.
  • Language: pt-br (default) and en-us. Translation keys are the English source strings, so en-us needs no table — t() falls back to the key.
  • Persisted defaults: ticket dir, printer port + baud, barcode delay, HW address. Store as TOML at $XDG_CONFIG_HOME/virtusdev/config.toml (fall back to ~/.config). Launch forms prefill from it.
  • First run: open the defaults editor once, esc skips.

Reference

cloudpark-toolkit/internal/tui/settings.go, config.go, i18n.go, theme.go

Done when

  • Theme and language changes persist across restarts.
  • A missing or corrupt config file falls back to defaults instead of failing to start.
  • Every user-facing string on the emulator screens goes through t().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions