This commit is contained in:
Élie Bouttier 2016-07-23 12:03:12 +02:00
parent 82aba755b8
commit 18491bcd0b
19 changed files with 326 additions and 70 deletions

View File

@ -1,7 +1,6 @@
{% extends 'base.html' %}
{% load bootstrap3 %}
{% load accounts_tags %}
{% load bootstrap3 accounts_tags i18n %}
{% block admintab %} active{% endblock %}
@ -30,14 +29,14 @@
{% endif %}{% endfor %}</td>
<td>
<a href="{% url 'conversation' participation.user.username %}" data-toggle="tooltip" data-placement="bottom"
title="View conversation"><span class="glyphicon glyphicon-envelope"></span></a>
title="{% trans "View conversation" %}"><span class="glyphicon glyphicon-envelope"></span></a>
{% if request.user in participation.conversation.subscribers.all %}
<a href="{% url 'unsubscribe-conversation' participation.user.username %}?next={% url 'list-participant' %}"
data-toggle="tooltip" data-placement="bottom" title="Unsubscribe to conversation">
data-toggle="tooltip" data-placement="bottom" title="{% trans "Unsubscribe to conversation" %}">
<span class="glyphicon glyphicon-star"></span></a>
{% else %}
<a href="{% url 'subscribe-conversation' participation.user.username %}?next={% url 'list-participant' %}"
data-toggle="tooltip" data-placement="bottom" title="Subscribe to conversation">
data-toggle="tooltip" data-placement="bottom" title="{% trans "Subscribe to conversation" %}">
<span class="glyphicon glyphicon-star-empty"></span></a>
{% endif %}
</td>

View File

@ -1,6 +1,7 @@
{% load i18n %}
<div class="panel panel-default">
<div class="panel-heading">
Send a message
{% trans "Send a message" %}
</div>
<div class="panel-body">
<form action="{{ form_url }}" method="post" role="form">
@ -8,7 +9,7 @@
<div class="form-group">
<textarea class="form-control" name="content" required></textarea>
</div>
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-envelope"></span> Send</button>
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-envelope"></span> {% trans "Send" %}</button>
</form>
</div>
</div>

View File

@ -1,13 +1,15 @@
{% extends 'base.html' %}
{% load i18n %}
{% block admintab %} active{% endblock %}
{% block content %}
<div class="page-header">
<h1>Messaging</h1>
<h1>{% trans "Messaging" %}</h1>
{% block heading %}
<a href="{% url 'correspondents' %}" class="btn btn-primary"><span class="glyphicon glyphicon-arrow-left"></span>&nbsp;Go back to correspondents list</a>
<a href="{% url 'correspondents' %}" class="btn btn-primary"><span class="glyphicon glyphicon-arrow-left"></span>&nbsp;{% trans "Go back to correspondents list" %}</a>
{% endblock %}
</div>

View File

@ -1,14 +1,14 @@
{% extends 'base.html' %}
{% load bootstrap3 %}
{% load bootstrap3 i18n %}
{% block admintab %} active{% endblock %}
{% block content %}
<div class="page-header">
<h1>Correspondents</h1>
This is the list of participants that you follow.
<h1>{% trans "Correspondents" %}</h1>
{% trans "This is the list of participants that you follow." %}
</div>
<table class="table table-striped">
@ -26,9 +26,9 @@
<td>
<a href="{% url 'conversation' correspondent.user.username %}"><span class="glyphicon glyphicon-envelope"></span></a>
{% if request.user in correspondent.conversation.subscribers.all %}
<a href="{% url 'unsubscribe-conversation' correspondent.user.username %}?next={% url 'correspondents' %}" data-toggle="tooltip" data-placement="bottom" title="Unsubscribe to conversation"><span class="glyphicon glyphicon-star"></span></a>
<a href="{% url 'unsubscribe-conversation' correspondent.user.username %}?next={% url 'correspondents' %}" data-toggle="tooltip" data-placement="bottom" title="{% trans "Unsubscribe to conversation" %}"><span class="glyphicon glyphicon-star"></span></a>
{% else %}
<a href="{% url 'subscribe-conversation' correspondent.user.username %}?next={% url 'correspondents' %}" data-toggle="tooltip" data-placement="bottom" title="Subscribe to conversation"><span class="glyphicon glyphicon-star-empty"></span></a>
<a href="{% url 'subscribe-conversation' correspondent.user.username %}?next={% url 'correspondents' %}" data-toggle="tooltip" data-placement="bottom" title="{% trans "Subscribe to conversation" %}"><span class="glyphicon glyphicon-star-empty"></span></a>
{% endif %}
</td>
</tr>

