]> git.parisson.com Git - telemeta.git/commitdiff
Pull from parisson/Telemeta tree featured/haystack
authorkmary <killian.mary@outlook.fr>
Sun, 28 Jun 2015 14:01:23 +0000 (16:01 +0200)
committerkmary <killian.mary@outlook.fr>
Sun, 28 Jun 2015 14:01:23 +0000 (16:01 +0200)
translation for haystack search

telemeta/forms/haystack_form.py
telemeta/templates/search/advanceSearch.html
telemeta/templates/search/search.html

index 75e88cdf745a9a5205e3bc923dec77744d9ca548..b857e169e1258933279b96bb41503f32e893c79e 100644 (file)
@@ -37,7 +37,7 @@ class HayAdvanceForm(SearchForm):
     #to replace de basic search form field
     q = forms.CharField(required=False, label=(_('title')), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
 
-    location = forms.CharField(required=False, label=('Location'), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
+    location = forms.CharField(required=False, label=(_('location')), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
 
     # to create a dynamic list of ethnic group
     def list_ethnic_group():
@@ -48,10 +48,10 @@ class HayAdvanceForm(SearchForm):
             type_name.append((ethnic.value, ethnic.value))
         return type_name
 
-    ethnic_group = forms.CharField(required=False, label=('Population / social group'), widget=forms.Select(attrs={'style': 'width:100%'}, choices=list_ethnic_group()))
+    ethnic_group = forms.CharField(required=False, label=(_('population / social group')), widget=forms.Select(attrs={'style': 'width:100%'}, choices=list_ethnic_group()))
 
-    instruments = forms.CharField(required=False, label=('Instruments'), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
-    collectors = forms.CharField(required=False, label=('Recordist'), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
+    instruments = forms.CharField(required=False, label=(_('instruments')), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
+    collectors = forms.CharField(required=False, label=(_('recordist')), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
 
     #to create a dynamic list of publish year
     def list_recorded_year():
@@ -76,8 +76,8 @@ class HayAdvanceForm(SearchForm):
             list_year.append((str(year), year))
         return list_year
 
-    recorded_from_date = forms.IntegerField(required=False, label=('Recorded from'), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_recorded_year()))
-    recorded_to_date = forms.IntegerField(required=False, label=('Recorded to'), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_recorded_year()))
+    recorded_from_date = forms.IntegerField(required=False, label=(_('recording date (from)')), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_recorded_year()))
+    recorded_to_date = forms.IntegerField(required=False, label=(_('recording date (until')), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_recorded_year()))
 
     #to create a dynamic list of publish year
     def list_publish_year():
@@ -100,13 +100,13 @@ class HayAdvanceForm(SearchForm):
             list_year.append((year, year))
         return list_year
 
-    year_published_from = forms.IntegerField(required=False, label=('Year published from'), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_publish_year()))
-    year_published_to = forms.IntegerField(required=False, label=('Year published to'), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_publish_year()))
+    year_published_from = forms.IntegerField(required=False, label=(_('year published from')), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_publish_year()))
+    year_published_to = forms.IntegerField(required=False, label=(_('year published to')), widget=forms.Select(attrs={'style': 'width:47%'}, choices=list_publish_year()))
 
     viewable_choice = (('1', 'no preference'), ('2', 'online and public'), ('3', 'online (account required)'))
-    viewable = forms.CharField(required=False, label=('Viewable'), widget=forms.RadioSelect(choices=viewable_choice), initial=1)
+    viewable = forms.CharField(required=False, label=(_('viewable')), widget=forms.RadioSelect(choices=viewable_choice), initial=1)
 
-    item_status = forms.CharField(required=False, label=('Item Status'), widget=forms.RadioSelect(choices=(('1', 'no preference'), ('pub', 'Published'), ('unpub', 'Unpublished'))), initial=1)
+    item_status = forms.CharField(required=False, label=(_('Document status')), widget=forms.RadioSelect(choices=(('1', 'no preference'), ('pub', 'Published'), ('unpub', 'Unpublished'))), initial=1)
 
     #to create a dynamic list of media type
     def list_media_type():
@@ -117,7 +117,7 @@ class HayAdvanceForm(SearchForm):
             type_name.append((mt.value, mt.value))
         return type_name
 
-    media_type = forms.CharField(required=False, label=('Media'), widget=forms.RadioSelect(choices=(list_media_type())), initial=1)
+    media_type = forms.CharField(required=False, label=(_('media')), widget=forms.RadioSelect(choices=(list_media_type())), initial=1)
 
     #to create a dynamic list of recording context
     def list_recording_context():
@@ -128,7 +128,7 @@ class HayAdvanceForm(SearchForm):
             type_name.append((context.value, context.value))
         return type_name
 
-    recording_context = forms.CharField(required=False, label=('Recording Context'), widget=forms.Select(attrs={'style': 'width:100%'}, choices=list_recording_context()))
+    recording_context = forms.CharField(required=False, label=(_('recording context')), widget=forms.Select(attrs={'style': 'width:100%'}, choices=list_recording_context()))
 
     #to create a dynamic list of physical format
     def list_physical_format():
@@ -139,9 +139,9 @@ class HayAdvanceForm(SearchForm):
             type_name.append((physical_format.value, physical_format.value))
         return type_name
 
-    physical_format = forms.CharField(required=False, label=('Physical Format'), widget=forms.Select(attrs={'style': 'width:100%'}, choices=list_physical_format()))
+    physical_format = forms.CharField(required=False, label=(_('physical format')), widget=forms.Select(attrs={'style': 'width:100%'}, choices=list_physical_format()))
 
-    code = forms.CharField(required=False, label=('Code'), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
+    code = forms.CharField(required=False, label=(_('code')), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
 #end
 
     def search(self):
index 7e21a4d1d71d38396deda421ebb064e26ff01a19..2b080c63658da82f5760eeeb53ead3b6327b742a 100644 (file)
@@ -43,7 +43,7 @@
 
                 <div class="fieldWrapper">
                     {{form.media_type.errors}}
-                    <label>{% trans "Media Type" %} :</label></br>
+                    <label>{% trans "media type" %} :</label></br>
                     <ul id="id_media_type" style="margin-left:-40px">
                         {%ifequal query.media_type 'audio'%}
                             <li><label for="id_media_type_0">{% trans "no preference" %}</label><input id="id_media_type_0" type="radio" value="1" name="media_type"></input></li>
@@ -65,7 +65,7 @@
                 </div>
                 <div class="fieldWrapper">
                     {{form.viewable_errors}}
-                    <label>{% trans "Viewable" %} : </label></br>
+                    <label>{% trans "Available for consultation media" %} : </label></br>
                     <ul id="id_viewable" style="margin-left:-40px">
                         {%ifequal query.viewable '2'%}
                             <li><label for="id_viewable_0">{% trans "no preference" %}</label><input id="id_viewable_0" type="radio" value="1" name="viewable"></input></li>
@@ -93,7 +93,7 @@
                 </div>
                 <div class="fieldWrapper">
                     {{form.item_status_errors}}
-                    <label>{% trans "Item status" %} : </label></br>
+                    <label>{% trans "Document status" %} : </label></br>
                     <ul id="id_item_status" style="margin-left:-40px">
                         {%ifequal query.item_status 'pub'%}
                             <li><label for="id_item_status_0">{% trans "no preference" %}</label><input id="id_item_status_0" type="radio" value="1" name="item_status"></input></li>
                 </div>
                 <div class="fieldWrapper">
                     {{form.year_published_from.errors}} {{form.year_published_to.errors}}
-                    <label> {% trans "Year Published" %} :</label></br>
+                    <label> {% trans "year published" %} :</label></br>
                     {{form.year_published_from}} <span style="font-size:3em" aria-hidden="true">-</span> {{form.year_published_to}}
                 </div>
                 <div class="fieldWrapper">
                     {{form.recording_context.errors}}
-                    {% trans form.recording_context.label_tag %}</br>
+                    {{ form.recording_context.label_tag }}</br>
                     {{form.recording_context}}
                 </div>
                 <div class="fieldWrapper">
                     {{form.physical_format.errors}}
-                    {% trans form.physical_format.label_tag %}</br>
+                    {{ trans form.physical_format.label_tag }}</br>
                     {{form.physical_format}}
                 </div>
                 <div class="fieldWrapper">
                     {{form.code.errors}}
-                    {% trans form.code.label_tag %}</br>
+                    {{} trans form.code.label_tag }}</br>
                     {{form.code}}
                 </div>
             </div>
                  </div>
                  <div class="col-md-4 col-md-offset-4" >
                     <div class="pull-right"">
-                        <label style="display:inline-block;vertical-align:middle">results per page:</label>
+                        <label style="display:inline-block;vertical-align:middle">{% trans "results per page"%}:</label>
                         <div style="display:inline-block;vertical-align:middle">
                             <select id="results-per-page" name="results_page">
                                 <option {% ifequal results_page 20 %}selected{% endifequal %} value="20">20</option>
index d327bf5fe63ff3e6869bbc0652be2e7fda11bae6..853b87250faa6e4909fbb06d810c9cc48107a70a 100644 (file)
@@ -35,7 +35,7 @@
                  </div>
                  <div class="col-md-4 col-md-offset-4" >
                     <div class="pull-right"">
-                        <label style="display:inline-block;vertical-align:middle">results per page:</label>
+                        <label style="display:inline-block;vertical-align:middle">{% trans "results per page"%}:</label>
                         <div style="display:inline-block;vertical-align:middle">
                             <select id="results-per-page" name="results_page">
                                 <option {% ifequal results_page 20 %}selected{% endifequal %} value="20">20</option>