i18n
This commit is contained in:
parent
08854b458b
commit
cc5e04807f
|
@ -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'),
|
||||
),
|
||||
]
|
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load bootstrap3 i18n %}
|
||||
|
||||
{% block profiletab %} class="active"{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Profile</h1>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3>Update profile</h3>
|
||||
<h3>{% trans "Profile" %}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% include "_form.html" %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load bootstrap3 i18n %}
|
||||
|
||||
{% block logintab %} class="active"{% endblock %}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
Login
|
||||
{% trans "Login" %}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-offset-4 col-md-4">
|
||||
You do not have an account yet? Please <a href="{% url 'registration_register' %}">register</a>.
|
||||
{% url 'registration_register' as reg_url %}
|
||||
{% blocktrans %}"You do not have an account yet? Please <a href="{{ reg_url }}">register</a>.{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load bootstrap3 i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
Password Change
|
||||
{% trans "Password Change" %}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load bootstrap3 i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
Password Reset
|
||||
{% trans "Password Reset" %}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load bootstrap3 i18n %}
|
||||
|
||||
{% block registrationtab %} class="active"{% endblock %}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
Registration
|
||||
{% trans "Registration" %}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-offset-4 col-md-4">
|
||||
You already have an account? Please <a href="{% url 'login' %}">login</a>.
|
||||
{% url 'login' as login_url %}
|
||||
{% blocktrans %}You already have an account? Please <a href="{{ login_url }}">login</a>.{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
|
@ -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 <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\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 <a href=\"%(reg_url)s\">register</"
|
||||
"a>."
|
||||
msgstr "Pas encore de compte ? <a href=\"%(reg_url)s\">Enregistrez-vous</a>."
|
||||
|
||||
#: 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 <a href=\"%(login_url)s\">login</a>."
|
||||
msgstr "Déjà inscrit ? <a href=\"%(login_url)s\">Connectez-vous</a>."
|
||||
|
||||
#: 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"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% load bootstrap3 %}
|
||||
{% load bootstrap3 i18n %}
|
||||
<form action="" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% if form %}
|
||||
|
@ -8,10 +8,10 @@
|
|||
{% bootstrap_form form layout="horizontal" %}
|
||||
{% endfor %}
|
||||
{% buttons layout="horizontal" %}
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<button type="submit" class="btn btn-primary">{% trans "Submit" %}</button>
|
||||
{% for url, class, text in buttons %}
|
||||
<a href="{% url url %}" class="btn btn-{{ class }}">{{ text }}</a>
|
||||
{% endfor %}
|
||||
<a href="{% if request.META.HTTP_REFERER %}{{ request.META.HTTP_REFERER }}{% else %}{% url 'home' %}{% endif %}" class="btn btn-default">Cancel</a>
|
||||
<a href="{% if request.META.HTTP_REFERER %}{{ request.META.HTTP_REFERER }}{% else %}{% url 'home' %}{% endif %}" class="btn btn-default">{% trans "Cancel" %}</a>
|
||||
{% endbuttons %}
|
||||
</form>
|
||||
|
|
|
@ -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'),
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue