diff --git a/at.py b/at.py index 2d7abdb..52b77b4 100644 --- a/at.py +++ b/at.py @@ -20,6 +20,8 @@ import config app = Flask('at') app.wsgi_app = ProxyFix(app.wsgi_app) app.secret_key = config.secret_key +app.jinja_env.add_extension('jinja2.ext.i18n') +app.jinja_env.install_null_translations() updater = None from functools import wraps diff --git a/templates/main.html b/templates/main.html index 198b4d0..e141ef6 100644 --- a/templates/main.html +++ b/templates/main.html @@ -16,7 +16,11 @@ Now at hackerspace {% endfor %} + {% trans n_unk=unknown|length %} + There is {{ n_unk }} unknown device operating. + {% pluralize %} + There are {{ n_unk }} unknown devices operating. + {% endtrans %}
- There are {{ unknown|length }} unknown devices operating. Claim this device! {% endblock %}