translation on proposal templates

This commit is contained in:
Nelle Varoquaux 2012-09-24 12:54:41 +02:00
parent 30e8f1dab5
commit 245debcbf2
4 changed files with 36 additions and 25 deletions

View file

@ -1,3 +1,5 @@
{% load i18n %}
<tr> <tr>
<td> <td>
<a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a> <a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a>
@ -7,16 +9,16 @@
<td> <td>
{% if proposal.cancelled %} {% if proposal.cancelled %}
<span class="label label-important">Cancelled</span> <span class="label label-important">{% trans 'Cancelled' %}</span>
{% else %} {% else %}
{% if request.user == proposal.speaker.user %} {% if request.user == proposal.speaker.user %}
{% if proposal.result.status == "accepted" %} {% if proposal.result.status == "accepted" %}
<span class="label label-success">Accepted</span> <span class="label label-success">{% trans 'Accepted' %}</span>
{% else %} {% else %}
<span class="label">Submitted</span> <span class="label">{% trans 'Submitted' %}</span>
{% endif %} {% endif %}
{% else %} {% else %}
<span class="label">Invited</span> <span class="label">{% trans 'Invited' %}</span>
{% endif %} {% endif %}
{% endif %} {% endif %}
</td> </td>
@ -25,12 +27,14 @@
{% if not proposal.cancelled %} {% if not proposal.cancelled %}
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#"> <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
Choose Response {% trans 'Choose Response' %}
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{% url proposal_pending_join proposal.id %}">Accept invitation</a></li> <li><a href="{% url proposal_pending_join proposal.id %}">
<li><a href="{% url proposal_pending_decline proposal.id %}">Decline invitation</a></li> {% trans 'Accept invitation' %}</a></li>
<li><a href="{% url proposal_pending_decline proposal.id
%}">{% trans 'Decline invitation' %}</a></li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}

View file

@ -1,8 +1,10 @@
{% extends "proposals/base.html" %} {% extends "proposals/base.html" %}
{% load i18n %}
{% load bootstrap_tags %} {% load bootstrap_tags %}
{% block head_title %}Cancel Proposal{% endblock %} {% block head_title %}{% trans 'Cancel Proposal' %}{% endblock %}
{% block body %} {% block body %}
<h1>Cancel: {{ proposal.title }}</h1> <h1>Cancel: {{ proposal.title }}</h1>
@ -11,6 +13,6 @@
{% csrf_token %} {% csrf_token %}
<p>Are you sure you want to cancel <b>{{ proposal.title }}</b>?</p> <p>Are you sure you want to cancel <b>{{ proposal.title }}</b>?</p>
<input class="btn btn-danger" type="submit" value="I am sure" /> <input class="btn btn-danger" type="submit" value="I am sure" />
<a class="btn" href="{% url proposal_detail proposal.pk %}">No, keep it for now</a> <a class="btn" href="{% url proposal_detail proposal.pk %}">{% trans 'No, keep it for now' %}</a>
</form> </form>
{% endblock %} {% endblock %}

View file

