Fixes #733: tooltips with language names
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 13 Aug 2010 10:39:37 +0000 (12:39 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 13 Aug 2010 10:39:37 +0000 (12:39 +0200)
wolnelektury/settings.py
wolnelektury/templates/base.html

index 8a82221..b3be709 100644 (file)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 # Django settings for wolnelektury project.
 from os import path
 
 # Django settings for wolnelektury project.
 from os import path
 
@@ -34,14 +35,14 @@ LANGUAGE_CODE = 'pl'
 gettext = lambda s: s
 
 LANGUAGES = tuple(sorted([
 gettext = lambda s: s
 
 LANGUAGES = tuple(sorted([
-    ('pl', gettext('Polish')),
-    ('de', gettext('German')),
-    ('en', gettext('English')),
-    ('lt', gettext('Lithuanian')),
-    ('fr', gettext('French')),
-    ('ru', gettext('Russian')),
-    ('es', gettext('Spanish')),
-    ('uk', gettext('Ukrainian')),
+    ('pl', u'Polski'),
+    ('de', u'Deutsch'),
+    ('en', u'English'),
+    ('lt', u'Lietuvių'),
+    ('fr', u'Français'),
+    ('ru', u'Русский'),
+    ('es', u'Español'),
+    ('uk', u'Українська'),
 ], key=lambda x: x[0]))
 
 
 ], key=lambda x: x[0]))
 
 
index da5ab63..393eec5 100644 (file)
@@ -51,7 +51,7 @@
                                <form action="{% url django.views.i18n.set_language %}" method="POST">
                                        {% spaceless %}
                                        {% for lang in LANGUAGES %}                                          
                                <form action="{% url django.views.i18n.set_language %}" method="POST">
                                        {% spaceless %}
                                        {% for lang in LANGUAGES %}                                          
-                                           <button type="submit" name="language" 
+                                           <button type="submit" name="language" title="{{ lang.1 }}"
                                                        class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %} {% if forloop.last %}last{% endif %}" 
                                                        value="{{ lang.0 }}">{{ lang.0|upper }}</button>
                                        {% endfor %}    
                                                        class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %} {% if forloop.last %}last{% endif %}" 
                                                        value="{{ lang.0 }}">{{ lang.0|upper }}</button>
                                        {% endfor %}