diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-05-26 18:05:19 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-05-28 11:54:59 +0000 |
| commit | 459777052f4f60d71fee43f03848346a5fe615d6 (patch) | |
| tree | 82408754d11dfabea1bc31eef9b6d762f36afdc5 /android | |
| parent | 3b012b5db913ad007cc6be9e98d8fecb6f34a047 (diff) | |
| download | mullvadvpn-459777052f4f60d71fee43f03848346a5fe615d6.tar.xz mullvadvpn-459777052f4f60d71fee43f03848346a5fe615d6.zip | |
Add `Messages::add_plural` helper method
Adds plural 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 65664c65f5..de6c18e11a 100644 --- a/android/translations-converter/src/gettext/messages.rs +++ b/android/translations-converter/src/gettext/messages.rs @@ -180,6 +180,16 @@ impl Messages { self.entries.push(entry); } + + /// Add a plural entry. + pub fn add_plural(&mut self, id: MsgString, plural_id: MsgString, values: Vec<MsgString>) { + let entry = MsgEntry { + id, + value: MsgValue::Plural { plural_id, values }, + }; + + self.entries.push(entry); + } } impl IntoIterator for Messages { |
