summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-08-19 22:20:57 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-08-24 19:19:38 +0000
commitee01537e231507f17e4d6a3b9dcd0cf19c11918c (patch)
treeaf71d25bb1177fc3ae2e6c1fcf20440503ad297d /android
parent0efe31379c4133fddfed0c6e1cf24bc60762eb1f (diff)
downloadmullvadvpn-ee01537e231507f17e4d6a3b9dcd0cf19c11918c.tar.xz
mullvadvpn-ee01537e231507f17e4d6a3b9dcd0cf19c11918c.zip
Update doc. to describe how plurals are handled
Diffstat (limited to 'android')
-rw-r--r--android/translations-converter/src/main.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/android/translations-converter/src/main.rs b/android/translations-converter/src/main.rs
index dd604789a3..36a1970c2d 100644
--- a/android/translations-converter/src/main.rs
+++ b/android/translations-converter/src/main.rs
@@ -16,6 +16,13 @@
//! order when only named parameters are used, and Android strings only supported numbered
//! parameters.
//!
+//! Android's plural resources aren't currently translated, but this tool will convert them to
+//! gettext message templates and append them to the message template file. It's important to note
+//! that the first quantity item for a plural will be used as the `msgid`, so it shouldn't
+//! have any parameters. The last quantity item for a plural will be used as the `msgid_plural`,
+//! and it can contain parameters. This assumes a plural resource will have at least two items.
+//! While it would still work with a single item, this is an unlikely case for a plural resource.
+//!
//! Note that this conversion procedure is very raw and likely very brittle, so while it works for
//! most cases, it is important to keep in mind that this is just a helper tool and manual steps are
//! likely to be needed from time to time.