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

I18n #155

Closed
wants to merge 45 commits into from
Closed

I18n #155

wants to merge 45 commits into from

Conversation

trasher
Copy link
Contributor

@trasher trasher commented Oct 11, 2014

Implement gettext translations using Flask Babel extension.

#-*- coding: utf-8 -*-

"""
(c) 2012-2014 - Copyright Pierre-Yves Chibon <pingou@pingoured.fr>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this one is not accurate ;-)

@pypingou
Copy link
Member

Couple of comments and a generic question:
Could we make it optional, as in, if python-flask-babel is installed translate the UI, otherwise, stick to english?

@pypingou
Copy link
Member

Also: I think the requirements.txt file needs adjustments ;-)

@trasher
Copy link
Contributor Author

trasher commented Oct 13, 2014

« Could we make it optional[...] »

I really do not know... gettext and lazy gettext functions are actually resolved using a from flask.ext.babel import gettext

We maybe could use a fedocal.gettext which should test if babel is present and returns the original string if not; but I do not know how this could be achieved in python. I'll take a look.

@pypingou pypingou mentioned this pull request Oct 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants