From 9d910fae000b9c2789c66c0039a6fe5962c04b84 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 15 Apr 2013 11:13:20 +0200 Subject: [PATCH] Fix l10n --- requirements.txt | 4 +++- .../locale/pl_PL/LC_MESSAGES/django.mo | Bin 962 -> 1100 bytes .../locale/pl_PL/LC_MESSAGES/django.po | 12 ++++++++++-- src/accounts/views.py | 6 +++--- src/cas/static/css/main.css | 7 +++++++ src/cas/templates/cas/login.html | 10 +++++++--- 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3101c0e..f51d854 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,8 @@ +-i http://pypi.nowoczesnapolska.org.pl/simple + Django>=1.5,<1.6 South lxml>=2.2 django-gravatar --e git+https://github.com/gstrat/django-cas-provider.git@330bf3e9e9b5c3bff6d9258b2fb81a08b7f81e31#egg=django-cas-provider +-e git+https://github.com/rczajka/django-cas-provider.git@bb0f7662eb12a838cbd339dd8b60476a73ec161b#egg=django-cas-provider diff --git a/src/accounts/locale/pl_PL/LC_MESSAGES/django.mo b/src/accounts/locale/pl_PL/LC_MESSAGES/django.mo index f568b22c348fa5e269f8543720817c81dde081e6..63b2a7dc7a5a65fc46b3e8370876f7583888d007 100644 GIT binary patch delta 470 zcmZwBKTE?v7zXe+O|@xlD^^e=4(F!SguAGNUAj29S)6pp5cS#yG=ZiH7PO#lZUzTO zKY@tfKyXpNg6@K&n~TpiK@mK7^Sd|q=edX6i_w3pWUmOLgqlH}qsCAlC^fi7Gyw%1 zg=?@3H{mdBrT+ssjs65q!fR;4JE-n^h9mGb?cZUMs83&*xF{o&1U2>KF~_MFFsCj| z`x~f&Zs9z9f-2|}R$w`s1kFMfY(WH39U^8h3izr!OH?JwW1?P$^E8CQJN^s<9nMlQ z&TDRkwY`XKOBt}8wimSIt{uCYX*N1x)8CW-tR85W&XOgTnGiK0s@&nc&{(%NtNuYUut C0!lOh delta 338 zcmX@ZafrSCo)F7a1|Z-DVi_PV0b)TQJ_E!cAi&7LAO@rbfiypm)&SCcK-vOGvjJ&$ zsJI`H76&^V+6IP`Gnu5h V;3B4*`\n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -28,6 +28,14 @@ msgstr "Powtórzone hasło" msgid "Passwords do not match!" msgstr "Hasło i powtórzenie się nie zgadzają!" +#: views.py:28 +msgid "Profile has been changed." +msgstr "Profil został zmieniony." + +#: views.py:42 +msgid "Password has been changed." +msgstr "Hasło zostało zmienione." + #: templates/account/profile.html:8 msgid "Change at Gravatar.com" msgstr "Zmień na Gravatar.com" diff --git a/src/accounts/views.py b/src/accounts/views.py index a501b97..5f153c0 100644 --- a/src/accounts/views.py +++ b/src/accounts/views.py @@ -3,7 +3,7 @@ from django import http from django.contrib.auth.decorators import login_required from django.contrib import messages from django.shortcuts import render -from django.utils.translation import ugettext as __ +from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST from accounts.forms import UserBasicForm, UserPasswordForm from .models import Service @@ -24,7 +24,7 @@ def account_change_basic_profile(request): if form.is_valid(): form.save() - messages.add_message(request, messages.INFO, __("Profile has been changed.")) + messages.add_message(request, messages.INFO, _("Profile has been changed.")) return http.HttpResponseRedirect('/accounts/') return account_profile(request, basic_form=form) @@ -38,7 +38,7 @@ def account_change_password(request): request.user.set_password(form.cleaned_data['new_password']) request.user.save() - messages.add_message(request, messages.INFO, __("Password has been changed.")) + messages.add_message(request, messages.INFO, _("Password has been changed.")) return http.HttpResponseRedirect('/accounts/') return account_profile(request, pass_form=form) diff --git a/src/cas/static/css/main.css b/src/cas/static/css/main.css index d4b74b5..4d62c01 100644 --- a/src/cas/static/css/main.css +++ b/src/cas/static/css/main.css @@ -22,6 +22,13 @@ a:hover { text-decoration: underline; } +.errorlist { + color: red; + margin: 0; + padding: 0; + list-style: none; +} + form p { margin: 0; diff --git a/src/cas/templates/cas/login.html b/src/cas/templates/cas/login.html index 21c622b..b1b9025 100644 --- a/src/cas/templates/cas/login.html +++ b/src/cas/templates/cas/login.html @@ -8,9 +8,13 @@ {% csrf_token %}

{% trans "Login" %}

- {% for error in errors %} -

{{ error }}

- {% endfor %} + {% if errors %} +
    + {% for error in errors %} +
  • {{ error }}
  • + {% endfor %} +
+ {% endif %} {{ form.as_p }} -- 2.20.1