Validate Locale parameter formats while constructing by akx · Pull Request #309 · python-babel/babel · GitHub
Skip to content

Validate Locale parameter formats while constructing#309

Open
akx wants to merge 2 commits into
python-babel:masterfrom
akx:validate-locale-ctor
Open

Validate Locale parameter formats while constructing#309
akx wants to merge 2 commits into
python-babel:masterfrom
akx:validate-locale-ctor

Conversation

@akx

@akx akx commented Dec 30, 2015

Copy link
Copy Markdown
Member

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
Copy Markdown

@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

akx commented Jan 11, 2016

Copy link
Copy Markdown
Member Author

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
Copy Markdown

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 force-pushed the validate-locale-ctor branch from cf47d0a to b1ff3da Compare January 23, 2016 20:00
@akx akx removed this from the Babel 2.3 milestone Feb 3, 2016
@akx

akx commented Feb 3, 2016

Copy link
Copy Markdown
Member Author

@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