//! Parser and lookup tables for translation catalogs (`*.tsv`, format documented in `zh-hant.tsv`). use std::collections::HashMap; /// A parsed catalog. Values are owned for the life of the process (catalogs are built once). #[derive(Debug, Default)] pub struct Catalog { /// context-free strings: English source → translation (the hot path, looked up every frame) plain: HashMap, /// strings with a disambiguating context, keyed `context \u{1} source` contextual: HashMap, /// command-id keyed strings ids: HashMap, /// plural messages: `one|other` → forms plurals: HashMap>, /// status and error messages without placeholders (`@msg`): English → translation messages: HashMap, /// status and error messages with `{name}` placeholders (`@msg`, and each English form of a /// `@msgplural` row), most specific first templates: Vec