Cockatrice/libcockatrice_models/libcockatrice/models
Lukas Brübach 14cf4ee2a9 [Card] Bind search language per FilterString instance
The peg parser rules are set up once per process, so the GenericQuery and
OracleQuery rule actions could not capture per-instance state. Instead of
storing the search language in a process-global that FilterString instance
methods mutate, hand it to the rule actions through a thread-local parse
context and copy it into the filter closures they produce. Card evaluation
in FilterString::check no longer reads any process-global state, and each
instance keeps the language it was built with; constructing one instance no
longer changes what unrelated instances (deck filter, drop-to-hand, zone
views) match against.

The card database display model stores the raw query and rebuilds the
FilterString when the search language changes, since the language is now
bound at parse time.

Add tests for the English/Selected/Both search modes, the English fallback
for untranslated cards, and per-instance language independence.
2026-09-19 10:47:24 +02:00
..
database [Card] Bind search language per FilterString instance 2026-09-19 10:47:24 +02:00
deck_list [Client] Show localized card names, texts and pictures (#7294) 2026-09-18 12:03:07 +02:00