Use translated title with default subtext if it exists

This commit is contained in:
Sylvia van Os
2024-02-18 19:13:11 +01:00
parent 4dcafe0abe
commit f9db51c8d7

View File

@@ -13,14 +13,18 @@ for lang in "$script_location/../../fastlane/metadata/android/"*; do
elif grep -q title.txt; then
# No result, try splitting title.txt on (en dash)
IFS='' read -r appname subtext < title.txt
else
elif grep -q - title.txt; then
# No result, try splitting on - (dash)
IFS='-' read -r appname subtext < title.txt
else
# No result, use the full title as app name and default subtext
appname=$(< title.txt)
subtext="Loyalty Card Wallet"
fi
export appname=${appname%% }
export subtext=${subtext## }
# If there is subtext, change the .svg accordingly
if [ -n "$subtext" ]; then
# If the appname isn't Catima or there is subtext, change the .svg accordingly
if [ "$appname" != "Catima" ] || [ -n "$subtext" ]; then
perl -pi -e 's/Catima/$ENV{appname}/' featureGraphic.svg
perl -pi -e 's/Loyalty Card Wallet/$ENV{subtext}/' featureGraphic.svg
# Set correct font or font size for language if needed