diff options
| -rw-r--r-- | android/translations-converter/src/gettext/messages.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/android/translations-converter/src/gettext/messages.rs b/android/translations-converter/src/gettext/messages.rs index 59bc6ed711..1cd8ca9e2f 100644 --- a/android/translations-converter/src/gettext/messages.rs +++ b/android/translations-converter/src/gettext/messages.rs @@ -155,6 +155,21 @@ impl Messages { entries: Vec::new(), } } + + /// Create a messages list with a single non-plural entry. + /// + /// The plural form for the messages is left unconfigured. + pub fn starting_with(id: MsgString, msg_str: MsgString) -> Self { + let first_entry = MsgEntry { + id, + value: MsgValue::Invariant(msg_str), + }; + + Messages { + plural_form: None, + entries: vec![first_entry], + } + } } impl IntoIterator for Messages { |
