diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-05-26 18:03:58 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-05-28 11:54:59 +0000 |
| commit | 3b012b5db913ad007cc6be9e98d8fecb6f34a047 (patch) | |
| tree | 3aea992b68125df65378ce1b54d8b0f392307153 /android | |
| parent | 2d9110da8eb9221c3b2caa3b520a81ba21673ae9 (diff) | |
| download | mullvadvpn-3b012b5db913ad007cc6be9e98d8fecb6f34a047.tar.xz mullvadvpn-3b012b5db913ad007cc6be9e98d8fecb6f34a047.zip | |
Add `Messages::add` helper method
Adds non-plural message entries.
Diffstat (limited to 'android')
| -rw-r--r-- | android/translations-converter/src/gettext/messages.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/android/translations-converter/src/gettext/messages.rs b/android/translations-converter/src/gettext/messages.rs index 1cd8ca9e2f..65664c65f5 100644 --- a/android/translations-converter/src/gettext/messages.rs +++ b/android/translations-converter/src/gettext/messages.rs @@ -170,6 +170,16 @@ impl Messages { entries: vec![first_entry], } } + + /// Add a non-plural entry. + pub fn add(&mut self, id: MsgString, msg_str: MsgString) { + let entry = MsgEntry { + id, + value: MsgValue::Invariant(msg_str), + }; + + self.entries.push(entry); + } } impl IntoIterator for Messages { |
