Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trimming of resource locales from build.gradle.kts #300

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

davecraig
Copy link
Contributor

@davecraig davecraig commented Dec 14, 2024

Originally this PR was written as follows:

Since Android 13 it's been possible to set the app language from the App Info dialog for any app. Although we support as far back as Android 11, the app will still use the system configured language just not a different language for the app prior to Android 13. This change removes our in-app language configuration and leaves it to the System. It also fixes support for Brazil, UK and Canada regions where the resources were being stripped out due to not being in the list in resourceConfigurations in build.gradle.kts. The behaviour has been tested on API 35 and API 30 and both work correctly.

However, I've changed it so that it's now just the minimal change to get the regional languages working.

@davecraig
Copy link
Contributor Author

I have also just tested only changing the contents of resourceConfigurations and that does seem to fix the support of the regional languages too. Leaving it up to Android seems like the best idea, but we could leave that until a later date if we really needed to.

Resources that aren't used get trimmed during the build process, but this
setting removes all resources that aren't in the list. This includes those
in AppCompat and Google Play Services libraries which the app uses. Given
that those strings might be used, I think it's reasonable to keep them in
and it takes away another place where we have to list all of the languages
that we support and the risk of it getting out of sync.
@davecraig
Copy link
Contributor Author

I've changed this so that I'm only landing the removal of resourceConfigurations from build.gradle.kts. https://github.com/davecraig/Soundscape-AndroidTest/tree/remove-in-app-language contains the original change for here should we wish it.

@davecraig davecraig changed the title Remove in app language screen and use system configured languages Remove trimming of resource locales from build.gradle.kts Dec 15, 2024
@davecraig davecraig merged commit 1d75b9c into Scottish-Tech-Army:main Dec 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant