Skip to content

Locale fixes#170

Merged
hinerm merged 4 commits into
masterfrom
locale-fixes
Jun 9, 2015
Merged

Locale fixes#170
hinerm merged 4 commits into
masterfrom
locale-fixes

Conversation

@hinerm

@hinerm hinerm commented Jun 8, 2015

Copy link
Copy Markdown
Member

Makes UnitUtils non-US-centric, and updates the corresponding unit test to pass in non-US locales.

hinerm added 2 commits June 8, 2015 10:42
The purpose of the UnitUtils is to return back a String for a given
number of bytes in the format of the user's Locale.

Added javadoc clarifying this
@hinerm

hinerm commented Jun 8, 2015

Copy link
Copy Markdown
Member Author

@gab1one Would you mind checking out this branch and building it on your machine? It changes the fix you submitted last week to not force US Locale, but instead format the test strings for the current locale.. just want to be sure the unit tests don't fail for you now. Thanks!

@gab1one

gab1one commented Jun 8, 2015

Copy link
Copy Markdown
Contributor

Sadly that does not work at all (the local() method has no effect), I think we need to split the number from the unit or something.

hinerm added 2 commits June 9, 2015 09:24
Move the numeric formatting to a utility method.
Split the test strings to numeric and label components, and used the
same formatting as used in UnitUtils.

This should mitigate locale differences.
@hinerm

hinerm commented Jun 9, 2015

Copy link
Copy Markdown
Member Author

I think we need to split the number from the unit or something.

@gab1one yep I agree. When the test strings contain the numeric value + label, they don't get numeric formatting.

Anyway I force pushed a new patch set that should format the test strings the same as UnitUtils. Can you test again?

Much thanks.

@gab1one

gab1one commented Jun 9, 2015

Copy link
Copy Markdown
Contributor

It works now, thank you 👍

hinerm added a commit that referenced this pull request Jun 9, 2015
Removes US Locale bias from UnitUtils and UnitUtilsTest.
@hinerm hinerm merged commit be8e1a5 into master Jun 9, 2015
@hinerm hinerm deleted the locale-fixes branch June 9, 2015 19:02
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