diff --git a/accounts/migrations/0006_auto_20160723_1216.py b/accounts/migrations/0006_auto_20160723_1216.py
new file mode 100644
index 0000000..ab04501
--- /dev/null
+++ b/accounts/migrations/0006_auto_20160723_1216.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-07-23 12:16
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('accounts', '0005_auto_20160712_1204'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='participation',
+ name='notes',
+ field=models.TextField(blank=True, default='', verbose_name='Notes'),
+ ),
+ migrations.AlterField(
+ model_name='participation',
+ name='video_licence',
+ field=models.IntegerField(choices=[(1, 'CC-Zero'), (2, 'CC-BY'), (3, 'CC-BY-SA'), (4, 'CC-BY-ND'), (5, 'CC-BY-NC'), (6, 'CC-BY-NC-SA'), (7, 'CC-BY-NC-ND')], default=1, verbose_name='Video licence'),
+ ),
+ ]
diff --git a/accounts/models.py b/accounts/models.py
index 0567662..97597a3 100644
--- a/accounts/models.py
+++ b/accounts/models.py
@@ -4,6 +4,7 @@ from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.db import models
+from django.utils.translation import ugettext_lazy as _
from ponyconf.utils import PonyConfModel, enum_to_choices
@@ -13,7 +14,7 @@ from .utils import generate_user_uid
class Profile(PonyConfModel):
user = models.OneToOneField(User)
- biography = models.TextField(blank=True, verbose_name='Biography')
+ biography = models.TextField(blank=True, verbose_name=_('Biography'))
email_token = models.CharField(max_length=12, default=generate_user_uid, unique=True)
def __str__(self):
@@ -50,13 +51,13 @@ class Participation(PonyConfModel):
arrival = models.DateTimeField(blank=True, null=True)
departure = models.DateTimeField(blank=True, null=True)
- transport = models.ManyToManyField(Transport, verbose_name="I'm ok to travel by", blank=True)
- connector = models.ManyToManyField(Connector, verbose_name="I can output", blank=True)
+ transport = models.ManyToManyField(Transport, verbose_name=_("I'm ok to travel by"), blank=True)
+ connector = models.ManyToManyField(Connector, verbose_name=_("I can output"), blank=True)
constraints = models.TextField(blank=True)
- sound = models.BooleanField("I need sound", default=False)
- videotaped = models.BooleanField("I'm ok to be recorded on video", default=True)
- video_licence = models.IntegerField(choices=enum_to_choices(LICENCES), default=1)
- notes = models.TextField(default='', blank=True)
+ sound = models.BooleanField(_("I need sound"), default=False)
+ videotaped = models.BooleanField(_("I'm ok to be recorded on video"), default=True)
+ video_licence = models.IntegerField(choices=enum_to_choices(LICENCES), default=1, verbose_name=_("Video licence"))
+ notes = models.TextField(default='', blank=True, verbose_name=_("Notes"))
orga = models.BooleanField(default=False)
class Meta:
diff --git a/accounts/signals.py b/accounts/signals.py
index 6d7cca9..0bf7bff 100644
--- a/accounts/signals.py
+++ b/accounts/signals.py
@@ -4,6 +4,7 @@ from django.contrib.auth.signals import user_logged_in, user_logged_out
from django.contrib.sites.shortcuts import get_current_site
from django.db.models.signals import post_save
from django.dispatch import receiver
+from django.utils.translation import ugettext_lazy as _
from .models import Connector, Participation, Profile, Transport
@@ -26,12 +27,12 @@ def on_user_logged_in(sender, request, user, **kwargs):
participation.save()
if created:
messages.info(request, "Please check your profile!\n", fail_silently=True) # FIXME
- messages.success(request, 'Welcome!', fail_silently=True) # FIXME
+ messages.success(request, _('Welcome!'), fail_silently=True) # FIXME
@receiver(user_logged_out)
def on_user_logged_out(sender, request, **kwargs):
- messages.success(request, 'Goodbye!', fail_silently=True) # FIXME
+ messages.success(request, _('Goodbye!'), fail_silently=True) # FIXME
def create_profile(sender, instance, created, **kwargs):
diff --git a/accounts/templates/accounts/profile.html b/accounts/templates/accounts/profile.html
index 0cfd1d7..6c070f9 100644
--- a/accounts/templates/accounts/profile.html
+++ b/accounts/templates/accounts/profile.html
@@ -1,19 +1,15 @@
{% extends 'base.html' %}
-{% load bootstrap3 %}
+{% load bootstrap3 i18n %}
{% block profiletab %} class="active"{% endblock %}
{% block content %}
-
-
-
Update profile
+ {% trans "Profile" %}
{% include "_form.html" %}
diff --git a/accounts/templates/registration/login.html b/accounts/templates/registration/login.html
index 0ef5065..36d9ecc 100644
--- a/accounts/templates/registration/login.html
+++ b/accounts/templates/registration/login.html
@@ -1,6 +1,6 @@
{% extends 'base.html' %}
-{% load bootstrap3 %}
+{% load bootstrap3 i18n %}
{% block logintab %} class="active"{% endblock %}
@@ -8,7 +8,7 @@
@@ -22,7 +22,8 @@
- You do not have an account yet? Please
register.
+ {% url 'registration_register' as reg_url %}
+ {% blocktrans %}"You do not have an account yet? Please
register.{% endblocktrans %}
diff --git a/accounts/templates/registration/password_change_form.html b/accounts/templates/registration/password_change_form.html
index 280ac3d..322b89d 100644
--- a/accounts/templates/registration/password_change_form.html
+++ b/accounts/templates/registration/password_change_form.html
@@ -1,12 +1,12 @@
{% extends 'base.html' %}
-{% load bootstrap3 %}
+{% load bootstrap3 i18n %}
{% block content %}
diff --git a/accounts/templates/registration/password_reset_form.html b/accounts/templates/registration/password_reset_form.html
index 82a2daf..7290203 100644
--- a/accounts/templates/registration/password_reset_form.html
+++ b/accounts/templates/registration/password_reset_form.html
@@ -1,12 +1,12 @@
{% extends 'base.html' %}
-{% load bootstrap3 %}
+{% load bootstrap3 i18n %}
{% block content %}
diff --git a/accounts/templates/registration/registration_form.html b/accounts/templates/registration/registration_form.html
index 87b878e..792b357 100644
--- a/accounts/templates/registration/registration_form.html
+++ b/accounts/templates/registration/registration_form.html
@@ -1,6 +1,6 @@
{% extends 'base.html' %}
-{% load bootstrap3 %}
+{% load bootstrap3 i18n %}
{% block registrationtab %} class="active"{% endblock %}
@@ -8,7 +8,7 @@
@@ -22,7 +22,8 @@
- You already have an account? Please
login.
+ {% url 'login' as login_url %}
+ {% blocktrans %}You already have an account? Please
login.{% endblocktrans %}
diff --git a/accounts/urls.py b/accounts/urls.py
index 058ae5e..bfbbe28 100644
--- a/accounts/urls.py
+++ b/accounts/urls.py
@@ -2,8 +2,6 @@ from django.conf import settings
from django.conf.urls import include, url
from django.contrib.auth import views as auth_views
-#from registration.backends.default import views as registration_views
-
from . import views
urlpatterns = [
diff --git a/accounts/views.py b/accounts/views.py
index 4107be6..13f3537 100644
--- a/accounts/views.py
+++ b/accounts/views.py
@@ -4,6 +4,7 @@ from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, redirect, render
+from django.utils.translation import ugettext_lazy as _
from .decorators import staff_required
from .forms import (NewParticipationForm, ParticipationForm,
@@ -11,8 +12,8 @@ from .forms import (NewParticipationForm, ParticipationForm,
from .models import Participation, Profile, User
from .utils import can_edit_profile, is_orga
-RESET_PASSWORD_BUTTON = ('password_reset', 'warning', 'Reset your password')
-CHANGE_PASSWORD_BUTTON = ('password_change', 'warning', 'Change password')
+RESET_PASSWORD_BUTTON = ('password_reset', 'warning', _('Reset your password'))
+CHANGE_PASSWORD_BUTTON = ('password_change', 'warning', _('Change password'))
@login_required
diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo
index e228b44..5ebfdbb 100644
Binary files a/locale/fr/LC_MESSAGES/django.mo and b/locale/fr/LC_MESSAGES/django.mo differ
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index 980dc47..3ccd655 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-07-23 01:11+0000\n"
+"POT-Creation-Date: 2016-07-23 12:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME
\n"
"Language-Team: LANGUAGE \n"
@@ -18,6 +18,42 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+#: accounts/models.py:17 proposals/templates/proposals/user_details.html:10
+msgid "Biography"
+msgstr "Biographie"
+
+#: accounts/models.py:54
+msgid "I'm ok to travel by"
+msgstr "J’accepte de voyager en"
+
+#: accounts/models.py:55
+msgid "I can output"
+msgstr "Sortie vidéo"
+
+#: accounts/models.py:57
+msgid "I need sound"
+msgstr "J’ai besoin de son"
+
+#: accounts/models.py:58
+msgid "I'm ok to be recorded on video"
+msgstr "J’accepte d’être enregistré en vidéo"
+
+#: accounts/models.py:59
+msgid "Video licence"
+msgstr "Licence vidéo"
+
+#: accounts/models.py:60 proposals/templates/proposals/user_details.html:17
+msgid "Notes"
+msgstr "Notes"
+
+#: accounts/signals.py:30
+msgid "Welcome!"
+msgstr "Bienvenue !"
+
+#: accounts/signals.py:35
+msgid "Goodbye!"
+msgstr "Au revoir !"
+
#: accounts/templates/accounts/participation_list.html:32
msgid "View conversation"
msgstr "Afficher la discussion"
@@ -32,6 +68,48 @@ msgstr "Se désabonner de la discussion"
msgid "Subscribe to conversation"
msgstr "S’abonner à la discussion"
+#: accounts/templates/accounts/profile.html:12
+msgid "Profile"
+msgstr "Profile"
+
+#: accounts/templates/registration/login.html:11
+#: ponyconf/templates/base.html:76
+msgid "Login"
+msgstr "Se connecter"
+
+#: accounts/templates/registration/login.html:26
+#, python-format
+msgid ""
+"\"You do not have an account yet? Please register"
+"a>."
+msgstr "Pas encore de compte ? Enregistrez-vous."
+
+#: accounts/templates/registration/password_change_form.html:9
+msgid "Password Change"
+msgstr "Changement de mot de passe"
+
+#: accounts/templates/registration/password_reset_form.html:9
+msgid "Password Reset"
+msgstr "Réinitialisation du mot de passe"
+
+#: accounts/templates/registration/registration_form.html:11
+msgid "Registration"
+msgstr "Inscription"
+
+#: accounts/templates/registration/registration_form.html:26
+#, python-format
+msgid ""
+"You already have an account? Please login."
+msgstr "Déjà inscrit ? Connectez-vous."
+
+#: accounts/views.py:15
+msgid "Reset your password"
+msgstr "Réinitialiser son mot de passe"
+
+#: accounts/views.py:16
+msgid "Change password"
+msgstr "Changer son mot de passe"
+
#: conversations/templates/conversations/_message_form.html:4
msgid "Send a message"
msgstr "Envoyer un message"
@@ -69,6 +147,14 @@ msgstr "Anglais"
msgid "French"
msgstr "Français"
+#: ponyconf/templates/_form.html:11
+msgid "Submit"
+msgstr "Envoyer"
+
+#: ponyconf/templates/_form.html:15
+msgid "Cancel"
+msgstr "Annuler"
+
#: ponyconf/templates/base.html:45
msgid "Home"
msgstr "Accueil"
@@ -88,11 +174,7 @@ msgstr "Orateurs"
#: ponyconf/templates/base.html:75
msgid "Register"
-msgstr "S’enregistrer"
-
-#: ponyconf/templates/base.html:76
-msgid "Login"
-msgstr "Se connecter"
+msgstr "S’inscrire"
#: ponyconf/templates/base.html:101
msgid "Powered by"
@@ -199,14 +281,6 @@ msgstr "Aucun thèmes."
msgid "Add a topic"
msgstr "Ajouter un thème"
-#: proposals/templates/proposals/user_details.html:10
-msgid "Biography"
-msgstr "Biographie"
-
-#: proposals/templates/proposals/user_details.html:17
-msgid "Notes"
-msgstr "Notes"
-
#: proposals/templates/proposals/user_details.html:19
msgid "Edit"
msgstr "Éditer"
diff --git a/ponyconf/templates/_form.html b/ponyconf/templates/_form.html
index 075c5dc..a4abb9b 100644
--- a/ponyconf/templates/_form.html
+++ b/ponyconf/templates/_form.html
@@ -1,4 +1,4 @@
-{% load bootstrap3 %}
+{% load bootstrap3 i18n %}
diff --git a/proposals/migrations/0005_auto_20160723_1216.py b/proposals/migrations/0005_auto_20160723_1216.py
new file mode 100644
index 0000000..4664c27
--- /dev/null
+++ b/proposals/migrations/0005_auto_20160723_1216.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-07-23 12:16
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('proposals', '0004_auto_20160711_2058'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='talk',
+ name='event',
+ field=models.IntegerField(choices=[(1, 'conference short'), (2, 'conference long'), (3, 'workshop'), (4, 'stand'), (5, 'other')], default=1, verbose_name='Format'),
+ ),
+ migrations.AlterField(
+ model_name='talk',
+ name='speakers',
+ field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name='Speakers'),
+ ),
+ migrations.AlterField(
+ model_name='talk',
+ name='topics',
+ field=models.ManyToManyField(blank=True, to='proposals.Topic', verbose_name='Topics'),
+ ),
+ migrations.AlterField(
+ model_name='topic',
+ name='reviewers',
+ field=models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='Reviewers'),
+ ),
+ ]