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
Added localization demo #1481
Added localization demo #1481
Conversation
@bdarnell if you think we'd like to add this demo, I can do the initial code review. |
We do need an i18n demo, but i18n is a process, more than just "how do I use these functions". At a minimum, any demo needs to reasonably represent a real application (no hard-coded locales), and be ready for message extraction (which we unfortunately don't support yet. I consider Tornado's i18n support incomplete without either a solution for #622 or a non-gettext-based message extractor, although the only internationalized Tornado project I've actually worked on was Friendfeed, which got by without message extraction unless they had something that wasn't open-sourced). I had actually started a long time ago to make a demo based on http://google-opensource.blogspot.com/2011/06/pseudolocalization-to-catch-i18n-errors.html. I should probably dust off that branch: https://github.com/tornadoweb/tornado/compare/master...bdarnell:locale?expand=1 |
excited to see what comes afer ;) |
For unittesting I start and stop the server in setUp and tearDown. If I use Application.listen I don't have a reference to the HTTPServer and cannot close the socket. Binding it to the same address the next time will result in a address in use error. If the server is returned, calling close on it will allow the address/port to be reused.
If an HTTP response contains both Content-Length and Transfer-Encoding headers, flag this as an error as per RFC 7230, Section 3.3.3#3. Also added a unit test to validate the code.
Make test_root_static_path more robust.
Check for Content-Length and Transfer-Encoding
Return HTTPServer in Application.listen
Remove redundant parts of README; link to tornadoweb.org instead.
Current coverage is
|
I think people are looking for details on the localization;
https://groups.google.com/forum/#!topic/python-tornado/olR9J3ThH8I
I wrote a localization demo quickly. Maybe this could help better understanding.