From c35441f5f71ebeb00ae0433ac47ddc9a278dfa53 Mon Sep 17 00:00:00 2001 From: Julien Humbert Date: Mon, 7 Nov 2022 12:27:26 +0900 Subject: [PATCH 1/2] Add per-app language preferences --- mastodon/build.gradle | 4 +++ mastodon/src/main/res/xml/locales_config.xml | 34 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 mastodon/src/main/res/xml/locales_config.xml diff --git a/mastodon/build.gradle b/mastodon/build.gradle index 66296c4cf..d7adcd9be 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -12,6 +12,10 @@ android { versionCode 43 versionName "1.1.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + resConfigs "en", "ar-rSA", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES", + "eu-rES", "fi-rFI", "fr-rFR", "gl-rES", "hr-rHR", "hy-rAM", "it-rIT", "iw-rIL", + "ja-rJP", "kab", "ko-rKR", "oc-rFR", "pl-rPL", "pt-rBR", "pt-rPT", "ru-rRU", + "sv-rSE", "th-rTH", "tr-rTR", "uk-rUA", "vi-rVN", "zh-rCN", "zh-rTW" } buildTypes { diff --git a/mastodon/src/main/res/xml/locales_config.xml b/mastodon/src/main/res/xml/locales_config.xml new file mode 100644 index 000000000..67b222e06 --- /dev/null +++ b/mastodon/src/main/res/xml/locales_config.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 21927d2e250fa8c7bb4fdaa40ff0fb4adb551523 Mon Sep 17 00:00:00 2001 From: Julien Humbert Date: Mon, 7 Nov 2022 12:32:20 +0900 Subject: [PATCH 2/2] Add missing line in Android Manifest --- mastodon/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/mastodon/src/main/AndroidManifest.xml b/mastodon/src/main/AndroidManifest.xml index 23694aa2f..897069a9d 100644 --- a/mastodon/src/main/AndroidManifest.xml +++ b/mastodon/src/main/AndroidManifest.xml @@ -16,6 +16,7 @@ android:allowBackup="true" android:label="@string/app_name" android:supportsRtl="true" + android:localeConfig="@xml/locales_config" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:theme="@style/Theme.Mastodon.AutoLightDark"