View File

@ -1,10 +1,12 @@
{% extends 'conversations/conversation.html' %}
{% load i18n %}
{% block inboxtab %} class="active"{% endblock %}
{% block admintab %}{% endblock %}
{% block heading %}
<p>You can use this page to communicate with the staff.</p>
<p>{% trans "You can use this page to communicate with the staff." %}</p>
{% endblock %}
{% block panelstyleblock %}{% if message.author == message.conversation.participation.user %}info{% else %}success{% endif %}{% endblock %}

Binary file not shown.

View File

@ -0,0 +1,233 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2016
# This file is distributed under the same license as the PonyConf package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-23 01:11+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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: accounts/templates/accounts/participation_list.html:32
msgid "View conversation"
msgstr "Afficher la discussion"
#: accounts/templates/accounts/participation_list.html:35
#: conversations/templates/conversations/correspondents.html:29
msgid "Unsubscribe to conversation"
msgstr "Se désabonner de la discussion"
#: accounts/templates/accounts/participation_list.html:39
#: conversations/templates/conversations/correspondents.html:31
msgid "Subscribe to conversation"
msgstr "Sabonner à la discussion"
#: conversations/templates/conversations/_message_form.html:4
msgid "Send a message"
msgstr "Envoyer un message"
#: conversations/templates/conversations/_message_form.html:12
msgid "Send"
msgstr "Envoyer"
#: conversations/templates/conversations/conversation.html:10
msgid "Messaging"
msgstr "Messagerie"
#: conversations/templates/conversations/conversation.html:12
msgid "Go back to correspondents list"
msgstr "Retourner à la liste des correspondants"
#: conversations/templates/conversations/correspondents.html:10
msgid "Correspondents"
msgstr "Correspondants"
#: conversations/templates/conversations/correspondents.html:11
msgid "This is the list of participants that you follow."
msgstr "Ceci est la liste des participants que vous suivez"
#: conversations/templates/conversations/inbox.html:9
msgid "You can use this page to communicate with the staff."
msgstr ""
"Vous pouvez utiliser cette page pour communiquer avec léquipe organisatrice."
#: ponyconf/settings.py:135
msgid "English"
msgstr "Anglais"
#: ponyconf/settings.py:136
msgid "French"
msgstr "Français"
#: ponyconf/templates/base.html:45
msgid "Home"
msgstr "Accueil"
#: ponyconf/templates/base.html:47
#: proposals/templates/proposals/user_details.html:13
msgid "Talks"
msgstr "Exposés"
#: ponyconf/templates/base.html:48 proposals/models.py:48
msgid "Topics"
msgstr "Thèmes"
#: ponyconf/templates/base.html:50 proposals/models.py:44
msgid "Speakers"
msgstr "Orateurs"
#: ponyconf/templates/base.html:75
msgid "Register"
msgstr "Senregistrer"
#: ponyconf/templates/base.html:76
msgid "Login"
msgstr "Se connecter"
#: ponyconf/templates/base.html:101
msgid "Powered by"
msgstr "Propulsé par"
#: proposals/models.py:22
msgid "Name"
msgstr "Nom"
#: proposals/models.py:25
msgid "Reviewers"
msgstr "Responsables"
#: proposals/models.py:45
msgid "Title"
msgstr "Titre"
#: proposals/models.py:47
msgid "Description"
msgstr "Description"
#: proposals/models.py:49
msgid "Format"
msgstr "Format"
#: proposals/templates/proposals/_talk_list.html:24
msgid "No talks"
msgstr "Aucun thème"
#: proposals/templates/proposals/speaker_list.html:9
#: proposals/templates/proposals/talk_detail.html:21
msgid "Speakers:"
msgstr "Orateurs :"
#: proposals/templates/proposals/speaker_list.html:15
#: proposals/templates/proposals/topic_list.html:18
msgid "talk"
msgstr "thème"
#: proposals/templates/proposals/speaker_list.html:18
#: proposals/templates/proposals/talk_detail.html:27
msgid "No speakers."
msgstr "Aucun orateur."
#: proposals/templates/proposals/talk_detail.html:17
msgid "Description:"
msgstr "Description :"
#: proposals/templates/proposals/talk_detail.html:31
#: proposals/templates/proposals/topic_list.html:9
msgid "Topics:"
msgstr "Thèmes :"
#: proposals/templates/proposals/talk_detail.html:40
msgid "Moderation"
msgstr "Modération"
#: proposals/templates/proposals/talk_detail.html:42
msgid "Vote:"
msgstr "Vote :"
#: proposals/templates/proposals/talk_detail.html:51
msgid "Sum:"
msgstr "Somme :"
#: proposals/templates/proposals/talk_detail.html:53
msgid "Status:"
msgstr "Status :"
#: proposals/templates/proposals/talk_detail.html:56
msgid "Messages:"
msgstr "Messages :"
#: proposals/templates/proposals/talk_edit.html:9
#: proposals/templates/proposals/talks.html:9
msgid "Propose a talk"
msgstr "Proposer un exposé"
#: proposals/templates/proposals/talks.html:12
msgid "My participing talks:"
msgstr "Exposés auquels je participe :"
#: proposals/templates/proposals/talks.html:17
msgid "Others talks:"
msgstr "Autres exposés :"
#: proposals/templates/proposals/topic_form.html:14
msgid "Topic"
msgstr "Thème"
#: proposals/templates/proposals/topic_list.html:16
msgid "reviewer"
msgstr "Responsable"
#: proposals/templates/proposals/topic_list.html:17
msgid "and"
msgstr "et"
#: proposals/templates/proposals/topic_list.html:24
msgid "No topics."
msgstr "Aucun thèmes."
#: proposals/templates/proposals/topic_list.html:29
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"
#: proposals/views.py:38
#, python-format
msgid "Talks related to %s:"
msgstr "Exposés portant sur la thèmatique %s :"
#: proposals/views.py:57
msgid "Talk modified successfully!"
msgstr "Exposé modifié avec succès !"
#: proposals/views.py:63
msgid "Talk proposed successfully!"
msgstr "Exposé proposé avec succès !"
#: proposals/views.py:131
msgid "Vote successfully created"
msgstr "A voté !"
#: proposals/views.py:131
msgid "Vote successfully updated"
msgstr "Vote mis à jour"

