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

Validate Locale parameter formats while constructing #309

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

akx
Copy link
Member

@akx akx commented Dec 30, 2015

This avoids being able to construct mongrel locales with language = 'en_US', territory = None.

Fixes #283

⚠️ Warning ⚠️

This might actually be a fairly disruptive change to the users of the library who have come to expect they can build locales with Locale("en_US").

@codecov-io
Copy link

Current coverage is 89.49%

Merging #309 into master will increase coverage by +0.09% as of 51fd1f3

@@            master    #309   diff @@
======================================
  Files           23      23       
  Stmts         3736    3752    +16
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           3340    3358    +18
  Partial          0       0       
+ Missed         396     394     -2

Review entire Coverage Diff as of 51fd1f3

Powered by Codecov. Updated on successful CI builds.

@akx akx added this to the Babel 2.3/3.0 milestone Jan 3, 2016
@akx akx force-pushed the validate-locale-ctor branch 2 times, most recently from 6cb6101 to 98a786d Compare January 11, 2016 10:04
@akx
Copy link
Member Author

akx commented Jan 11, 2016

Come to think of it, this paves the way nicely for #30; we can now derive a FuzzyLocale class or similar that doesn't validate as strictly. :)

@danjamesmay
Copy link

akx:
Come to think of it, this paves the way nicely for #30; we can now derive a FuzzyLocale class or similar > that doesn't validate as strictly. :)

Is there some kind of roadmap as to when fuzzy locales will be implemented? I have a requirement that needs the ability to define custom/fuzzy locales, so it would be great to know when I can implement this.

@akx akx removed this from the Babel 2.3 milestone Feb 3, 2016
@akx
Copy link
Member Author

akx commented Feb 3, 2016

Moved this out of the next point release due to the warning above.

@akx akx added this to the Babel 3 milestone Apr 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Locale __init__/parse inconsistencies
5 participants