From: Matthijs Kooijman Date: Wed, 23 Jan 2008 17:48:10 +0000 (+0100) Subject: * Mark all strings used so far as translatable. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=c5cbeefd03ddece1d37e966ad0b6f56ece29113f;p=matthijs%2Fprojects%2Fxerxes.git * Mark all strings used so far as translatable. * Add dutch translations. --- diff --git a/influences/views.py b/influences/views.py index 1b988dd..1c7edb4 100644 --- a/influences/views.py +++ b/influences/views.py @@ -1,8 +1,9 @@ from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 +from django import newforms as forms +from django.utils.translation import ugettext as _ from ee.influences.models import Character from ee.influences.models import Influence -from django import newforms as forms class InfluenceForm(forms.ModelForm): class Meta: @@ -16,7 +17,7 @@ def add(request, character_id): f = InfluenceForm(request.POST) if (f.is_valid()): f.save() - message = "Influence added" + message = _("Influence added.") f = None else: f = InfluenceForm() diff --git a/locale/nl/LC_MESSAGES/django.po b/locale/nl/LC_MESSAGES/django.po new file mode 100644 index 0000000..fb9a09b --- /dev/null +++ b/locale/nl/LC_MESSAGES/django.po @@ -0,0 +1,71 @@ +# Evolution Events translations +# This file is distributed under the same license as the containing package. +# Matthijs Kooijman , 2008 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-01-23 18:43+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Matthijs Kooijman \n" +"Language-Team: N/A\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: influences/views.py:20 +msgid "Influence added." +msgstr "Invloed toegevoegd." + +#: templates/base/login.html:7 +msgid "Your username and password didn't match. Please try again." +msgstr "Je gebruikersnaam en/of wachtwoord kloten niet. Probeer het opnieuw." + +#: templates/base/login.html:11 +#, python-format +msgid "You are currently logged in as %(username)s" +msgstr "Je bent nu ingelogd als %(username)s" + +#: templates/base/login.html:12 +msgid "Logout" +msgstr "Uitloggen" + +# Translated by django +#: templates/base/login.html:17 +msgid "Username" +msgstr "" + +# Translated by django +#: templates/base/login.html:18 +msgid "Password" +msgstr "" + +#: templates/base/login.html:21 +msgid "Login" +msgstr "Inloggen" + +#: templates/influences/character_addinfluence.html:2 +#: templates/influences/character_detail.html:10 +msgid "Submit influence" +msgstr "Invloed indienen" + +#: templates/influences/character_addinfluence.html:11 +msgid "Submit" +msgstr "Indienen" + +#: templates/influences/character_detail.html:3 +#, python-format +msgid "Influences for %(name)s" +msgstr "Invloeden voor %(name)s" + +#: templates/influences/character_list.html:2 +msgid "Your characters" +msgstr "Jouw karakters" + +#: templates/influences/character_list.html:10 +msgid "" +"No characters. Add a character first, so you can submit your influences." +msgstr "" +"Geen karakters. Voeg eerst een karakter toe, zodat je invloeden kun indienen." diff --git a/settings.py b/settings.py index ccffacb..7d91bf1 100644 --- a/settings.py +++ b/settings.py @@ -22,7 +22,12 @@ TIME_ZONE = 'Europe/Amsterdam' # Language code for this installation. All choices can be found here: # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes # http://blogs.law.harvard.edu/tech/stories/storyReader$15 -LANGUAGE_CODE = 'en-us' +#LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'nl' +LANGUAGES = ( + ('en', 'English'), + ('nl', 'Nederlands'), +) SITE_ID = 1 diff --git a/templates/base/login.html b/templates/base/login.html index 07bfd33..37fdf44 100644 --- a/templates/base/login.html +++ b/templates/base/login.html @@ -1,23 +1,24 @@ +{% load i18n %} {% extends "base/base.html" %} {% block content %} {% if form.has_errors %} -

Your username and password didn't match. Please try again.

+

{% trans "Your username and password didn't match. Please try again." %}

{% endif %} {% if user.is_authenticated %} -

You are currently logged in as {{ user.username }}

-

Logout

+

{% blocktrans with user.username as username %}You are currently logged in as {{ username }}{% endblocktrans %}

+

{% trans "Logout" %}

{% endif %}
- - + +
{{ form.username }}
{{ form.password }}
{{ form.username }}
{{ form.password }}
- +
diff --git a/templates/influences/character_addinfluence.html b/templates/influences/character_addinfluence.html index 964a841..db277e9 100644 --- a/templates/influences/character_addinfluence.html +++ b/templates/influences/character_addinfluence.html @@ -1,5 +1,5 @@ -

{{ character.name }}

-

Influence toevoegen

+{% load i18n %} +

{% trans "Submit influence" %}

{% if message %} {{ message }} {% endif %} @@ -8,6 +8,6 @@ {{ form.as_table }}
- + {% endif %} diff --git a/templates/influences/character_detail.html b/templates/influences/character_detail.html index 56c60cd..96e2c20 100644 --- a/templates/influences/character_detail.html +++ b/templates/influences/character_detail.html @@ -1,9 +1,10 @@ -

{{ object.name }}

-Influences voor {{ object.name }} +{% load i18n %} +

{{ object.name }}

+

{% blocktrans with object.name as name %}Influences for {{ name }}{% endblocktrans %}

    {% for influence in object.influence_set.objects.all %}
  • {{ influence }}
  • {% endfor %}
-Influence toevoegen +{% trans "Submit influence" %} diff --git a/templates/influences/character_list.html b/templates/influences/character_list.html index 8d417b5..85b1908 100644 --- a/templates/influences/character_list.html +++ b/templates/influences/character_list.html @@ -1,3 +1,5 @@ +{% load i18n %} +

{% trans "Your characters"%}

{% if object_list %}
    {% for character in object_list %} @@ -5,5 +7,5 @@ {% endfor %}
{% else %} -

Geen karakters.

+

{% trans "No characters. Add a character first, so you can submit your influences." %}

{% endif %}