Permalink
Browse files

breadcrumbs fix, tho it's ugly

  • Loading branch information...
1 parent 1f4701d commit 22319b640cc9e90ab08cbec33c17ad4e029d4f3b @tojuhaka committed Mar 25, 2012
Showing with 10 additions and 7 deletions.
  1. BIN .coverage
  2. +10 −7 easyblog/utilities.py
View
Binary file not shown.
View
@@ -89,17 +89,20 @@ def provides(context, interface):
# translated
def translate(st, lang):
_dict = {
- 'blogs': {'fi': u'Blogit'},
- 'news': {'fi': u'Uutiset'},
- 'about': {'fi': u'Meistä'},
- 'contact': {'fi': u'Yhteystiedot'},
- 'home': {'fi': u'Pääsivu'},
- 'users': {'fi': u'Käyttäjät'}
+ 'blogs': {'fi': u'Blogit', 'en': u'Blogs'},
+ 'news': {'fi': u'Uutiset', 'en': u'Uutiset'},
+ 'about': {'fi': u'Meistä', 'en': u'About'},
+ 'contact': {'fi': u'Yhteystiedot', 'en': u'Contact'},
+ 'home': {'fi': u'Pääsivu', 'en': u'Home'},
+ 'users': {'fi': u'Käyttäjät', 'en': u'Users'}
}
try:
translated = _dict[st][lang[0]]
except KeyError:
- translated = st
+ try:
+ translated = _dict[st]['fi']
+ except KeyError:
+ translated = st
return translated

0 comments on commit 22319b6

Please sign in to comment.