Created a Babel instance in __init__.py.
Added list of supported languages to config.py.
Added a locale selector to app/views.py.
This view function will be called before each request to let us choose the language in which response is produced.
The Accept-Languages header sent by the browser is read here and the best matching language from our LANGUAGES dict is returned.
Added a Babel config file.
First two lines are filename patterns for Python files and HTML templates.
Last line is a bunch of extensions.
Added gettext calls to all strings inside flash().
app/views.py.
In base template, put up the stuff in the navbar for translation.
Marked the post template for translation.
Not so easy.
Added a make_valid_nickname method to User model.
This is to prevent people from registering nicknames with embedded HTML/JS.
Added a make_valid_nickname call to the after_login handler in app/views.py.
Added *.mo to .gitignore.
Integrated Babel into app/forms.py.
Added Babel to 404.html.
Added Babel to 500.html.
Added moment-es.min.js for Spanish version of moment.js.
Added Babel to base template.
Added Babel to edit template.
Added Babel to follower_email template.
Added Babel to follower_email text file.
Added Babel to index template.
Added further Babel to index template.