Skip to content

feat: add an English interface, Colony themes and fonts, and a Preferences page - #18

Merged
MotherSphere merged 4 commits into
mainfrom
feat/colony-design-system
Oct 12, 2026
Merged

MotherSphere merged 4 commits into
mainfrom
feat/colony-design-system

Conversation

@MotherSphere

Copy link
Copy Markdown
Member

Brings Shift onto the Colony design system with colony-ui 0.1.6.

What changes for the user

  • English interface. English is now the canonical language and French ships alongside it, both complete. At launch Shift follows the system language (LANGUAGE, LC_ALL, LC_MESSAGES, LANG on Linux, the display language on Windows and macOS), or the language picked in Preferences. Sizes use B/KB/MB in English and o/Ko/Mo with a decimal comma in French; relative dates read naturally in both.
  • Colony themes and fonts. Every colour comes from the active Colony palette (Gruvbox dark by default), including the iced theme used by scrollbars and drop-downs. Text uses JetBrainsMono Nerd Font through Typography, so the dyslexia font swaps the whole window, and every size goes through sz(), so both text-size preferences reach it. The previous and next buttons are Nerd Font chevrons with a tooltip.
  • Preferences. The Shift button at the top left of the control bar opens Preferences in place of the viewer (the control bar stays) and shows when it is open; Close and Esc close it. General (with a Language section: Automatic, English, Français), Appearance and Accessibility come from the colony-ui kit (themes with the "Theme applied." toast, accents with auto accent off by default, font size, effects, preview, high contrast, dyslexia font, reduced motion, text size), then About (version, licence, source, preferences file path). While the page is open the viewer keys and wheel zoom are off; a control-bar button goes back to the viewer.
  • Saved preferences. Every change applies and is saved at once, with no Save button, to <config>/Colony/Shift/preferences/preferences.json (LocalAppData on Windows, Application Support on macOS). The write goes to a temporary file in the same folder, is synced, then renamed over the old file. A missing file is the defaults; an unreadable or invalid file falls back to the defaults, is reported in the status line and is left untouched until the user changes something. A bad value for one key falls back on its own and keeps the rest.

Code

  • src/main.rs is only the entry point: the --version check, font registration and the iced application. The viewer moved to app.rs, folder listing and natural sort to gallery.rs (is_supported_image now reads SUPPORTED_EXTENSIONS instead of repeating it), status and details text to format.rs, the palette styles to style.rs, the preferences file and page to preferences.rs, and the strings to i18n/ (mod.rs, en.rs, fr.rs). Shared labels come from colony_ui::i18n and are not copied.
  • New dependencies: colony-ui 0.1.6, serde, serde_json, and sys-locale, which was already in the tree through iced.

Tests

39 unit tests, up from 19: key parity between en.rs and fr.rs, no empty string and identical placeholders in both locales, one-pass placeholder filling, sizes and relative dates in both locales, preferences round trip with no temporary file left behind, replacing an existing file, missing, corrupt and partly invalid files, the Colony key names in the file, one message opening and closing Preferences (the Shift button and Close send the same one), viewer keys and wheel zoom off while Preferences is open and Esc closing it, a control-bar button returning to the viewer, a change being saved at once, and a source check that no text size is a raw number and no colour is a literal. The existing update() tests now assert the English strings.

The window was not launched while making this change, so the layout at 0.7225x and 1.68x text scale was checked by reading it: every row of the control bar wraps, and the category list grows with the scale.

The README now says the interface ships in English and French, lists Preferences under What it does, adds Esc to the shortcuts, and names the preferences file per platform in Privacy.

@MotherSphere
MotherSphere merged commit d38700d into main Oct 12, 2026
9 checks passed
@MotherSphere
MotherSphere deleted the feat/colony-design-system branch October 12, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant