summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomek Dubrownik <t.dubrownik@gmail.com>2012-01-29 13:46:07 +0100
committerTomek Dubrownik <t.dubrownik@gmail.com>2012-01-29 13:46:07 +0100
commitf0394c0cecf057208234167639c470a07b192eb0 (patch)
tree4b26e0aa0a3982e6004484cccc579104c73f90be
parente7a6e2418611fdacf471225c4656ff8c403139ac (diff)
downloadcheckinator-f0394c0cecf057208234167639c470a07b192eb0.tar.gz
checkinator-f0394c0cecf057208234167639c470a07b192eb0.tar.bz2
checkinator-f0394c0cecf057208234167639c470a07b192eb0.zip
pluralized it:P
-rw-r--r--at.py2
-rw-r--r--templates/main.html6
2 files changed, 7 insertions, 1 deletions
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
</li>
{% endfor %}
</ul>
+ {% trans n_unk=unknown|length %}
+ There is {{ n_unk }} unknown device operating.
+ {% pluralize %}
+ There are {{ n_unk }} unknown devices operating.
+ {% endtrans %}
<hr>
- There are {{ unknown|length }} unknown devices operating.
<a href="claim">Claim this device!</a>
{% endblock %}