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

Fix player locale being ignored #862

Merged
merged 1 commit into from
May 1, 2021
Merged

Conversation

dentmaged
Copy link
Contributor

@dentmaged dentmaged commented Apr 30, 2021

Fixes a bug where player locale was ignored due to the bundle search order. From the javadocs:

getBundle uses the base name, the specified locale, and the default locale (obtained from Locale.getDefault) to generate a sequence of candidate bundle names. If the specified locale's language, country, and variant are all empty strings, then the base name is the only candidate bundle name. Otherwise, the following sequence is generated from the attribute values of the specified locale (language1, country1, and variant1) and of the default locale (language2, country2, and variant2):

  • baseName + "_" + language1 + "_" + country1 + "_" + variant1
  • baseName + "_" + language1 + "_" + country1
  • baseName + "_" + language1
  • baseName + "_" + language2 + "_" + country2 + "_" + variant2
  • baseName + "_" + language2 + "_" + country2
  • baseName + "_" + language2
  • baseName

Screenshots showing that changing locale updates in-game:

image
image

Signed-off-by: William Jeffcock <[email protected]>
@dentmaged dentmaged requested a review from Electroid as a code owner April 30, 2021 15:56
@Electroid Electroid merged commit 51e68b5 into PGMDev:dev May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants