Fix translation issues

This commit is contained in:
Nicolas Le Goff
2013-09-05 13:28:45 +02:00
parent 68aeea1d70
commit ed514432ca
10 changed files with 98 additions and 53 deletions

View File

@@ -7,11 +7,15 @@
<div class="alert alert-success">
<button class="close" data-dismiss="alert" type="button">×</button>
{% set user_count = app['request'].get('user-updated') %}
{% if user_count == 1 %}
{% trans %}
{{ user_count }} user has been created
{% plural user_count %}
{{ user_count }} users have been created
The user has been created.
{% endtrans %}
{% else %}
{% trans %}
{{ user_count }} users have been created.
{% endtrans %}
{% endif %}
</div>
{% endif %}

View File

@@ -256,10 +256,18 @@
{% if values.available > 0 %}
<div class='well-small'>
{% set docs_orderable = values.available %}
{% trans %}{{docs_orderable}} documents commandes{% endtrans %}
{% if docs_orderable <= 1 %}
{% trans %}Un document commande{% endtrans %}
{% else %}
{% trans %}{{docs_orderable}} documents commandes{% endtrans %}
{% endif %}
{% set docs_not_orderable = values.total - values.available %}
{% if docs_not_orderable > 0%}
{% trans %}{{docs_not_orderable}} documents ne peuvent pas etre commandes{% endtrans %}
{% if docs_not_orderable == 1 %}
{% trans %}Un document ne peut etre commande{% endtrans %}
{% else %}
{% trans %}{{docs_not_orderable}} documents ne peuvent pas etre commandes{% endtrans %}
{% endif %}
{% endif %}
{% if values.refused|length > 0 %}
{% set title%}

View File

@@ -1,14 +1,12 @@
<ul>
<li>
{% set nb_view = element.get_view_count|default(0) %}
{% if nb_view == 0 %}
{% if nb_view <= 1 %}
{% trans %}
{{ nb_view }} vue
{% endtrans %}
{% else %}
{% trans %}
{{ nb_view }} vue
{% plural nb_view %}
{{ nb_view }} vues
{% endtrans %}
{% endif %}
@@ -17,11 +15,15 @@
{% set nb_rating = element.get_ratings|default(0) %}
{% if element.get_rating > 0 %}
<li>
{% trans %}
{{ nb_rating }} like
{% plural nb_rating %}
{{ nb_rating }} likes
{% endtrans %}
{% if nb_rating <= 1 %}
{% trans %}
{{ nb_rating }} like
{% endtrans %}
{% else %}
{% trans %}
{{ nb_rating }} likes
{% endtrans %}
{% endif %}
</li>
{% endif %}
{% endif %}

View File

@@ -1,14 +1,12 @@
<ul>
<li>
{% set nb_view = element.get_view_count|default(0) %}
{% if nb_view == 0 %}
{% if nb_view <= 1 %}
{% trans %}
{{ nb_view }} vue
{% endtrans %}
{% else %}
{% trans %}
{{ nb_view }} vue
{% plural nb_view %}
{{ nb_view }} vues
{% endtrans %}
{% endif %}

View File

@@ -1,14 +1,12 @@
<ul>
<li>
{% set nb_view = element.get_view_count|default(0) %}
{% if nb_view == 0 %}
{% if nb_view <= 1 %}
{% trans %}
{{ nb_view }} vue
{% endtrans %}
{% else %}
{% trans %}
{{ nb_view }} vue
{% plural nb_view %}
{{ nb_view }} vues
{% endtrans %}
{% endif %}
@@ -16,11 +14,15 @@
{% set value = element.get_rating|default(0) %}
{% if value > 0 %}
<li>
{% trans %}
{{ value }} like
{% plural value %}
{{ value }} likes
{% endtrans %}
{% if value <= 1 %}
{% trans %}
{{ value }} like
{% endtrans %}
{% else %}
{% trans %}
{{ value }} likes
{% endtrans %}
{% endif %}
</li>
{% endif %}

View File

@@ -16,21 +16,29 @@
<div id='property-statut'>
<p class="header">
<h4 style='text-align:center;'>
{% trans %}
You have selected one record.
{% plural nbReceivedDocuments %}
You have selected {{ nbReceivedDocuments }} records.
{% endtrans %}
{% if nbReceivedDocuments == 1 %}
{% trans %}
You have selected one record.
{% endtrans %}
{% else %}
{% trans %}
You have selected {{ nbReceivedDocuments }} records.
{% endtrans %}
{% endif %}
{% if nbEditableDocuments == 0 %}
{% trans %}None of the records can be modified.{% endtrans %}
{% else %}
{% if nbEditableDocuments < nbReceivedDocuments %}
{% trans %}
Only one record can be modified.
{% plural nbEditableDocuments %}
Only {{ nbEditableDocuments }} records can be modified.
{% endtrans %}
{% if nbEditableDocuments == 1 %}
{% trans %}
Only one record can be modified.
{% endtrans %}
{% else %}
{% trans %}
Only {{ nbEditableDocuments }} records can be modified.
{% endtrans %}
{% endif %}
{% endif %}
{% endif %}
</h4>

View File

@@ -19,21 +19,29 @@
{% if records | length != records.received() | length %}
<div class="well-small">
{% set countable = records.received().count() - records.count() %}
{% trans %}
One document can not be modified.
{% plural countable %}
{{countable}} documents can not be modified.
{% endtrans %}
{% if countable == 1 %}
{% trans %}
One document can not be modified.
{% endtrans %}
{% else %}
{% trans %}
{{countable}} documents can not be modified.
{% endtrans %}
{% endif %}
</div>
{% endif %}
<div class="well-small">
{% set countable = records | length %}
{% trans %}
Move one record to the chose collection in the list.
{% plural countable %}
Move {{ countable }} records to the chosen collection in the list.
{% endtrans %}
{% if countable == 1 %}
{% trans %}
Move one record to the chosen collection in the list.
{% endtrans %}
{% else %}
{% trans %}
Move {{ countable }} records to the chosen collection in the list.
{% endtrans %}
{% endif %}
</div>
<div class="well-small">

View File

@@ -91,8 +91,8 @@
<div class="form-actions" style="color:#333;">
{% trans 'Selectionnez des documents et ' %}
<button class="btn btn-primary send">Envoyer</button>
<button class="btn deny">Refuser</button>
<button class="btn btn-primary send">{% trans 'Send' %}</button>
<button class="btn deny">{% trans 'Deny' %}</button>
<button class="order_launcher btn">{% trans 'Retour aux commandes' %}</button>
<img src="/skins/icons/loader000000.gif" class="activity_indicator" style="display:none;"/>
<input name="order_id" type="hidden" value="{{ order.get_order_id() }}" />

View File

@@ -306,11 +306,15 @@
{% if record_count > 0 %}
<div class="lazaret-proposals span8">
<h5>
{% trans %}
{{ record_count }} record match the unique identifier :
{% plural record_count %}
{{ record_count }} records match the unique identifier :
{% endtrans %}
{% if record_count <= 1 %}
{% trans %}
A record matches the unique identifier :
{% endtrans %}
{% else %}
{% trans %}
{{ record_count }} records match the unique identifier :
{% endtrans %}
{% endif %}
</h5>
<ul class="thumbnails">
{% for record in records %}

View File

@@ -30,8 +30,19 @@
<div style="clear:both;height:2px;"></div>
<div class="right" style="font-weight:lighter;font-size:10px;">
{% set total_count = result.total %}
{% if result.total > 0 and result.total != 0 %}
<i>{% trans %} Number of result {% plural total_count %} Number of results {% endtrans %} : {{ result.total }}</i>
{% if total_count > 0 and total_count != 0 %}
<i>
{% if total_count == 1 %}
{% trans %}
1 result
{% endtrans %}
{% else %}
{% trans %}
{{ total_count }} results
{% endtrans %}
{% endif %}
</i>
{% endif %}
</div>
<div class="spacer"></div>