Repository navigation
feat: add French, the Colony Preferences page and shared themes, and move Spotter's files to the standard Colony folders - #30
Merged
Conversation
Paths come from colony_ui::paths (config, data and cache under Colony/Spotter/), one sub-directory per kind of file: the library in <data>/library/, exports and the automatic backup in <data>/exports/, the import log in <data>/logs/, covers and achievement icons in the cache. The hand-built base path and its working-directory fallback are gone. The first start copies the library (with SQLite, write-ahead log included), exports and log of Spotter 0.3 and earlier, never moves or deletes them, writes a marker so the copy runs once, and keeps using the old files if the copy fails. Preferences now live in <config>/preferences/preferences.json, with the shared Colony preferences (colony_ui::preferences::StandardPreferences) flattened in. The settings row of the old database is imported once: Spotter's three dark themes, six accents and interface scale map to the closest shared theme, accent and text size. A preferences file that is not JSON fails the load, so nothing is written over it. Without a usable OS keyring, platform tokens go to <config>/credentials/tokens.json (0600 on Unix) instead of the database; the database columns are emptied only once the file was written and read back. The shared theme, accents, high contrast and the Colony fonts (embedded by colony-ui, licences included) replace Spotter's own, and the Appearance and Accessibility settings use the shared sections.
Spotter no longer defines colours. Every widget reads the active Colony palette (colony_ui::theme::Palette) where it is drawn, so the theme, the accent and high contrast picked in the settings reach every screen, light themes included: - theme.rs loses its colour constants and lighten(); its style helpers take palette colours, outline inactive controls with the ink so they show on cards and on the page, and label filled buttons with contrast_on. - ViewTheme is gone; views call Palette directly. - Platforms and game statuses use the shared accent swatches, distinct and the same on every theme (app_tint would give Steam and PlayStation the same red). - Text uses the palette's ink ramp instead of white and invented greys; hover states use the palette's hover surfaces instead of white overlays that vanished on light themes. - The two delete confirmations share one modal, the filter, sort, status and rating chips share one chip style, and the library card highlights on hover. - The page the browser shows after a Steam login uses the same palette.
…ia font All of Spotter's text now goes through theme::ui_text(content, base): the size is colony_ui::sz(base), the product of the Appearance and Accessibility text sizes (0.7225x to 1.68x), and the font is colony_ui::ui_font(), so turning on the dyslexia font changes every label at once instead of only the shared sections. Nerd Font glyphs inside a label are set in the glyph font, which OpenDyslexic lacks. Text inputs and the toggles follow the same sizes, and the empty placeholder texts are plain spaces.
…duced The cascade that adds newly imported games a few at a time is an animation, so it now follows colony_ui::effects_enabled(): with effects off or reduced motion on, every new game lands in the library at once. The moving dots of the import banner stand still in that case too.
The toasts, the window title and three labels used em dashes; they now use a full stop, a colon or a comma, and the window title is just Spotter.
…potter into French Preferences: - Clicking Spotter at the top of the sidebar opens the shared Colony Preferences page in place of the current screen; clicking it again, Close or Esc goes back to the screen it was opened from. - General, Appearance and Accessibility come from the colony-ui kit, then Spotter's own Library and Imports. Every section is collapsible and starts closed. Changing the theme raises the "Theme applied." notification. - The sidebar follows the Colony order: a list label, the sections, then a keyboard hint. Notifications can be dismissed with a click. - Settings, SettingsMessage and the settings modules are now Preferences. French: - Every interface string goes through src/i18n: en.json and fr.json for Spotter's own strings, colony_ui::i18n for the shared ones. Plurals, decimals and percentages follow the language. - The language follows the system until one is picked in General. - Game statuses keep their English name in the database and are shown through GameStatus::label; sort orders, date formats, durations and achievement displays have translated labels too. - The import banner and log tell failures by type, not by searching the text for "error". - The Steam login page in the browser is translated and served as UTF-8. - Tests: both files hold the same keys, no string is empty, placeholders match, every key used exists and every key is used, and no key repeats a shared label.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spotter now follows the shared Colony design system end to end: its files live in the standard Colony folders, every screen is drawn from the shared themes and text sizes, Settings became the Colony Preferences page, and the whole interface is available in French.
Files in the standard Colony folders
colony_ui::paths(Colony/Spotter/under the platform's config, data and cache folders), one sub-folder per kind of file:<config>/preferences/preferences.json,<config>/credentials/,<data>/library/spotter.db,<data>/exports/,<data>/logs/,<cache>/covers/and<cache>/achievement_icons/. The oldbase_pathfamily and its fallback to the working directory are gone.preferences.json, with the sharedStandardPreferencesflattened in. The old settings row is imported once: the Dark, Darker and Midnight themes, the six accents and the interface scale map to the nearest shared theme, accent and text size.preferences.jsonincluded.<config>/credentials/tokens.json(0600 on Unix).Shared themes and typography
contrast_on. No colour literal is left insrc: the grepgit grep -nE 'Color::from_rgba?8?\(|Color \{ *(r|a|g|b):|Color::(WHITE|BLACK)|#[0-9a-fA-F]{6}\b' -- srcfinds nothing.assets/fontsis gone.sz(), so both text-size preferences reach it, and the dyslexia font reaches Spotter's own text too. No raw size is left:git grep -nE '\.size\([0-9]' -- srcfinds nothing. The window-wideUiScaleis gone.The Preferences page
French
src/i18n. Spotter's own strings are inen.jsonandfr.json(342 keys each). The shared labels come fromcolony_ui::i18n.LC_ALL,LC_MESSAGES,LANG) until one is picked in General.Notes
docs/CONFIGURATION.mdand the other docs follow the new paths, the Preferences page and the languages.\u{2014}escape keeps the one test that checks a legacy "no date" value).app_tint: its name hash gives Steam and PlayStation the same red, and Epic and Nintendo the same indigo.Checks
cargo check --all-targets: no warnings.cargo test --lib --test unit_testson Linux passes (67 + 56 tests), including the new tests (paths migration, preferences import, Preferences toggle, reduced motion skipping the import cascade, i18n tables).git grep -nP '\x{2014}|\x{2013}' -- src testsfinds nothing.