# HG changeset patch # User Peter Koppatz # Date 1390114385 -3600 # Node ID 95d788307e42da15f2394109c3a97184e4a30bca # Parent 3b768d0f09ef1df32d249815e7278e692869e680 Translations: after creating mo file from po file, it works diff -r 3b768d0f09ef -r 95d788307e42 pymove3d.py --- a/pymove3d.py Sat Jan 18 21:05:22 2014 +0100 +++ b/pymove3d.py Sun Jan 19 07:53:05 2014 +0100 @@ -20,14 +20,15 @@ app = Flask(__name__) babel = Babel(app) +app.config['BABEL_DEFAULT_LOCALE'] = 'de' + def get_topmenue(): - topmenue = [('/competition', _('Competition')), - ('/task', _('Task')), - ('/submission', _('Submission')), - ('/coursematerial', _('Coursematerial')), - ] - - return topmenue + menue = [('/competition', u'Competition'), + ('/task', 'Task'), + ('/submission', u'Submission'), + ('/coursematerial', u'Coursematerial'), + ] + return menue app.jinja_env.globals.update(get_topmenue=get_topmenue) diff -r 3b768d0f09ef -r 95d788307e42 templates/theme.html --- a/templates/theme.html Sat Jan 18 21:05:22 2014 +0100 +++ b/templates/theme.html Sun Jan 19 07:53:05 2014 +0100 @@ -43,13 +43,10 @@ diff -r 3b768d0f09ef -r 95d788307e42 translations/de/LC_MESSAGES/messages.mo Binary file translations/de/LC_MESSAGES/messages.mo has changed diff -r 3b768d0f09ef -r 95d788307e42 translations/de/LC_MESSAGES/messages.po --- a/translations/de/LC_MESSAGES/messages.po Sat Jan 18 21:05:22 2014 +0100 +++ b/translations/de/LC_MESSAGES/messages.po Sun Jan 19 07:53:05 2014 +0100 @@ -3,14 +3,13 @@ # This file is distributed under the same license as the PROJECT project. # FIRST AUTHOR , 2014. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2014-01-18 20:46+0100\n" -"PO-Revision-Date: 2014-01-18 20:46+0100\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2014-01-19 07:48+0100\n" +"Last-Translator: Peter Koppatz \n" "Language-Team: de \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n"