From f0394c0cecf057208234167639c470a07b192eb0 Mon Sep 17 00:00:00 2001 From: Tomek Dubrownik Date: Sun, 29 Jan 2012 13:46:07 +0100 Subject: [PATCH] pluralized it:P --- at.py | 2 ++ templates/main.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 %}