[android] Fixed missing Traditional Chinese localization

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2023-02-20 19:09:28 +01:00 committed by Alexander Borsuk
parent 29ff4aca13
commit 6956087114
2 changed files with 4 additions and 1 deletions

View file

@ -9,4 +9,4 @@ android.useAndroidX=true
android.enableJetifier=true
android.native.buildOutput=verbose
# Autogenerated by tools/unix/generate_localizations.sh
supportedLocalizations=ar,be,bg,ca,cs,da,de,el,en,en_GB,es,es_MX,et,eu,fa,fi,fr,fr_CA,he,hi,hu,id,in,it,ja,ko,mr,nb,ne,nl,pl,pt,pt_BR,ro,ru,sk,sv,sw,th,tr,uk,vi,zh_Hans,zh_Hant
supportedLocalizations=ar,be,bg,ca,cs,da,de,el,en,en_GB,es,es_MX,et,eu,fa,fi,fr,fr_CA,he,hi,hu,id,in,it,ja,ko,mr,nb,ne,nl,pl,pt,pt_BR,ro,ru,sk,sv,sw,th,tr,uk,vi,zh,zh_HK,zh_MO,zh_TW

View file

@ -68,6 +68,9 @@ cat "$STRINGS_PATH"/{strings,types_strings}.txt> "$MERGED_FILE"
# Generate list of languages and add list in gradle.properties to be used in build.gradle in resConfig
SUPPORTED_LOCALIZATIONS="supportedLocalizations="$(sed -nEe "s/ +([a-zA-Z]{2}(-[a-zA-Z]{2,})?) = .*$/\1/p" "data/strings/strings.txt" | sort -u | tr '\n' ',' | sed -e 's/-/_/g' -e 's/,$//')
# Chinese locales should correspond to Android codes.
SUPPORTED_LOCALIZATIONS=${SUPPORTED_LOCALIZATIONS/zh_Hans/zh}
SUPPORTED_LOCALIZATIONS=${SUPPORTED_LOCALIZATIONS/zh_Hant/zh_HK,zh_MO,zh_TW}
GRADLE_PROPERTIES="$OMIM_PATH/android/gradle.properties"
if [ "$SUPPORTED_LOCALIZATIONS" != "$(grep supportedLocalizations "$GRADLE_PROPERTIES")" ]; then
sed -i .bak 's/supportedLocalizations.*/'"$SUPPORTED_LOCALIZATIONS"'/' "$GRADLE_PROPERTIES"