Cockatrice/libcockatrice_settings/libcockatrice/settings
Lukas Brübach 8bb2337117 [Client] Show localized card names, texts and pictures
Localization wiring now runs end to end: the oracle importer collects
foreignData for the configured language and the client renders it.

- [Oracle] Import localized names and rules texts for the selected cardLang
  - single-face cards store their foreignData name and full text
  - multi-face (split/adventure/aftermath/prepare) cards collect the joined
    name once and join each face's translated text with the same separator
    as the English merge; an incomplete translation falls back to English;
    the joined text follows the same highest-priority-set policy as the
    single-face path and is only collected when localization is enabled
  - the wizard switching languages re-imports the card database

- [Client] Display localized card info throughout the client
  - card info text/picture widgets and the game board re-render on language
    change
  - pictures resolve cardLang art through Scryfall's named endpoint using the
    localized name, falling back to id-based art when no match exists
  - deck editor keeps canonical English names as card identity (EditRole)
    while showing localized names (DisplayRole), so decks and wire names
    stay stable

- [Card] Add CardLocalization-backed name/text lookup and cards.xml v4
  localization elements with a bounded-size translation cache

- [Tests] Cover oracle foreignData import (incl. multi-face joins, priority
  and fallback paths), XML v4 localization parsing, deck model localized
  display and the language-aware settings default

Existing installations need to re-run Oracle to see translations: localized
data only lands in cards.xml when the Oracle app is started with the
preferred language selected — launch the separate "Oracle" program that
ships with Cockatrice, pick the language in the wizard and let it re-import
the card database.

The client's database cache (cards.xml.cache) is invalidated by the cache
format bump and the source-hash checks, but a cache written before the
re-import can still hold English-only entries (the hash uses file size and
mtime, so a same-size/same-timestamp rewrite may be served as-is); delete
cards.xml.cache and relaunch if no localized names/texts show up after
re-importing.
2026-09-13 03:41:43 +02:00
..
appearance_settings.cpp [HomeTab] Introduce button color source setting (#7181) 2026-08-25 19:27:07 +02:00
appearance_settings.h [HomeTab] Introduce button color source setting (#7181) 2026-08-25 19:27:07 +02:00
cache_storage_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
cache_storage_settings.h [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
card_database_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
card_database_settings.h [Card Database] Improve loading times through binary cache (#7051) 2026-07-27 23:12:53 +02:00
card_override_settings.cpp [SettingsManager] Make setting getters const (#6748) 2026-03-27 18:13:25 +01:00
card_override_settings.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
cards_display_settings.cpp [Client] Show localized card names, texts and pictures 2026-09-13 03:41:43 +02:00
cards_display_settings.h [Client] Show localized card names, texts and pictures 2026-09-13 03:41:43 +02:00
chat_settings.cpp [Client] Add setting to ignore all private messages (#7260) 2026-09-07 08:20:46 +02:00
chat_settings.h [Client] Add setting to ignore all private messages (#7260) 2026-09-07 08:20:46 +02:00
commander_bracket_settings.cpp [DeckEditor] Use CommanderSpellbook.com to estimate bracket if format is 'commander' (#6415) 2026-08-09 00:46:17 +02:00
commander_bracket_settings.h [DeckEditor] Use CommanderSpellbook.com to estimate bracket if format is 'commander' (#6415) 2026-08-09 00:46:17 +02:00
debug_settings.cpp [SettingsManager] Make setting getters const (#6748) 2026-03-27 18:13:25 +01:00
debug_settings.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
deck_editor_settings.cpp [VDE] Add a new setting to determine initial tab (Context/Deck/Database) (#7122) 2026-08-15 21:55:39 +02:00
deck_editor_settings.h [VDE] Add a new setting to determine initial tab (Context/Deck/Database) (#7122) 2026-08-15 21:55:39 +02:00
download_settings.cpp [Client] Show localized card names, texts and pictures 2026-09-13 03:41:43 +02:00
download_settings.h [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
game_filters_settings.cpp [GamesModel] Rename 'Creator' column to 'Host' (#7083) 2026-08-13 18:58:21 +02:00
game_filters_settings.h [GamesModel] Rename 'Creator' column to 'Host' (#7083) 2026-08-13 18:58:21 +02:00
game_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
game_settings.h [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
interface_settings.cpp [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
interface_settings.h [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
layouts_settings.cpp [SettingsManager] Make setting getters const (#6748) 2026-03-27 18:13:25 +01:00
layouts_settings.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
message_settings.cpp [SettingsManager] Make setting getters const (#6748) 2026-03-27 18:13:25 +01:00
message_settings.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
network_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
network_settings.h [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
paths_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
paths_settings.h [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
personal_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
personal_settings.h [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
recents_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
recents_settings.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
servers_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
servers_settings.h Define Cockatrice as an editor/handler for .cod files and cockatrice:// protocol on all platforms (#6775) 2026-08-08 19:02:19 +02:00
settings_manager.cpp [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
settings_manager.h [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
settings_migration.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
settings_migration.h [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
sound_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
sound_settings.h [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
tabs_settings.cpp [Mods] Properly close card art rules tab on disconnect (#7227) 2026-09-01 11:31:49 +02:00
tabs_settings.h [Mods] Properly close card art rules tab on disconnect (#7227) 2026-09-01 11:31:49 +02:00
updates_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
updates_settings.h [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
visual_deck_storage_settings.cpp [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
visual_deck_storage_settings.h [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00