Fix check_app_name.sh: resolve FIXMEs and TODOs from #2118#3126
Conversation
| # peo is only temporarily allowed due to https://github.com/WeblateOrg/weblate/issues/17455 | ||
| ALLOWLIST=("ar" "bn" "fa" "fa-IR" "he-IL" "hi" "hi-IN" "kn" "kn-IN" "ml" "mr" "peo", "ta" "ta-IN" "zh-rTW" "zh-TW") # TODO: Link values and fastlane with different codes together | ||
| ALLOWLIST=("ar" "bn" "fa" "fa-IR" "he-IL" "hi" "hi-IN" "kn" "kn-IN" "ml" "mr" "peo" "ta" "ta-IN" "zh-rTW" "zh-TW") |
There was a problem hiding this comment.
Given WeblateOrg/weblate#17455 is fixed this may be a good moment to remove peo :)
| NC='\033[0m' # No Color | ||
| NC='\033[0m' |
There was a problem hiding this comment.
Any reason you removed these comments? They're kinda helpful in understanding the code better.
| LANG=${LANG_DIRNAME#values-} # Fetch lang name | ||
| LANG=${LANG#values} # Handle "app/src/main/res/values" | ||
| LANG=${LANG:-en} # Default to en | ||
| LANG=${LANG_DIRNAME#values-} | ||
| LANG=${LANG#values} | ||
| LANG=${LANG:-en} |
There was a problem hiding this comment.
Any reason you removed these comments? They're kinda helpful in understanding the code better.
There was a problem hiding this comment.
Looks like an improvement from a quick look. I can also confirm that Fastlane and values.xml get correctly compared. For example, if I manually change it: Error: lang 'lt' title.txt app name='Catapp' does not match strings.xml app_name='Catima'.
I think it still needs a bit of extra logic to deal with stuff like es in values being es-ES in Fastlane and zh-rCN in values being zh-CN in Fastlane. I think we can probably automatically link most of those for more thorough checking.
I'll look a bit deeper into this later but it seems a great help and it's great that it also detects all the places I wrongly hardcoded it :)
Fixes #2118