From 36211c95bd69ec9f57857c3b5b999357bd5c91b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dzikie=20dro=C5=BCd=C5=BCe?= Date: Thu, 6 Feb 2014 16:12:06 +0100 Subject: [PATCH] Give me a break, it's 2am. But it works now. --- .../locale/de/LC_MESSAGES/django.mo | Bin 0 -> 948 bytes .../locale/de/LC_MESSAGES/django.po | 44 ++++++++++++++++++ .../templates/papiezator/index.html | 16 ++++--- src/papiezator/views.py | 6 ++- src/views.py | 1 + 5 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 src/papiezator/locale/de/LC_MESSAGES/django.mo create mode 100644 src/papiezator/locale/de/LC_MESSAGES/django.po create mode 100644 src/views.py 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 0000000000000000000000000000000000000000..4756d23fe32db7a5bcf259e3e7fc5c7f1cbe11e8 GIT binary patch literal 948 zcmZ8fO^Xys5KTW;p#^slPa+Z*7Z$g)TSTPPnJK5snbz*8cw2Z$1>nh)Rlo_y4~*FiQ2cL_Fd}SjXUid?M}N5VKnAL)g=F}dyyvNXfTYr z3GEK!LGQ-P;a=M6OCO?%lg8`jDlt8t_WQJ#3{rZK4w7DfE9rK}>Hhu(q$aOr&e4Qr z8B;&m+nF{kKj`%H%QKJ5Zq|y4J`#lVvscvqH`1A}L((IeXR`5jhWjAuAQu z?~ItDrXy)Gc3jdftD_~m1qOiuJ=LttoNEjL+JNTh&>GrToax%+Y&Jz#dQv{nE6(h! zpt{8PRipfsGD$~uNfTC@p4V<(tpC, 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)