summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-01-19 11:49:04 +0100
committerAlbin <albin@mullvad.net>2023-01-19 11:59:43 +0100
commit233d11b8a69c86398c20cc7eb57c4cd5e9034c2f (patch)
treecdae74a51d35fdc598fac450136fb28851f713e3 /android
parente1678617eac8d621244144f8adcbf34e0a5b55f5 (diff)
downloadmullvadvpn-233d11b8a69c86398c20cc7eb57c4cd5e9034c2f.tar.xz
mullvadvpn-233d11b8a69c86398c20cc7eb57c4cd5e9034c2f.zip
Create dedicated translations converter readme
Diffstat (limited to 'android')
-rw-r--r--android/README.md36
-rw-r--r--android/translations-converter/README.md23
2 files changed, 29 insertions, 30 deletions
diff --git a/android/README.md b/android/README.md
index 3427dcd61c..03716f9fc0 100644
--- a/android/README.md
+++ b/android/README.md
@@ -27,36 +27,12 @@ The easiest and recommended way to build the Android project including the `mull
```
See the [build instructions](BuildInstructions.md) for further information.
-## Translations / Localization
+## Translations and localization
-### How to update translations
+See the [locale README][gui-locales-readme] for how to easily update translations. It also includes
+documentation for which phrases and terms shouldn't be translated (Do Not Translate). Also see the
+[translations converter README](translations-converter-readme) for documentation about
+the tool used to sync translations between the Android and Desktop apps.
-See [/gui/locales/README.md][gui-locales-readme] for how to easily update translations. It also
-includes documentation for which phrases and terms shouldn't be translated (Do Not Translate).
-
-### Detailed structure and script documentation
-
-The app has localized messages stored in `src/main/res/values-<locale>/` directories, where
-`<locale>` is a two letter locale and can be followed by a two letter region code. For example: `en`
-or `en-rGB`.
-
-The translated strings are based on the gettext translation files used for the desktop app. A helper
-tool is available to create the translated string resource files based on the gettext translations,
-in the `translations-converter` directory. The tool can be executed with the following commands
-(assuming Rust and Cargo are installed, if not, follow the steps in the [root README][root-readme]):
-
-```
-cd translations-converter
-cargo run
-```
-
-After the tool finishes executing, it creates the appropriate localized message files and
-directories for each locale it can find in the [`gui/locales` directory][gui-locales]. It will also
-update the [messages.pot] template file with the string messages from the Android app for which it
-did not find any translation, making it simpler to use the template for obtaining those
-translations.
-
-[root-readme]: ../README.md
[gui-locales-readme]: ../gui/locales/README.md
-[gui-locales]: ../gui/locales/
-[messages.pot]: ../gui/locales/messages.pot
+[translations-converter-readme]: ./translations-converter/README.md
diff --git a/android/translations-converter/README.md b/android/translations-converter/README.md
new file mode 100644
index 0000000000..fc389c9f05
--- /dev/null
+++ b/android/translations-converter/README.md
@@ -0,0 +1,23 @@
+# Translations converter tool
+
+A tool for helping two-way sync the translations between the Android and Desktop apps.
+
+## How to run
+
+Run the following command (requires `rust` and `cargo` which can be installed using [rustup.rs](https://rustup.rs/)):
+```bash
+cargo run
+```
+
+## Translations files
+
+The tool creates the appropriate localized message files and directories under the
+[Android project resources](android-resources) (e.g. [values-sv/strings.xml](values-sv-example))
+for each locale it can find in the [`gui/locales` directory][gui-locales]. It will also update the
+[messages.pot] template file with the string messages from the Android app for which it did not find
+any translation, making it simpler to use the template for obtaining those translations.
+
+[android-resources]: ../app/src/main/res/
+[gui-locales]: ../gui/locales/
+[messages.pot]: ../gui/locales/messages.pot
+[values-sv-example]: ../app/src/main/res/values-sv/strings.xml