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

Added localization demo #1481

Closed
wants to merge 18 commits into from
Closed

Added localization demo #1481

wants to merge 18 commits into from

Conversation

mehmetkose
Copy link

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.

@ajdavis
Copy link
Contributor

ajdavis commented Aug 7, 2015

@bdarnell if you think we'd like to add this demo, I can do the initial code review.

@bdarnell
Copy link
Member

bdarnell commented Aug 7, 2015

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

@abdelouahabb
Copy link

excited to see what comes afer ;)
thank you guys!

maartenbreddels and others added 17 commits October 19, 2015 17:24
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.
@codecov-io
Copy link

Current coverage is 87.71%

Merging #1481 into master will increase coverage by +0.04% as of cab26d3

@@            master   #1481   diff @@
======================================
  Files           76      76       
  Stmts        19009   19047    +38
  Branches      2250    2253     +3
  Methods          0       0       
======================================
+ Hit          16667   16708    +41
- Partial        601     602     +1
+ Missed        1741    1737     -4

Review entire Coverage Diff as of cab26d3

Powered by Codecov. Updated on successful CI builds.

@bdarnell bdarnell closed this Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants