diff options
| -rw-r--r-- | locale/fr/LC_MESSAGES/django.mo | bin | 0 -> 3196 bytes | |||
| -rw-r--r-- | locale/fr/LC_MESSAGES/django.po | 188 | ||||
| -rw-r--r-- | polls/models.py | 23 | ||||
| -rw-r--r-- | polls/views.py | 85 | ||||
| -rw-r--r-- | static/styles.css | 26 | ||||
| -rw-r--r-- | templates/base.html | 6 | ||||
| -rw-r--r-- | templates/createOrEdit.html | 45 | ||||
| -rw-r--r-- | templates/main.html | 6 | ||||
| -rw-r--r-- | templates/vote.html | 7 | 
9 files changed, 316 insertions, 70 deletions
diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo Binary files differnew file mode 100644 index 0000000..8812e42 --- /dev/null +++ b/locale/fr/LC_MESSAGES/django.mo diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..b8bf7b5 --- /dev/null +++ b/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,188 @@ +# Papillon +# Copyright (C) 2008 +# This file is distributed under the same license as the papillon package. +# Étienne Loks <etienne.loks@peacefrogs.net>, 2008. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 0.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-08-20 00:40+0200\n" +"PO-Revision-Date: 2008-08-20 00:22+0200\n" +"Last-Translator: Étienne Loks <etienne.loks@peacefrogs.net>,\n" +"Language-Team: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: settings.py:89 +msgid "French" +msgstr "Français" + +#: settings.py:90 +msgid "English" +msgstr "Anglais" + +#: templates/vote.html:21 templates/vote.html.py:41 +#: templates/createOrEdit.html:63 +msgid "Edit" +msgstr "Modifier" + +#: templates/vote.html:35 +msgid "Sum" +msgstr "Somme" + +#: templates/vote.html:41 +msgid "Participate" +msgstr "Participer" + +#: templates/createOrEdit.html:6 +msgid "" +"As long as no options were added to the poll, it will not be made available." +msgstr "" +"Tant qu'aucune option ne sera ajouté au sondage, il ne sera pas disponible." + +#: templates/createOrEdit.html:8 +msgid "New poll" +msgstr "Nouveau sondage" + +#: templates/createOrEdit.html:8 +msgid "Edit poll" +msgstr "Éditer un sondage" + +#: templates/createOrEdit.html:13 +msgid "Poll url" +msgstr "Adresse du sondage" + +#: templates/createOrEdit.html:15 +msgid "" +"Copy this address and send it to voters who want to participate to this poll" +msgstr "Copiez cette adresse et envoyez là aux participants à ce sondage." + +#: templates/createOrEdit.html:18 +msgid "Administration url" +msgstr "Adresse d'administration" + +#: templates/createOrEdit.html:20 +msgid "Address to modify the current poll" +msgstr "Adresse de modification de ce sondage" + +#: templates/createOrEdit.html:23 polls/views.py:56 +msgid "Author name" +msgstr "Nom de l'auteur" + +#: templates/createOrEdit.html:25 +msgid "Name, firstname or nickname of the author" +msgstr "Nom, prénom ou surnom de l'auteur" + +#: templates/createOrEdit.html:28 polls/views.py:57 +msgid "Poll name" +msgstr "Nom du sondage" + +#: templates/createOrEdit.html:30 +msgid "Global name to present the poll" +msgstr "Nom général pour présenter le sondage" + +#: templates/createOrEdit.html:33 polls/views.py:58 +msgid "Poll description" +msgstr "Description du sondage" + +#: templates/createOrEdit.html:35 +msgid "Precise description of the poll" +msgstr "Description précise du sondage" + +#: templates/createOrEdit.html:38 polls/views.py:59 +msgid "Poll type" +msgstr "Type du sondage" + +#: templates/createOrEdit.html:42 +msgid "Type of the poll:" +msgstr "Type du sondage :" + +#: templates/createOrEdit.html:44 +msgid "Meeting is the appropriate type to set a date for a meeting." +msgstr "Réunion est le type adéquat pour trouver une date pour une réunion" + +#: templates/createOrEdit.html:45 +msgid "Poll is the appropriate type for a simple multi-choice poll" +msgstr "Sondage est le type adéquat pour un simple sondage à choix multiple" + +#: templates/createOrEdit.html:46 +msgid "Balanced poll lets voters setting negative vote for some choices" +msgstr "" +"Sondage pondéré permet aux participants de mettre des votes négatifs pour " +"certains choix" + +#: templates/createOrEdit.html:47 polls/models.py:27 +msgid "One choice poll" +msgstr "Sondage à choix unique" + +#: templates/createOrEdit.html:53 +msgid "Choices" +msgstr "Choix" + +#: templates/createOrEdit.html:53 +msgid "Delete?" +msgstr "Supprimer ?" + +#: templates/createOrEdit.html:58 +msgid "New choice" +msgstr "Nouveau choix" + +#: templates/createOrEdit.html:61 +msgid "Create" +msgstr "Créer" + +#: templates/main.html:6 +msgid "Create a poll" +msgstr "Créer un sondage" + +#: templates/main.html:7 +msgid "" +"Create a new sondage for take a decision, find a date for a meeting, etc." +msgstr "" +"Créer un nouveau sondage pour prendre une décision, trouver une date pour " +"une réunion, etc." + +#: polls/models.py:21 +msgid "Available" +msgstr "Disponible" + +#: polls/models.py:22 +msgid "Disabled" +msgstr "Indisponible" + +#: polls/models.py:24 +msgid "Meeting" +msgstr "Réunion" + +#: polls/models.py:25 +msgid "Poll" +msgstr "Sondage" + +#: polls/models.py:26 +msgid "Balanced poll" +msgstr "Sondage pondéré" + +#: polls/models.py:47 +msgid "No" +msgstr "Non" + +#: polls/models.py:48 +msgid "Maybe" +msgstr "Peut-être" + +#: polls/models.py:49 +msgid "Yes" +msgstr "Oui" + +#: polls/views.py:32 +msgid "The poll requested don't exist (anymore?)" +msgstr "Le sondage que vous avez demandé n'existe pas (n'existe plus ?)" + +#: polls/views.py:66 +#, python-format +msgid "%s is a mandatory field" +msgstr "%s est un champs obligatoire" + diff --git a/polls/models.py b/polls/models.py index 08395b8..6e9c9bd 100644 --- a/polls/models.py +++ b/polls/models.py @@ -5,6 +5,7 @@  # See the file COPYING.  from django.db import models +from django.utils.translation import gettext_lazy as _  class PollUser(models.Model):      name = models.CharField(maxlength=100) @@ -17,19 +18,19 @@ class Poll(models.Model):      author = models.ForeignKey(PollUser)      base_url = models.CharField(maxlength=100)      admin_url = models.CharField(maxlength=100) -    STATUS = (('A', 'Available'), -              ('D', 'Disabled'),) +    STATUS = (('A', _('Available')), +              ('D', _('Disabled')),)      status = models.CharField(maxlength=1, choices=STATUS) -    TYPE = (('M', 'Meeting'),  -            ('P', 'Poll'), -            ('B', 'Balanced poll'), -            ('O', 'One choice poll'),) +    TYPE = (('M', _('Meeting')), +            ('P', _('Poll')), +            ('B', _('Balanced poll')), +            ('O', _('One choice poll')),)      type = models.CharField(maxlength=1, choices=TYPE) -     +      def getTypeLabel(self):          idx = [type[0] for type in self.TYPE].index(self.type)          return Poll.TYPE[idx][1] -     +      class Admin:          pass @@ -43,8 +44,8 @@ class Choice(models.Model):  class Vote(models.Model):      voter = models.ForeignKey(PollUser)      choice = models.ForeignKey(Choice) -    VOTE = ((-1, 'No'),  -            (0, 'Maybe'), -            (1, 'Yes'),) +    VOTE = ((-1, _('No')), +            (0, _('Maybe')), +            (1, _('Yes')),)      value = models.IntegerField(choices=VOTE) diff --git a/polls/views.py b/polls/views.py index 219590c..4e3400b 100644 --- a/polls/views.py +++ b/polls/views.py @@ -4,27 +4,46 @@  # This program can be distributed under the terms of the GNU GPL.  # See the file COPYING. +''' +Views management +''' +  from random import choice as random_choice  import string  import time +from django.utils.translation import gettext_lazy as _  from django.shortcuts import render_to_response  from django.http import HttpResponseRedirect +from papillon.settings import LANGUAGES  from papillon.polls.models import Poll, PollUser, Choice, Vote  def getBaseResponse(request): -    "Get the root url in order to redirect to the main page" -    url = "/".join([request.META['HTTP_HOST'],  -                    request.path.split('/')[1], ''])  -    return {'root_url':url} +    """Manage basic fields for the template +    If not null the second argument returned is a redirection. +    """ +    #Get the root url in order to redirect to the main page +    url = "/".join([request.META['HTTP_HOST'], +                    request.path.split('/')[1], '']) +    # setting the current language and available languages +    if 'language' in request.GET: +        if request.GET['language'] in [language[0] for language in LANGUAGES]: +            request.session['django_language'] = request.GET['language'] +            return None, HttpResponseRedirect(request.path) +    languages = [] +    for language_code, language_label in LANGUAGES: +        languages.append((language_code, _(language_label))) +    return {'root_url':url, 'languages':languages}, None  def index(request):      "Main page" -    response_dct = getBaseResponse(request) +    response_dct, redirect = getBaseResponse(request) +    if redirect: +        return redirect      error = ''      if 'bad_poll' in request.GET: -        response_dct['error'] = "The poll requested don't exist (anymore?)" +        response_dct['error'] = _("The poll requested don't exist (anymore?)")      return render_to_response('main.html', response_dct)  def createOrEdit(request, admin_url): @@ -39,26 +58,26 @@ def createOrEdit(request, admin_url):      def genRandomURL():          "Generation of a random url"          chars = string.letters + string.digits -        url = ''     +        url = ''          for i in xrange(6):              url += random_choice(chars)          url += str(int(time.time()))          return url -     +      def submitNewPoll(request, response_dct):          "A new poll is submited"          # verify if all the mandatory_fields are set -        mandatory_fields = (('author_name', "Author name"), -                            ('poll_name', "Poll name"), -                            ('poll_desc', "Poll description"), -                            ('poll_type', "Poll type"), +        mandatory_fields = (('author_name', _("Author name")), +                            ('poll_name', _("Poll name")), +                            ('poll_desc', _("Poll description")), +                            ('poll_type', _("Poll type")),                              )          error = ""          for key, label in mandatory_fields:              if key not in request.POST or not request.POST[key]:                  # only the first error is reported                  if not error: -                    error = "%s is a mandatory field" % label +                    error = _("%s is a mandatory field") % label              else:                  response_dct[key] = request.POST[key]          if error: @@ -76,7 +95,7 @@ admin_url=admin_url, status = 'D', type=request.POST['poll_type'])          poll.save()          url = response_dct['admin_url'] + '/%s/' % poll.admin_url          return response_dct, HttpResponseRedirect(url) -     +      def getExistingPoll(request, response_dct, admin_url):          "Get an existing poll"          try: @@ -93,7 +112,7 @@ admin_url=admin_url, status = 'D', type=request.POST['poll_type'])            'poll_status':poll.status,            'type_name':poll.getTypeLabel()}          response_dct.update(new_dct) -         +          # urls          base_path = request.META['HTTP_HOST'] + \                      "/".join(request.path.split('/')[:-3]) @@ -103,7 +122,7 @@ admin_url=admin_url, status = 'D', type=request.POST['poll_type'])          response_dct['admin_url'] += '/%s/' % poll.admin_url          response_dct['full_admin_url'] = base_path + "/edit/" \                                           + admin_url + "/" -         +          # if a new choice is submitted          if 'new_choice' in request.POST and request.POST['new_choice']:              try: @@ -112,17 +131,19 @@ admin_url=admin_url, status = 'D', type=request.POST['poll_type'])              except IndexError:                  order = 0              choice = Choice(poll=poll, name=request.POST['new_choice'], -                            order=order)  +                            order=order)              choice.save() -        # check if a choice has been choosen for deletion  +        # check if a choice has been choosen for deletion          for key in request.POST:              if key.startswith('delete_') and request.POST[key]:                  choice = Choice.objects.get(id=int(key[len('delete_'):]))                  Vote.objects.filter(choice=choice).delete()                  choice.delete()          return response_dct, None -     -    response_dct = getBaseResponse(request) + +    response_dct, redirect = getBaseResponse(request) +    if redirect: +        return redirect      response_dct['TYPES'] = Poll.TYPE      response_dct['admin_url'] = \                           "/".join(request.path.split('/')[:-2]) @@ -136,7 +157,7 @@ admin_url=admin_url, status = 'D', type=request.POST['poll_type'])          response_dct['admin_url'] += '/0/'      else:          # existing poll -        response_dct, redirection = getExistingPoll(request,  +        response_dct, redirection = getExistingPoll(request,                                                 response_dct, admin_url)      if redirection:          return redirection @@ -147,7 +168,7 @@ def poll(request, poll_url):      """Display a poll      poll_url is given to identify the poll      """ -     +      def modifyVote(request, choices):          "Modify user's votes"          try: @@ -155,7 +176,7 @@ def poll(request, poll_url):                                    id=int(request.POST['voter']))[0]          except (ValueError, IndexError):              return -        # if no author_name is given deletion of associated votes and  +        # if no author_name is given deletion of associated votes and          # author          if not request.POST['author_name']:              for choice in choices: @@ -215,7 +236,7 @@ def poll(request, poll_url):          author = PollUser(name=request.POST['author_name'])          author.save()          selected_choices = [] -         +          # set the selected choices          for key in request.POST:              if key.startswith('choice_') and request.POST[key]: @@ -236,7 +257,9 @@ def poll(request, poll_url):                  v = Vote(voter=author, choice=choice, value=0)                  v.save() -    response_dct = getBaseResponse(request) +    response_dct, redirect = getBaseResponse(request) +    if redirect: +        return redirect      try:          poll = Poll.objects.filter(base_url=poll_url)[0]      except IndexError: @@ -244,11 +267,11 @@ def poll(request, poll_url):      choices = Choice.objects.filter(poll=poll).order_by('order')      # if the poll don't exist or if it has no choices the user is      # redirected to the main page -    if not choices or not poll:     +    if not choices or not poll:          url = "/".join(request.path.split('/')[:-3])          url += "/?bad_poll=1"          return HttpResponseRedirect(url) -     +      # a vote is submitted      if 'author_name' in request.POST:          if 'voter' in request.POST: @@ -256,27 +279,27 @@ def poll(request, poll_url):              modifyVote(request, choices)          else:              newVote(request, choices) -     +      # 'voter' is in request.GET when the edit button is pushed      if 'voter' in request.GET:          try:              response_dct['current_voter_id'] = int(request.GET['voter'])          except ValueError:              pass -     +      response_dct.update({'choices':choices,                           'poll_type_name':poll.getTypeLabel(),                           'poll_name':poll.name,                           'poll_desc':poll.description})      response_dct['base_url'] = "/".join(request.path.split('/')[:-2]) \                                 + '/%s/' % poll.base_url -     +      # get voters and sum for each choice for this poll      votes = [] # all votes for this poll      votes = Vote.objects.extra(where=['choice_id IN (%s)' \                     % ",".join([str(choice.id) for choice in choices])]) -     +      voters = []      choices_sum = [0 for choice in choices]      choices_ids = [choice.id for choice in choices] diff --git a/static/styles.css b/static/styles.css index a5bd11e..126f807 100644 --- a/static/styles.css +++ b/static/styles.css @@ -11,6 +11,8 @@ background-color:#ced3e1;  }  h1, h1 a{ +margin:0; +margin-top:2px;;  border:1px solid black;  border-right:None;  border-left:None; @@ -58,6 +60,30 @@ background-repeat:no-repeat;  background-position:top right;  } +#header{ +text-align:right; +font-size:11px; +color:grey; +} + +#header #languages a{ +color:grey; +padding-right:6px; +text-decoration:none; +} + +#footer{ +text-align:center; +font-size:11px; +color:grey; +margin:6px; +} + +#footer a{ +color:grey; +text-decoration:none; +} +  .error{  color:red;  } diff --git a/templates/base.html b/templates/base.html index 53bc3cf..3f4dec6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,12 +8,18 @@  <body>  <div id="main"> +<div id="header"> +<span id='languages'>{% for language in languages%}<a href='?language={{language.0}}'>{{language.1}}</a>{% endfor %}</span> +</div>  <div id="top">   <h1><a href='http://{{root_url}}'>Papillon</a></h1>  </div>  <div id="content">  {% block content %}{% endblock %}  </div> +<div id="footer"> +<a href='http://redmine.peacefrogs.net/projects/show/papillon'>Papillon</a> - <a href='http://www.gnu.org/licenses/gpl.html'>Copyright</a> © 2008 <a href='http://redmine.peacefrogs.net/projects/show/papillon'>Papillon project</a> +</div>  </div>  </body>  </html> diff --git a/templates/createOrEdit.html b/templates/createOrEdit.html index 073dcfd..12d9d9d 100644 --- a/templates/createOrEdit.html +++ b/templates/createOrEdit.html @@ -1,64 +1,65 @@ +{% load i18n %}  {% extends "base.html" %}  {% block content %}   {% if not new and not choices %} - <p class='error'>As long as no options were added to the poll, it will not be made available.</p> + <p class='error'>{% trans "As long as no options were added to the poll, it will not be made available." %}</p>   {% endif %} - <h2>{% if new %}New{% else %}Edit{% endif %} poll</h2> + <h2>{% if new %}{% trans "New poll" %}{% else %}{% trans "Edit poll" %}{% endif %}</h2>  {% if error %}<p class='error'>{{ error }}</p>{% endif %}   <form action="{{admin_url}}" method="post">   <table id='new_poll'>    {% if not new %}<tr> -   <td><label>Poll url</label></td> +   <td><label>{% trans "Poll url" %}</label></td>     <td><a href='http://{{full_base_url}}'>http://{{full_base_url}}</a></td> -   <td class='form_description'>Copy this address and send it to voters who want to participate to this poll</td> +   <td class='form_description'>{% trans "Copy this address and send it to voters who want to participate to this poll" %}</td>    </tr>    <tr> -   <td><label>Administration url</label></td> +   <td><label>{% trans "Administration url" %}</label></td>     <td><a href='http://{{full_admin_url}}'>http://{{full_admin_url}}</a></td> -   <td class='form_description'>Address to modify the current poll</td> +   <td class='form_description'>{% trans "Address to modify the current poll" %}</td>    </tr>    {% endif %}<tr> -   <td><label for='author_name'>Author name</label></td> +   <td><label for='author_name'>{% trans "Author name" %}</label></td>     <td>{% if new %}<input type='text' name='author_name' value='{{author_name}}'/>{% else %}{{author_name}}{% endif %}</td> -   <td class='form_description'>Name, firstname or nickname of the author</td> +   <td class='form_description'>{% trans "Name, firstname or nickname of the author" %}</td>    </tr>    <tr> -   <td><label for='poll_name'>Poll name</label></td> +   <td><label for='poll_name'>{% trans "Poll name" %}</label></td>     <td>{% if new %}<input type='text' name='poll_name' value='{{poll_name}}'/>{% else %}{{poll_name}}{% endif %}</td> -   <td class='form_description'>Global name to present the poll</td> +   <td class='form_description'>{% trans "Global name to present the poll" %}</td>    </tr>    <tr> -   <td><label for='poll_desc'>Poll description</label></td> +   <td><label for='poll_desc'>{% trans "Poll description" %}</label></td>     <td>{% if new %}<textarea name='poll_desc'>{{poll_desc}}</textarea>{% else %}{{poll_desc}}{% endif %}</td> -   <td class='form_description'>Precise description of the poll</td> +   <td class='form_description'>{% trans "Precise description of the poll" %}</td>    </tr>    <!--<tr> -   <td><label for='poll_type'>Poll type</label></td> +   <td><label for='poll_type'>{% trans "Poll type" %}</label></td>     <td>{% if new %}<select name='poll_type'>      {% for typ in TYPES %}<option value='{{typ.0}}'{% ifequal poll_type typ.0%} selected='selected'{% endifequal %}>{{typ.1}}</option>{% endfor %}     </select>{% else %}{{type_name}}{% endif %}</td> -   <td class='form_description'>Type of the poll :  +   <td class='form_description'>{% trans "Type of the poll:" %}     <ul> -    <li>Meeting is the appropriate type to set a date for a meeting.</li> -    <li>Poll is the appropriate type for a simple multi-choice poll</li> -    <li>Balanced poll lets voters setting negative vote for some choices</li> -    <li>One choice poll</li> +    <li>{% trans "Meeting is the appropriate type to set a date for a meeting."%}</li> +    <li>{% trans "Poll is the appropriate type for a simple multi-choice poll" %}</li> +    <li>{% trans "Balanced poll lets voters setting negative vote for some choices" %}</li> +    <li>{% trans "One choice poll" %}</li>     </ul>     </td>    </tr>!-->    <input type='hidden' name='poll_type' value='M'/>    {% if not new %}{% if choices %}<tr> -   <th>Choices</th><th> </th><th>Delete?</th> +   <th>{% trans "Choices" %}</th><th> </th><th>{% trans "Delete?"%}</th>    </tr>    {% for choice in choices %}<tr>     <td> </td><td>{{choice.name}}</td><td><input type='checkbox' name='delete_{{choice.id}}'/></td>    </tr> -  {% endfor %}{% endif %}<tr><td><label>New choice</label></td><td><input type='text' name='new_choice'/></td></tr> +  {% endfor %}{% endif %}<tr><td><label>{% trans "New choice" %}</label></td><td><input type='text' name='new_choice'/></td></tr>   {% endif %}</table>   {% if new %}<input type='hidden' name='new' value='1'/> - <input type='submit' value='Create' /> + <input type='submit' value='{% trans "Create" %}' />   {% else %}<input type='hidden' name='edit' value='1'/> - <input type='submit' value='Edit' /> + <input type='submit' value='{% trans "Edit" %}' />   {% endif %}</form>  {% endblock %} diff --git a/templates/main.html b/templates/main.html index 34f6609..0ca4536 100644 --- a/templates/main.html +++ b/templates/main.html @@ -1,9 +1,9 @@ +{% load i18n %}  {% extends "base.html" %}  {% block content %}  {% if error %}<p class='error'>{{error}}</p>{%endif%} -<h2><a href='edit/0'>Create a poll</a></h2> -<p>Create a new sondage for take a decision, find a date for a meeting, etc.</p> +<h2><a href='edit/0'>{% trans "Create a poll" %}</a></h2> +<p>{% trans "Create a new sondage for take a decision, find a date for a meeting, etc." %}</p>  {% endblock %} - diff --git a/templates/vote.html b/templates/vote.html index 1b862c4..0174a18 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -1,3 +1,4 @@ +{% load i18n %}  {% extends "base.html" %}  {% block content %} @@ -17,7 +18,7 @@    <td class='simple'></td>    <td><input type='text' name='author_name' value='{{voter.name}}'/></td>    {% for vote in voter.votes %}<td><input type='checkbox' name='{%if vote.id%}vote_{{vote.id}}{%else%}choice_{{vote}}{%endif%}'{%ifequal vote.value 1%} checked='checked'{%endifequal%}/></td>{%endfor%} -  {%else%}<td class='simple'><a href='?voter={{voter.id}}'>Edit</a></td> +  {%else%}<td class='simple'><a href='?voter={{voter.id}}'>{% trans "Edit" %}</a></td>    <td>{{voter.name}}</td>    {% for vote in voter.votes %}<td class='{%ifequal vote.value 1%}OK{%else%}KO{%endifequal%}'>{% ifequal vote.value 1%}Yes{%else%}No{%endifequal%}</td>    {%endfor%} @@ -31,12 +32,12 @@   </tr>   {%endif%}   <tr id='sum'> -  <td class='simple'></td><th>Sum</th> +  <td class='simple'></td><th>{% trans "Sum" %}</th>    {% for sum in choices_sum %}<td>{{sum}}</td>    {% endfor %}   </tr>   </table>   </div> - <input type='submit' value='{%if current_voter_id%}Edit{%else%}Participate{%endif%}'/> + <input type='submit' value='{%if current_voter_id%}{% trans "Edit" %}{%else%}{% trans "Participate" %}{%endif%}'/>   </form>  {% endblock %}  | 
