diff --git a/crates/ui-egui/src/i18n/catalog.rs b/crates/ui-egui/src/i18n/catalog.rs index 1be460212..899915728 100644 --- a/crates/ui-egui/src/i18n/catalog.rs +++ b/crates/ui-egui/src/i18n/catalog.rs @@ -35,6 +35,8 @@ struct Template { /// Bytes of literal text: a template with more of it is the more specific match. literal: usize, forms: Vec, + /// A `@msgplural` form: its `{n}` matches only a count. + counted: bool, } /// The placeholder values of a matched message template: placeholder name and value. @@ -46,7 +48,7 @@ const MAX_MESSAGE_LEN: usize = 2000; impl Template { /// `None` for a template that can't be matched reliably: no literal text, or two placeholders /// in a row (where one ends and the next begins is unknowable). - fn parse(source: &str, forms: Vec) -> Option