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

Fusion locales only when getting String #628

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

Shallowmallow
Copy link
Contributor

I had added an en.properties but somehow when I was under en_US locale
I didn't see the "translated version" which is in lower case

image

The reason was that only once you parsed en_US strings, it would add the "parent" strings. But my last parsed file one was as an "en" one and not an "en_US" one, so en strings were not added to en_US ones.

The solution I thought was to "fusion" en and en_US strings only in getStrings. Not only does it fix the bug but it saves space, as you don't have duplicate strings in en and en_US

@ianharrigan
Copy link
Member

Its weird, i thought this already happened somehow, like if you it couldnt find a string in en_US it would look in en or something? Maybe i misremembered?

Also, can we call it "mergedLocale" or something... "fusioned" sounds odd

@Shallowmallow
Copy link
Contributor Author

Shallowmallow commented Sep 2, 2024

Renamed.

Maybe i misremembered?

Looking at the code, It happens when you don't have the same language, if no chinese, it will look for en locale. Maybe you're thinking of this ?

@ianharrigan ianharrigan merged commit 8a501e3 into haxeui:master Sep 2, 2024
1 check passed
@skial skial mentioned this pull request Sep 4, 2024
1 task
@Shallowmallow Shallowmallow deleted the LocaleFix branch November 16, 2024 08:17
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.

2 participants