@ -22,7 +22,7 @@
</a> </a>
{% endif %} {% endif %}
{% else %} {% else %}
Cancelled {% trans 'Cancelled' }
{% endif %} {% endif %}
</div> </div>
@ -44,7 +44,7 @@
</div> </div>
{% if request.user == proposal.speaker.user %} {% if request.user == proposal.speaker.user %}
<div class="tab-pane" id="proposal-documents"> <div class="tab-pane" id="proposal-documents">
<h3>Supporting Documents</h3> <h3>{% trans 'Supporting Documents' %}</h3>
{% if proposal.supporting_documents.exists %} {% if proposal.supporting_documents.exists %}
<table class="table table-striped"> <table class="table table-striped">
@ -54,23 +54,23 @@
<td> <td>
<form style="margin: 0;" method="post" action="{% url proposal_document_delete document.pk %}"> <form style="margin: 0;" method="post" action="{% url proposal_document_delete document.pk %}">
{% csrf_token %} {% csrf_token %}
<button type="submit" class="btn btn-mini">delete</button> <button type="submit" class="btn btn-mini">{% trans 'delete' %}</button>
</form> </form>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% else %} {% else %}
<p>No supporting documents attached to this proposal.</p> <p>{% trans 'No supporting documents attached to this proposal.' %}</p>
{% endif %} {% endif %}
<a class="btn btn-small{% if proposal.cancelled %} btn-disabled{% endif %}" href="{% url proposal_document_create proposal.pk %}"><i class="icon-upload"></i> Add Document</a> <a class="btn btn-small{% if proposal.cancelled %} btn-disabled{% endif %}" href="{% url proposal_document_create proposal.pk %}"><i class="icon-upload"></i> {% trans 'Add Document' %}</a>
</div> </div>
{% endif %} {% endif %}
{% if message_form %} {% if message_form %}
<div class="tab-pane" id="proposal-feedback"> <div class="tab-pane" id="proposal-feedback">
<h3>Conversation with Reviewers</h3> <h3>{% trans 'Conversation with Reviewers' %}</h3>
{% for message in proposal.messages.all %} {% for message in proposal.messages.all %}
<div class="review-box"> <div class="review-box">
@ -80,9 +80,9 @@
<div class="clear"></div> <div class="clear"></div>
{% endfor %} {% endfor %}
<h3>Leave a Message</h3> <h3>{% trans 'Leave a Message' %}</h3>
<p>You can leave a message for the reviewers here.</p> <p>{% trans 'You can leave a message for the reviewers here.' %}</p>
<form action="" method="POST" accept-charset="utf-8"> <form action="" method="POST" accept-charset="utf-8">
{% csrf_token %} {% csrf_token %}
@ -90,7 +90,8 @@
{{ message_form|as_bootstrap }} {{ message_form|as_bootstrap }}
</fieldset> </fieldset>
<div class="actions"> <div class="actions">
<button type="submit" name="message_submit" class="btn primary">Submit</button> <button type="submit" name="message_submit" class="btn
primary">{% trans 'Submit' %}</button>
</div> </div>
</form> </form>
</div> </div>

View file

@ -1,23 +1,27 @@
{% extends "proposals/base.html" %} {% extends "proposals/base.html" %}
{% load i18n %}
{% load bootstrap_tags %} {% load bootstrap_tags %}
{% block body %} {% block body %}
<h1>Proposal: {{ proposal.title }}</h1> <h1>{{% trans 'Proposal:' %} {{ proposal.title }}</h1>
<p><a href="{% url proposal_edit proposal.pk %}">Edit proposal</a></p> <p>
<a href="{% url proposal_edit proposal.pk %}">{% trans 'Edit proposal' %}
</a>
</p>
<h2>Current Speakers</h2> <h2>{% trans 'Current Speakers' %}</h2>
{% for speaker in speakers %} {% for speaker in speakers %}
{% if speaker.user %} {% if speaker.user %}
<p><b>{{ speaker.name }}</b> &mdash; {{ speaker.email }}</p> <p><b>{{ speaker.name }}</b> &mdash; {{ speaker.email }}</p>
{% else %} {% else %}
<p>{{ speaker.email }} &mdash; pending invitation</p> <p>{{ speaker.email }} &mdash; {% trans 'pending invitation' %}</p>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<h2>Add another speaker</h2> <h2>{% trans 'Add another speaker' %}</h2>
<form method="POST" action="" enctype="multipart/form-data" class="uniForm"> <form method="POST" action="" enctype="multipart/form-data" class="uniForm">
{% csrf_token %} {% csrf_token %}
@ -34,4 +38,4 @@
$("#id_email").focus(); $("#id_email").focus();
}); });
</script> </script>
{% endblock %} {% endblock %}