diff options
| author | Albin <albin@mullvad.net> | 2023-01-19 12:23:10 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2023-01-19 12:23:10 +0100 |
| commit | 6699978cd5bfb411356a6534b9121533120d17f0 (patch) | |
| tree | f730e60299bcf10ae8add9a69e8b40c62ec4cbe7 /android | |
| parent | fd5b7551cdbbb9225d2d41a9951b2a5a1b528301 (diff) | |
| parent | 0fddb327b39fa07518bbca1e7a96ce3c6e90443c (diff) | |
| download | mullvadvpn-6699978cd5bfb411356a6534b9121533120d17f0.tar.xz mullvadvpn-6699978cd5bfb411356a6534b9121533120d17f0.zip | |
Merge branch 'improve-android-documentation'
Diffstat (limited to 'android')
| -rw-r--r-- | android/README.md | 48 | ||||
| -rw-r--r-- | android/translations-converter/README.md | 23 |
2 files changed, 38 insertions, 33 deletions
diff --git a/android/README.md b/android/README.md index 05bee5ad4b..0dae157ada 100644 --- a/android/README.md +++ b/android/README.md @@ -1,9 +1,15 @@ # Mullvad VPN Android app This directory contains the Android project as well as related files and information. Apart from the -content of this directory, the Android project also relies on [wireguard-go](../wireguard/) and the -[mullvad-daemon](../mullvad-daemon/) which are both bundled as shared libraries into the assembled -APK. +content of this directory, the Android project also relies on building [wireguard-go](../wireguard/) +and the [mullvad-daemon](../mullvad-daemon/) which are both bundled as shared libraries into the +assembled APK. + +The app is available for download on +[our website](https://mullvad.net/download/android/), +[GitHub Releases](https://github.com/mullvad/mullvadvpn-app/releases), +[F-Droid](https://f-droid.org/packages/net.mullvad.mullvadvpn/) and +[Google Play](https://play.google.com/store/apps/details?id=net.mullvad.mullvadvpn). ## Quick start @@ -21,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 - -### How to update translations - -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 -``` +## Translations and localization -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. +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. -[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 |
