summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authoretienne2008-08-20 00:01:23 +0000
committeretienne2008-08-20 00:01:23 +0000
commit91ecaf80b3959bc902c713bd8556757b296a2bd0 (patch)
tree48ad13ef81c0eaec18804045c73a59278bbe89e0 /templates
parentb638469a22df4fb92da63a54295347024cb55eb4 (diff)
Internationalization of the application
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html6
-rw-r--r--templates/createOrEdit.html45
-rw-r--r--templates/main.html6
-rw-r--r--templates/vote.html7
4 files changed, 36 insertions, 28 deletions
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>&nbsp;</th><th>Delete?</th>
+ <th>{% trans "Choices" %}</th><th>&nbsp;</th><th>{% trans "Delete?"%}</th>
</tr>
{% for choice in choices %}<tr>
<td>&nbsp;</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 %}