View File

@ -10,6 +10,8 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
from django.utils.translation import ugettext_lazy as _
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
@ -56,6 +58,7 @@ INSTALLED_APPS = [
MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
@ -120,8 +123,6 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
@ -130,6 +131,17 @@ USE_L10N = True
USE_TZ = True
LANGUAGES = [
('en', _('English')),
('fr', _('French')),
]
LANGUAGE_CODE = 'en-us'
LOCALE_PATHS = [
os.path.join(BASE_DIR, 'locale'),
]
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/

View File

@ -1,6 +1,4 @@
{% load staticfiles %}
{% load bootstrap3 %}
{% load accounts_tags %}
{% load staticfiles bootstrap3 accounts_tags i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
@ -43,12 +41,12 @@
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li{% block hometab %}{% endblock %}><a href="{% url 'home' %}">Home</a></li>
<li{% block hometab %}{% endblock %}><a href="{% url 'home' %}">{% trans "Home" %}</a></li>
{% if request.user.is_authenticated %}
<li{% block talktab %}{% endblock %}><a href="{% url 'list-talks' %}">Talks</a></li>
<li{% block topictab %}{% endblock %}><a href="{% url 'list-topics' %}">Topics</a></li>
<li{% block talktab %}{% endblock %}><a href="{% url 'list-talks' %}">{% trans "Talks" %}</a></li>
<li{% block topictab %}{% endblock %}><a href="{% url 'list-topics' %}">{% trans "Topics" %}</a></li>
{% if request|staff %}
<li{% block speakertab %}{% endblock %}><a href="{% url 'list-speakers' %}">Speakers</a></li>
<li{% block speakertab %}{% endblock %}><a href="{% url 'list-speakers' %}">{% trans "Speakers" %}</a></li>
{% endif %}
{% endif %}
{% block navbar-left %}{% endblock %}
@ -73,8 +71,8 @@
<li{% block profiletab %}{% endblock %}><a href="{% url 'profile' %}" data-toggle="tooltip" data-placement="bottom" title="Profile"><span class="glyphicon glyphicon-user"></span>&nbsp;{{ request.user.username }}</a></li>
<li><a href="{% url 'logout' %}" data-toggle="tooltip" data-placement="bottom" title="Logout"><span class="glyphicon glyphicon-log-out"></span></a></li>
{% else %}
<li{% block registrationtab %}{% endblock %}><a href="{% url 'register' %}"><span class="glyphicon glyphicon-edit"></span>&nbsp;Register</a></li>
<li{% block logintab %}{% endblock %}><a href="{% url 'login' %}?next={{ request.path }}"><span class="glyphicon glyphicon-log-in"></span>&nbsp;Login</a></li>
<li{% block registrationtab %}{% endblock %}><a href="{% url 'register' %}"><span class="glyphicon glyphicon-edit"></span>&nbsp;{% trans "Register" %}</a></li>
<li{% block logintab %}{% endblock %}><a href="{% url 'login' %}?next={{ request.path }}"><span class="glyphicon glyphicon-log-in"></span>&nbsp;{% trans "Login" %}</a></li>
{% endif %}
</ul>
{% block navbar-right %}{% endblock %}
@ -99,7 +97,7 @@
<hr>
<footer>
<p class="text-muted">Powered by <a href="https://github.com/toulibre/ponyconf">PonyConf</a></p>
<p class="text-muted">{% trans "Powered by" %} <a href="https://github.com/toulibre/ponyconf">PonyConf</a></p>
</footer>
</div> <!-- /container -->

View File

@ -5,6 +5,7 @@ from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
from django.utils.translation import ugettext_lazy as _
from autoslug import AutoSlugField
@ -18,10 +19,10 @@ class Topic(PonyConfModel):
site = models.ForeignKey(Site, on_delete=models.CASCADE)
name = models.CharField(max_length=128, verbose_name='Name')
name = models.CharField(max_length=128, verbose_name=_('Name'))
slug = AutoSlugField(populate_from='name', unique=True)
reviewers = models.ManyToManyField(User, blank=True)
reviewers = models.ManyToManyField(User, blank=True, verbose_name=_('Reviewers'))
class Meta:
unique_together = ('site', 'name')
@ -40,12 +41,12 @@ class Talk(PonyConfModel):
site = models.ForeignKey(Site, on_delete=models.CASCADE)
proposer = models.ForeignKey(User, related_name='+')
speakers = models.ManyToManyField(User)
title = models.CharField(max_length=128, verbose_name='Title')
speakers = models.ManyToManyField(User, verbose_name=_('Speakers'))
title = models.CharField(max_length=128, verbose_name=_('Title'))
slug = AutoSlugField(populate_from='title', unique=True)
description = models.TextField(blank=True, verbose_name='Description')
topics = models.ManyToManyField(Topic, blank=True)
event = models.IntegerField(choices=enum_to_choices(EVENTS), default=EVENTS.conference_short.value)
description = models.TextField(blank=True, verbose_name=_('Description'))
topics = models.ManyToManyField(Topic, blank=True, verbose_name=_('Topics'))
event = models.IntegerField(choices=enum_to_choices(EVENTS), default=EVENTS.conference_short.value, verbose_name=_('Format'))
accepted = models.NullBooleanField(default=None)
def __str__(self):

View File

@ -1,3 +1,4 @@
{% load i18n %}
<ul>
{% regroup talk_list by event as event_list %}
{% for event in event_list %}
@ -20,6 +21,6 @@
</li>
{% endfor %}
</ul>
{% empty %}Nothing
{% empty %}{% trans "No talks" %}
</li>{% endfor %}
</ul>

View File

@ -1,19 +1,21 @@
{% extends 'base.html' %}
{% load i18n %}
{% block speakertab %} class="active"{% endblock %}
{% block content %}
<h1>Speakers:</h1>
<h1>{% trans "Speakers:" %}</h1>
<ul>
{% for speaker in user_list %}
<li>
<a href="{% url 'show-speaker' username=speaker.username %}">{{ speaker.profile }}</a>
({{ speaker.talk_set.count }} talk{{ speaker.talk_set.count|pluralize }})
({{ speaker.talk_set.count }} {% trans "talk" %}{{ speaker.talk_set.count|pluralize }})
</li>
{% empty %}
<li><i>No speakers.</i></li>
<li><i>{% trans "No speakers." %}</i></li>
{% endfor %}
</ul>

View File

@ -1,5 +1,7 @@
{% extends 'base.html' %}
{% load i18n %}
{% block talktab %} class="active"{% endblock %}
{% block content %}
@ -12,21 +14,21 @@
<p>{{ talk.get_event_display }}</p>
<h3>Description:</h3>
<h3>{% trans "Description:" %}</h3>
<p>{{ talk.description }}</p>
<h3>Speakers:</h3>
<h3>{% trans "Speakers:" %}</h3>
<ul>
{% for speaker in talk.speakers.all %}
<li><a href="{% url 'show-speaker' speaker.username %}">{{ speaker }}</a></li>
{% empty %}
<li><i>No speaker.</i></li>
<li><i>{% trans "No speakers." %}</i></li>
{% endfor %}
</ul>
<h3>Topics:</h3>
<h3>{% trans "Topics:" %}</h3>
<ul>
{% for topic in talk.topics.all %}
@ -35,9 +37,9 @@
</ul>
{% if moderate_perm %}
<h2>Moderation</h2>
<h2>{% trans "Moderation" %}</h2>
<h3>Vote:</h3>
<h3>{% trans "Vote:" %}</h3>
<div class="btn-group" role="group" aria-label="vote">
<a class="btn {% if vote.vote == -2 %} active {% endif %}btn-danger" href="{% url 'vote' talk=talk.slug score='-2' %}">-2</a>
<a class="btn {% if vote.vote == -1 %} active {% endif %}btn-warning" href="{% url 'vote' talk=talk.slug score='-1' %}">-1</a>
@ -46,12 +48,12 @@
<a class="btn {% if vote.vote == 2 %} active {% endif %}btn-success" href="{% url 'vote' talk=talk.slug score='2' %}">+2</a>
</div>
Sum: {{ talk.score }}
{% trans "Sum:" %} {{ talk.score }}
<h3>Status:</h3>
<h3>{% trans "Status:" %}</h3>
{{ talk.accepted|yesno:"✔,✘,?" }}
<h3>Messages:</h3>
<h3>{% trans "Messages:" %}</h3>
{% for message in talk.conversation.messages.all %}
{% include 'conversations/_message_detail.html' %}
{% endfor %}

View File

@ -1,12 +1,12 @@
{% extends 'base.html' %}
{% load bootstrap3 staticfiles %}
{% load bootstrap3 staticfiles i18n %}
{% block talktab %} class="active"{% endblock %}
{% block content %}
<h1>Propose a talk</h1>
<h1>{% trans "Propose a talk" %}</h1>
{% include "_form.html" %}

View File

@ -1,18 +1,20 @@
{% extends 'base.html' %}
{% load i18n %}
{% block talktab %} class="active"{% endblock %}
{% block content %}
<a class="btn btn-success" href="{% url 'add-talk' %}">Propose a talk</a>
<a class="btn btn-success" href="{% url 'add-talk' %}">{% trans "Propose a talk" %}</a>
{% if my_talks %}
<div class="h3">My participing talks:</div>
<div class="h3">{% trans "My participing talks:" %}</div>
{% include "proposals/_talk_list.html" with talk_list=my_talks %}
{% endif %}
{% if other_talks %}
<div class="h3">Others talks:</div>
<div class="h3">{% trans "Others talks:" %}</div>
{% include "proposals/_talk_list.html" with talk_list=other_talks %}
{% endif %}

View File

@ -1,6 +1,6 @@
{% extends 'base.html' %}
{% load bootstrap3 %}
{% load bootstrap3 i18n %}
{% block topictab %} class="active"{% endblock %}
@ -11,7 +11,7 @@
{% block content %}
<h1>Topic</h1>
<h1>{% trans "Topic" %}</h1>
{% include "_form.html" %}

View File

@ -1,32 +1,32 @@
{% extends 'base.html' %}
{% load accounts_tags %}
{% load accounts_tags i18n %}
{% block topictab %} class="active"{% endblock %}
{% block content %}
<h1>Topics:</h1>
<h1>{% trans "Topics:" %}</h1>
<ul>
{% for topic in topic_list %}
<li>
{% if request|staff %}
{{ topic }}:
<a href="{% url 'edit-topic' topic.slug %}">{{ topic.reviewers.count }} reviewer{{ topic.reviewers.count|pluralize }}</a>
and
<a href="{{ topic.get_absolute_url }}">{{ topic.talk_set.count }} talk{{ topic.talk_set.count|pluralize }}</a>
<a href="{% url 'edit-topic' topic.slug %}">{{ topic.reviewers.count }} {% trans "reviewer" %}{{ topic.reviewers.count|pluralize }}</a>
{% trans "and" %}
<a href="{{ topic.get_absolute_url }}">{{ topic.talk_set.count }} {% trans "talk" %}{{ topic.talk_set.count|pluralize }}</a>
{% else %}
<a href="{{ topic.get_absolute_url }}">{{ topic }}</a>
{% endif %}
</li>
{% empty %}
<li><i>No topics.</i></li>
<li><i>{% trans "No topics." %}</i></li>
{% endfor %}
</ul>
{% if request|orga %}
<a href="{% url 'add-topic' %}" class="btn btn-success">Add a topic</a>
<a href="{% url 'add-topic' %}" class="btn btn-success">{% trans "Add a topic" %}</a>
{% endif %}
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load accounts_tags %}
{% load accounts_tags i18n %}
{% block speakertab %} class="active"{% endblock %}
@ -7,16 +7,16 @@
<h1>{{ profile }}</h1>
<h2>Biography</h2>
<h2>{% trans "Biography" %}</h2>
<p>{{ profile.biography }}</p>
<h2>Talks</h2>
<h2>{% trans "Talks" %}</h2>
{% include "proposals/_talk_list.html" %}
{% if request|edit_profile:profile %}
<h2>Notes</h2>
<h2>{% trans "Notes" %}</h2>
<p>{{ profile.notes }}</p>
<a href="{% url 'edit-participant' profile.user.username %}" class="btn btn-success">Edit</a>
<a href="{% url 'edit-participant' profile.user.username %}" class="btn btn-success">{% trans "Edit" %}</a>
{% endif %}

View File

@ -8,6 +8,7 @@ from django.core.urlresolvers import reverse
from django.db.models import Q
from django.shortcuts import get_object_or_404, redirect, render
from django.views.generic import CreateView, DetailView, ListView, UpdateView
from django.utils.translation import ugettext as _
from accounts.mixins import OrgaRequiredMixin, StaffRequiredMixin
@ -34,7 +35,7 @@ def talk_list(request):
def talk_list_by_topic(request, topic):
topic = get_object_or_404(Topic, slug=topic)
talks = allowed_talks(Talk.objects.filter(site=topic.site, topics=topic), request)
return render(request, 'proposals/talk_list.html', {'title': 'Talks related to %s:' % topic, 'talk_list': talks})
return render(request, 'proposals/talk_list.html', {'title': _('Talks related to %s:') % topic, 'talk_list': talks})
@login_required
@ -53,13 +54,13 @@ def talk_edit(request, talk=None):
if hasattr(talk, 'id'):
talk = form.save()
talk_edited.send(talk.__class__, instance=talk, author=request.user)
messages.success(request, 'Talk modified successfully!')
messages.success(request, _('Talk modified successfully!'))
else:
form.instance.site = get_current_site(request)
form.instance.proposer = request.user
talk = form.save()
talk_added.send(talk.__class__, instance=talk, author=request.user)
messages.success(request, 'Talk proposed successfully!')
messages.success(request, _('Talk proposed successfully!'))
return redirect(talk.get_absolute_url())
return render(request, 'proposals/talk_edit.html', {
'form': form,
@ -127,7 +128,7 @@ def vote(request, talk, score):
vote, created = Vote.objects.get_or_create(talk=talk, user=request.user)
vote.vote = int(score)
vote.save()
messages.success(request, "Vote successfully %s" % ('created' if created else 'updated'))
messages.success(request, _('Vote successfully created') if created else _('Vote successfully updated'))
return redirect(talk.get_absolute_url())