From a041394bd419ed6cd01df86e7ac2b6379cf05ccb Mon Sep 17 00:00:00 2001 From: mathieu Date: Tue, 17 May 2016 14:51:05 +0200 Subject: [PATCH] Add traductions --- env/debug.env | 2 +- telemeta/locale | 2 +- telemeta/static/telemeta/css/search.css | 67 +++++++++++-------- telemeta/static/telemeta/js/locale.js | 3 + telemeta/templates/search/advanceSearch.html | 25 ++----- .../telemeta/instrument_alias_edit.html | 2 +- .../templates/telemeta/instrument_edit.html | 2 +- .../templates/telemeta/mediaitem_detail.html | 2 +- telemeta/util/backend.py | 2 +- 9 files changed, 54 insertions(+), 53 deletions(-) diff --git a/env/debug.env b/env/debug.env index fb6db552..f43f7d26 100644 --- a/env/debug.env +++ b/env/debug.env @@ -18,5 +18,5 @@ BROKER_URL=redis://broker:6379/0 # If this is True, all tasks will be executed locally by blocking until the task returns. CELERY_ALWAYS_EAGER=False -REINDEX=True +REINDEX=False DATASTART=False diff --git a/telemeta/locale b/telemeta/locale index 0790c8f8..7a791189 160000 --- a/telemeta/locale +++ b/telemeta/locale @@ -1 +1 @@ -Subproject commit 0790c8f8c2df57d782176710d73795734d034111 +Subproject commit 7a7911895b106d17b0167d7740e5b3c2b7c54e89 diff --git a/telemeta/static/telemeta/css/search.css b/telemeta/static/telemeta/css/search.css index 2c69cdaa..3b81a62b 100644 --- a/telemeta/static/telemeta/css/search.css +++ b/telemeta/static/telemeta/css/search.css @@ -1,43 +1,56 @@ -.overflow{ - max-height:200px; +.overflow { + max-height: 200px; } .module ul, li { - border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; } -.ui-selectmenu-button.ui-widget.ui-state-default{ - background-image:none; - background-color:#6a0307; - border-color:#6a0307; - color:white; +.ui-selectmenu-button.ui-widget.ui-state-default { + background-image: none; + background-color: #6a0307; + border-color: #6a0307; + color: white; } -.ui-selectmenu-button.ui-widget.ui-state-hover{ - background-image:none; - background-color:#6a0307; - border-color:#6a0307; - color:white; +.ui-selectmenu-button.ui-widget.ui-state-hover { + background-image: none; + background-color: #6a0307; + border-color: #6a0307; + color: white; } -.ui-selectmenu-button.ui-widget.ui-state-focus{ - background-image:none; - background-color:#6a0307; - border-color:#6a0307; - color:white; +.ui-selectmenu-button.ui-widget.ui-state-focus { + background-image: none; + background-color: #6a0307; + border-color: #6a0307; + color: white; } -.ui-selectmenu-button.ui-widget.ui-state-default .ui-icon{ - background-image:url("images/ui-icons_ffffff_256x240.png"); +.ui-selectmenu-button.ui-widget.ui-state-default .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); } -.ui-menu-item{ - background-color:white; +.ui-menu-item { + background-color: white; } -.ui-menu-item.ui-state-focus{ - background-image:none; - background-color:#6a0307; - border-color:#6a0307; - color:white; +.ui-menu-item.ui-state-focus { + background-image: none; + background-color: #6a0307; + border-color: #6a0307; + color: white; } + +form p { + display: inline-block; +} + +.ui-front { + z-index: 1000; +} + +select[name*="startBracket"] { + text-align: right; +} + diff --git a/telemeta/static/telemeta/js/locale.js b/telemeta/static/telemeta/js/locale.js index 3f737535..28b62eee 100644 --- a/telemeta/static/telemeta/js/locale.js +++ b/telemeta/static/telemeta/js/locale.js @@ -14,6 +14,9 @@ var localeStrings = { 'delete the collection permanently?' : gettext('delete the collection permanently?'), 'delete the playlist permanently?' : gettext('delete the playlist permanently?'), 'delete the resource from the playlist permanently?' : gettext('delete the resource from the playlist permanently?'), + 'delete field' : gettext('delete field'), + 'final query' : gettext('final query'), + '(playlisted)' : gettext('(playlisted)'), }; function gettrans(str){ diff --git a/telemeta/templates/search/advanceSearch.html b/telemeta/templates/search/advanceSearch.html index 146536a3..6b553bc6 100644 --- a/telemeta/templates/search/advanceSearch.html +++ b/telemeta/templates/search/advanceSearch.html @@ -11,21 +11,6 @@ - {% endblock %} {% block content %}
@@ -55,7 +40,7 @@ {{form.instruments.errors}} {% trans form.instruments.label_tag %} {{form.instruments}} - Instruments : Recherche booléenne + {% trans "Instruments : Boolean Search" %}
@@ -271,8 +256,8 @@ {% endif %} {% endfor %} - Ajouter champ -
+ {% trans "Add field" %} +
@@ -387,7 +372,7 @@ $(function() { $('#dialog').dialog("open"); }); - var supprButton = 'Supprimer champ
'; + var supprButton = ''+gettrans('delete field')+'
'; var balise = $('#copy').clone(); $(balise).children().each(function () { @@ -437,7 +422,7 @@ $(function() { $("#dialog").dialog("close"); $('#id_instruments').val(donnees.result); } - $('#res').html("Requête formée :
"+donnees.result+''); + $('#res').html(gettrans('final query')+" :
"+gettrans(donnees.result)+''); }, }); }); diff --git a/telemeta/templates/telemeta/instrument_alias_edit.html b/telemeta/templates/telemeta/instrument_alias_edit.html index db8e4c2f..f10fcd91 100644 --- a/telemeta/templates/telemeta/instrument_alias_edit.html +++ b/telemeta/templates/telemeta/instrument_alias_edit.html @@ -27,7 +27,7 @@
{% csrf_token %} - + {% for record in instruments %} diff --git a/telemeta/templates/telemeta/instrument_edit.html b/telemeta/templates/telemeta/instrument_edit.html index 2c3d59f1..49fffe1f 100644 --- a/telemeta/templates/telemeta/instrument_edit.html +++ b/telemeta/templates/telemeta/instrument_edit.html @@ -27,7 +27,7 @@ {% csrf_token %}
 {% trans "Name"%}Nombre d'items associés
 {% trans "Name"%}{% trans "Associated items" %}
