From b434feed0b3fbe7f1452a25164249da1844699a3 Mon Sep 17 00:00:00 2001 From: David Perez Date: Mon, 12 Feb 2024 14:06:21 -0600 Subject: [PATCH] Allow for more language support at an OS level (#998) --- app/build.gradle.kts | 51 +++---------------------- app/src/main/AndroidManifest.xml | 2 +- app/src/main/res/resources.properties | 1 + app/src/main/res/xml/locales_config.xml | 43 --------------------- 4 files changed, 7 insertions(+), 90 deletions(-) create mode 100644 app/src/main/res/resources.properties delete mode 100644 app/src/main/res/xml/locales_config.xml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 20aa89aed..25093d8be 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,52 +28,6 @@ android { versionCode = 1 versionName = "1.0.0" - // This is so the build system only includes language resources in the APK for these - // languages, preventing translated strings from being included from other libraries that - // might support languages this app does not. - resourceConfigurations += arrayOf( - "af", - "be", - "bg", - "ca", - "cs", - "da", - "de", - "el", - "en", - "en-rGB", - "es", - "et", - "fa", - "fi", - "fr", - "hi", - "hr", - "hu", - "in", - "it", - "iw", - "ja", - "ko", - "lv", - "ml", - "nb", - "nl", - "pl", - "pt-rBR", - "pt-rPT", - "ro", - "ru", - "sk", - "sv", - "th", - "tr", - "uk", - "vi", - "zh-rCN", - "zh-rTW" - ) - ksp { // The location in which the generated Room Database Schemas will be stored in the repo. arg("room.schemaLocation", "$projectDir/schemas") @@ -82,6 +36,11 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } + androidResources { + @Suppress("UnstableApiUsage") + generateLocaleConfig = true + } + signingConfigs { getByName("debug") { keyAlias = "androiddebugkey" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 38fcc9ef5..05f781cc0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -18,7 +18,6 @@ android:fullBackupContent="@xml/backup_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" - android:localeConfig="@xml/locales_config" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" @@ -104,6 +103,7 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -