From: Kaltar5679 Date: Fri, 5 Jun 2015 09:40:53 +0000 (+0200) Subject: add trans in template X-Git-Tag: 1.6a^2~15^2~34^2~2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7dc5f6b88a77ad4f33a95af66bd7f12f8d75c230;p=telemeta.git add trans in template --- diff --git a/examples/sandbox/src/django-haystack b/examples/sandbox/src/django-haystack index cecb459f..bd60745c 160000 --- a/examples/sandbox/src/django-haystack +++ b/examples/sandbox/src/django-haystack @@ -1 +1 @@ -Subproject commit cecb459ff4468a79a43cead3d09e213d0980c080 +Subproject commit bd60745ce82318b1819768c9a31db0579228654d diff --git a/telemeta/templates/search/advanceSearch.html b/telemeta/templates/search/advanceSearch.html index 22173f2d..af7e68b1 100644 --- a/telemeta/templates/search/advanceSearch.html +++ b/telemeta/templates/search/advanceSearch.html @@ -60,46 +60,46 @@
{{form.q.errors}} - {{form.q.label_tag}}
+ {% trans form.q.label_tag %}
{{form.q}}
{{form.location.errors}} - {{form.location.label_tag}}
+ {% trans form.location.label_tag %}
{{form.location}}
{{form.ethnic_group.errors}} - {{form.ethnic_group.label_tag}}
+ {% trans form.ethnic_group.label_tag %}
{{form.ethnic_group}}
{{form.instruments.errors}} - {{form.instruments.label_tag}}
+ {% trans form.instruments.label_tag %}
{{form.instruments}}
{{form.year_published_from.errors}} {{form.year_published_to.errors}} -
+
{{form.year_published_from}} {{form.year_published_to}}
{{form.media_type.errors}} -
+
    {%ifequal query.media_type 'audio'%} -
  • -
  • -
  • +
  • +
  • +
  • {%else%} {%ifequal query.media_type 'video'%} -
  • -
  • -
  • +
  • +
  • +
  • {%else%} -
  • -
  • -
  • +
  • +
  • +
  • {%endifequal%} {%endifequal%}
@@ -107,21 +107,21 @@
{{form.viewable_errors}} -
+
    {%ifequal query.viewable '2'%} -
  • -
  • -
  • +
  • +
  • +
  • {%else%} {%ifequal query.viewable '3'%} -
  • -
  • -
  • +
  • +
  • +
  • {%else%} -
  • -
  • -
  • +
  • +
  • +
  • {%endifequal%} {%endifequal%}
@@ -130,48 +130,48 @@
{{form.collectors.errors}} - {{form.collectors.label_tag}}
+ {% trans form.collectors.label_tag %}
{{form.collectors}}
{{form.recorded_from_date.errors}} {{form.recorded_to_date.errors}} -
+
{{form.recorded_from_date}} {{form.recorded_to_date}}
{{form.item_status_errors}} -
+
    {%ifequal query.item_status 'pub'%} -
  • -
  • -
  • +
  • +
  • +
  • {%else%} {%ifequal query.item_status 'unpub'%} -
  • -
  • -
  • +
  • +
  • +
  • {%else%} -
  • -
  • -
  • +
  • +
  • +
  • {%endifequal%} {%endifequal%}
{{form.recording_context.errors}} - {{form.recording_context.label_tag}}
+ {% trans form.recording_context.label_tag %}
{{form.recording_context}}
{{form.physical_format.errors}} - {{form.physical_format.label_tag}}
+ {% trans form.physical_format.label_tag %}
{{form.physical_format}}
{{form.code.errors}} - {{form.code.label_tag}}
+ {% trans form.code.label_tag %}
{{form.code}}
diff --git a/telemeta/templates/search/filters.html b/telemeta/templates/search/filters.html index dcb575a9..54a54d8c 100644 --- a/telemeta/templates/search/filters.html +++ b/telemeta/templates/search/filters.html @@ -1,50 +1,51 @@ - +{% load telemeta_utils %} +{% load i18n %}
-
Filters
+
{% trans "Filters" %}
{% if facets.fields.item_status %} - + {% for item_status in facets.fields.item_status %} {% endfor %} {% if Published_count == 0 %} - + {% endif %} {% if Unpublished_count == 0 %} - + {% endif %} {% else %} - - + + {% endif %} {% if facets.fields.digitized %} - + {% for digitized in facets.fields.digitized %} {% ifequal digitized.0 'T' %} {% endifequal %} {% endfor %} {% if digitized_count == 0 %} - + {% endif %} {% else %} - - + + {% endif %} {% if facets.fields.item_acces %} - + {% if viewable_count != 0 %} {% endif %} {% if viewable_count == 0 %} - + {% endif %} {% comment %} {% for item_acces in facets.fields.item_acces %} @@ -55,19 +56,19 @@ {% endfor %} {%endcomment%} {% else %} - - + + {% endif %}
Item Status{% trans "Item Status" %}{{ item_status.0 }} {{ item_status.1 }} Published 0 {% trans "Published" %} 0 Unpublished 0 {% trans "Unpublished" %} 0Item StatusNone{% trans "Item Status" %}{% trans "None" %}
Player Status{% trans "Player Status" %}Sound {{ digitized.1 }} Sound 0 {% trans "Sound" %} 0Player StatusNone{% trans "Player Status" %}{% trans "None" %}
Access Right{% trans "Access Right" %}viewable {{viewable_count}}viewable {{viewable_count}}{% trans "viewable" %} {{viewable_count}}Access RightNone{% trans "Access Right" %}{% trans "None" %}
-
Other Filters
+
{% trans "Other Filters" %}
{% if facets.fields.media_type %} - + {% for media_type in facets.fields.media_type %} {% ifequal media_type.0 'Audio'%} @@ -77,17 +78,17 @@ {% endifequal %} {% endfor %} {% if Video_count == 0 %} - + {% endif %} {% if Audio_count == 0 %} - + {% endif %} {% endif %} {% if facets.fields.recording_context %} - + {% for recording_context in facets.fields.recording_context %} {% ifequal recording_context.0 'Studio'%} @@ -100,19 +101,19 @@ {% endifequal %} {% endfor %} {% if Terrain_count == 0 %} - + {% endif %} {% if Radio_count == 0 %} - + {% endif %} {% if Studio_count == 0 %} - + {% endif %} {% endif %} {% if facets.fields.physical_format %} - + {% for physical_format in facets.fields.physical_format %} {% ifequal physical_format.0 'CDR'%} @@ -125,13 +126,13 @@ {% endifequal %} {% endfor %} {% if CDR_count == 0 %} - + {% endif %} {% if Disque_count == 0 %} - + {% endif %} {% if Cylindre_count == 0 %} - + {% endif %} {% endif %}
Media Type{% trans "Media Type" %}{{ media_type.0 }} {{ media_type.1 }} Video 0 {% trans "Video" %} 0 Audio 0 {% trans "Audio" %} 0
Recording Context{% trans "Recording Context" %}{{ recording_context.0 }} {{ recording_context.1 }} Terrain 0 {% trans "Terrain" %} 0 Radio 0 {% trans "Radio" %} 0 Studio 0 {% trans "Studio" %} 0
Physical Format{% trans "Physical Format" %}{{ physical_format.0 }} {{ physical_format.1 }} CDR 0 {% trans "CDR" %} 0 Disque 0 {% trans "Disque" %} 0 Cylindre 0 {% trans "Cylindre" %} 0