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

[no squash] Init & gettext cleanups #14130

Merged
merged 3 commits into from Dec 29, 2023
Merged

[no squash] Init & gettext cleanups #14130

merged 3 commits into from Dec 29, 2023

Conversation

sfan5
Copy link
Member

@sfan5 sfan5 commented Dec 19, 2023

To do

This PR is Ready for Review.

How to test

  • test that Minetest + localization still works on linux ✔️
  • same for windows ✔️
  • same for android ✔️

@sfan5 sfan5 added @ Startup / Config / Util Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Code quality labels Dec 19, 2023
@SmallJoker
Copy link
Member

SmallJoker commented Dec 21, 2023

My findings on Android 6.0

  • 5.7.0: locale works
  • 5.8.0: locale works (release apk)
  • 5.8.0: locale works (self-signed apk)
  • master cad8e89: locale broken (English only) (self-signed apk)
  • this PR: locale broken (English only) (self-signed apk)

I compared the verbose logs but could not find any difference. Only INFO[Main]: Message locale is now set to: C is logged for all of them.
Someone already broke gettext before this PR.

EDIT: Tested on an actual phone, thus I'd prefer to not bisect this issue manually.

@grorp
Copy link
Member

grorp commented Dec 22, 2023

I tested this on Android too. For me, localization (including automatic locale selection) still works on the latest "master" branch. However, it's broken by this PR.

@sfan5 sfan5 added the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Dec 22, 2023
@sfan5 sfan5 removed the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Dec 22, 2023
@sfan5
Copy link
Member Author

sfan5 commented Dec 22, 2023

Fixed and re-tested.
Android behaves a bit weird and requires LANG to be set even though LANGUAGE should suffice and have higher priority.

More info:
Android 11, localization works for me with this PR. Both auto-detect and setting a language manually.
it still logs INFO[Main]: Message locale is now set to: C however 🤷

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

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

This time, gettext works properly on Android.
Works on Linux, 64-bit.

The code changes look correct.

@sfan5 sfan5 merged commit edd947b into minetest:master Dec 29, 2023
13 checks passed
@sfan5 sfan5 deleted the initclean branch December 29, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️ @ Startup / Config / Util
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants