Skip to content

Make int/float parsing locale aware#178

Merged
pfarrel merged 3 commits into
masterfrom
locale-aware-number-parse
Feb 26, 2018
Merged

Make int/float parsing locale aware#178
pfarrel merged 3 commits into
masterfrom
locale-aware-number-parse

Conversation

@pfarrel

@pfarrel pfarrel commented Feb 26, 2018

Copy link
Copy Markdown
Contributor

Currently, the int and float filters always parse with the system default locale. This doesn't make much sense, when jinjava is otherwise locale aware. Instead this PR use a NumberFormat based on JinjavaConfig::getLocale.

This could definitely cause a change in behaviour for users who have been using a non-default locale, if that locale has different number formatting rules.

What's protocol here for a version number bump @jboulter ?

@boulter

boulter commented Feb 26, 2018

Copy link
Copy Markdown
Contributor

Looks good. I think it makes sense to do a minor version bump.

@pfarrel pfarrel merged commit 14629a9 into master Feb 26, 2018
@pfarrel pfarrel deleted the locale-aware-number-parse branch February 26, 2018 18:03
@anthmatic

Copy link
Copy Markdown
Contributor

RE: #184 , is this breaking change expected?

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.

3 participants