From 85b555d4835a6715e2bd9527151956f56af9cd24 Mon Sep 17 00:00:00 2001 From: Pun Butrach Date: Sun, 21 Apr 2024 12:24:27 +0700 Subject: [PATCH] Enable automatic per-app language support (#4312) * Enable automatic per-app language support This will send list of available localisation to Android for then user to change the languages in Settings. The default language for Lawnchair is set to English American (en-us) Signed-off-by: GitHub * Enable pseudolocales for Debug variant * Move pseudoLocalesEnabled into all block --------- Signed-off-by: GitHub Co-authored-by: Goooler --- build.gradle | 11 +++++++++-- res/resources.properties | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 res/resources.properties diff --git a/build.gradle b/build.gradle index 79620234af..c0843a0c73 100644 --- a/build.gradle +++ b/build.gradle @@ -154,6 +154,10 @@ android { } } + androidResources { + generateLocaleConfig true + } + buildFeatures { aidl true buildConfig true @@ -204,15 +208,18 @@ android { .toArray() buildTypes { + all { + signingConfig releaseSigning + pseudoLocalesEnabled true + } + debug { applicationIdSuffix ".debug" resValue("string", "derived_app_name", "Lawnchair (Debug)") - signingConfig releaseSigning } release { resValue("string", "derived_app_name", "Lawnchair") - signingConfig releaseSigning minifyEnabled true shrinkResources true proguardFiles proguardFilesFromAosp + "proguard.pro" diff --git a/res/resources.properties b/res/resources.properties new file mode 100644 index 0000000000..467b3efec9 --- /dev/null +++ b/res/resources.properties @@ -0,0 +1 @@ +unqualifiedResLocale=en-US