- + {% for record in instruments %} diff --git a/telemeta/templates/telemeta/mediaitem_detail.html b/telemeta/templates/telemeta/mediaitem_detail.html index 71e9e19c..1684a29a 100644 --- a/telemeta/templates/telemeta/mediaitem_detail.html +++ b/telemeta/templates/telemeta/mediaitem_detail.html @@ -62,7 +62,7 @@ {% if user.is_authenticated %} {% for playlist in playlists %} {% if forloop.counter0 in rang_item_playliste %} - playlistUtils.addPlaylist('{{ playlist.playlist.title }} (déjà listé)','{{playlist.playlist.public_id}}'); + playlistUtils.addPlaylist('{{ playlist.playlist.title }}'+ gettrans('(playlisted)'),'{{playlist.playlist.public_id}}'); {% else %} playlistUtils.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}'); {% endif %} diff --git a/telemeta/util/backend.py b/telemeta/util/backend.py index 04b29950..d969c1a2 100644 --- a/telemeta/util/backend.py +++ b/telemeta/util/backend.py @@ -25,7 +25,7 @@ class CustomElasticSearchQuery(ElasticsearchSearchQuery): def build_query_fragment(self, field, filter_type, value): if isinstance(value, bool): value = str(value) - if field !='code': + if not isinstance(value, int) and field !='code': value = re.sub(regexSpacePunc, " ", value) valeur = super(CustomElasticSearchQuery, self).build_query_fragment(field, filter_type, value) return valeur -- 2.39.5
 {% trans "Name"%}Nombre d'items associés
 {% trans "Name"%}{% trans "Associated items" %}