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

Auto-detect locale on Android #13561

Merged
merged 5 commits into from Jun 5, 2023
Merged

Conversation

grorp
Copy link
Member

@grorp grorp commented Jun 4, 2023

This PR makes Minetest for Android use the system language if the user hasn't set a custom language in the Minetest settings. I also did some code cleanup.

Related PR: #11435

To do

This PR is a Ready for Review.

How to test

Open Minetest for Android on your phone, verify that it uses your system language if you haven't set a custom language in the Minetest settings.

grorp added 3 commits June 4, 2023 13:53
- Remove unused putMessageBoxResult function
- Rename unused javaStringToUTF8 function to readJavaString and use it where possible
- Improve the error messages
@srifqi srifqi added Android Feature ✨ PRs that add or enhance a feature labels Jun 4, 2023
Copy link
Member

@srifqi srifqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a mapping for language code changes (as described in the comments).

@Zughy Zughy added the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Jun 4, 2023
Co-authored-by: Gregor Parzefall <gregor.parzefall@posteo.de>
Copy link
Member

@srifqi srifqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it and it works. The code clean up looks good, too.

I tested it on Android 6.0.1 (Samsung Galaxy J7) and 13 (Samsung Galaxy A72) with Indonesian (id) as the system language.

@srifqi srifqi added One approval ✅ ◻️ and removed Action / change needed Code still needs changes (PR) / more information requested (Issues) labels Jun 4, 2023
Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@oong819
Copy link
Contributor

oong819 commented Jun 5, 2023

Minetest formspec can cutoff many translations, but this may help people who dont know English

@sfan5 sfan5 merged commit a146326 into minetest:master Jun 5, 2023
13 checks passed
arihant2math pushed a commit to arihant2math/minetest that referenced this pull request Jun 11, 2023
Wuzzy2 pushed a commit to Wuzzy2/minetest that referenced this pull request Jul 31, 2023
@grorp grorp deleted the android-auto-locale branch December 18, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants