diff --git a/src/papiezator/locale/de/LC_MESSAGES/django.mo b/src/papiezator/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 0000000..4756d23 Binary files /dev/null and b/src/papiezator/locale/de/LC_MESSAGES/django.mo differ diff --git a/src/papiezator/locale/de/LC_MESSAGES/django.po b/src/papiezator/locale/de/LC_MESSAGES/django.po new file mode 100644 index 0000000..8568de7 --- /dev/null +++ b/src/papiezator/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-02-06 16:10+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: templates/papiezator/index.html:36 +msgid "Papalizator sportowy" +msgstr "Willkommen beim Portal Technik" + +#: templates/papiezator/index.html:40 +msgid "Jan Paweł II wypełniał małe strony" +msgstr "" +"Das ist jedoch umstritten, da zum Teil Wurfhölzer parallel zu Wurfeisen " +"verwendet wurden" + +#: templates/papiezator/index.html:51 +msgid "How do i popes?" +msgstr "Unter anderem Heizwerke und Kleinfeuerstätten von Siedlungen?" + +#: templates/papiezator/index.html:53 +msgid "simply append width/height to the url" +msgstr "Über die äußeren Eigenschaften der Braunkohle wird diese in:" + +#: templates/papiezator/index.html:58 +msgid "Get your popes" +msgstr "Donaudampfschiff" + +#: templates/papiezator/index.html:64 +msgid "Get your popes today" +msgstr "Ahrtsgesellschaftskapitän" diff --git a/src/papiezator/templates/papiezator/index.html b/src/papiezator/templates/papiezator/index.html index 4f06cff..4071170 100644 --- a/src/papiezator/templates/papiezator/index.html +++ b/src/papiezator/templates/papiezator/index.html @@ -1,6 +1,7 @@ {% load staticfiles %} +{% load i18n %} @@ -25,16 +26,18 @@ + {% get_current_language as LANGUAGE_CODE %} + Fork me on $%#@^%@^%
-

Papalizator sportowy

+

{% trans "Papalizator sportowy" %}

- Jan Paweł II wypełniał małe strony + {% trans "Jan Paweł II wypełniał małe strony" %}
@@ -45,20 +48,20 @@ -

How do i popes?

+

{% trans 'How do i popes?' %}

-

simply append width/height to the url

+

{% trans 'simply append width/height to the url' %}

           {{ absolute_url }}
-

Get your popes

+

{% trans 'Get your popes' %}

-

Get your popes today

+

{% trans 'Get your popes today' %}

@@ -68,4 +71,3 @@
- diff --git a/src/papiezator/views.py b/src/papiezator/views.py index 54029cf..a634f73 100644 --- a/src/papiezator/views.py +++ b/src/papiezator/views.py @@ -4,11 +4,13 @@ from django.core.urlresolvers import reverse from papiezator.papiezator_settings import LOLGITHUB_URL from papiezator.pope_utils import get_pope, http_return_image from papiezator.models import Pope - +from django.utils import translation def index(request, pope=None): - if pope: + if pope == 'Benedictus_XVI': + translation.activate('de') + pope = Pope.objects.filter(name=pope.replace('_', ' ')).first() if pope: pope = pope.id diff --git a/src/views.py b/src/views.py new file mode 100644 index 0000000..1061ad1 --- /dev/null +++ b/src/views.py @@ -0,0 +1 @@ +translation.activate(lang_code)