on master help sign in
Merge branch 'master' of github.com:asciimoo/searx
commitd6b1ff08ad2ad3af8ef50c3611a18c633a78249e authorAdam Tauber <asciimoo@gmail.com> dateFri 9 Jan 2015, 04:15 (12 years ago) parent299a80ae4681da
29 files changed+408−134
searx/engines/dailymotion.py+11−4 searx/engines/deezer.py+61 searx/engines/soundcloud.py+12−2 searx/engines/vimeo.py+17−7 searx/engines/youtube.py+11−2 searx/settings.yml+4 searx/static/themes/oscar/js/searx.min.js+2−2 searx/static/themes/oscar/js/searx_src/element_modifiers.js+12 searx/templates/oscar/result_templates/default.html+12 searx/templates/oscar/result_templates/videos.html+12 searx/translations/de/LC_MESSAGES/messages.mo searx/translations/de/LC_MESSAGES/messages.po+25−9 searx/translations/en/LC_MESSAGES/messages.mo searx/translations/en/LC_MESSAGES/messages.po+25−9 searx/translations/es/LC_MESSAGES/messages.mo searx/translations/es/LC_MESSAGES/messages.po+25−15 searx/translations/fr/LC_MESSAGES/messages.mo searx/translations/fr/LC_MESSAGES/messages.po+25−9 searx/translations/hu/LC_MESSAGES/messages.mo searx/translations/hu/LC_MESSAGES/messages.po+25−9 searx/translations/it/LC_MESSAGES/messages.mo searx/translations/it/LC_MESSAGES/messages.po+25−15 searx/translations/ja/LC_MESSAGES/messages.mo searx/translations/ja/LC_MESSAGES/messages.po+25−15 searx/translations/nl/LC_MESSAGES/messages.mo searx/translations/nl/LC_MESSAGES/messages.po+25−9 searx/translations/tr/LC_MESSAGES/messages.mo searx/translations/tr/LC_MESSAGES/messages.po+53−26 utils/update-translations.sh+1−1
searx/engines/dailymotion.py+11−4
@@ -6,12 +6,14 @@
66# @using-api yes
77# @results JSON
88# @stable yes
9−# @parse url, title, thumbnail
9+# @parse url, title, thumbnail, publishedDate, embedded
1010#
1111# @todo set content-parameter with correct data
1212
1313from urllib import urlencode
1414from json import loads
15+from cgi import escape
16+from datetime import datetime
1517
1618# engine dependent config
1719categories = ['videos']
@@ -20,7 +22,9 @@ language_support = True
2022
2123# search-url
2224# see http://www.dailymotion.com/doc/api/obj-video.html
23−search_url = 'https://api.dailymotion.com/videos?fields=title,description,duration,url,thumbnail_360_url&sort=relevance&limit=5&page={pageno}&{query}' # noqa
25+search_url = 'https://api.dailymotion.com/videos?fields=created_time,title,description,duration,url,thumbnail_360_url,id&sort=relevance&limit=5&page={pageno}&{query}' # noqa
26+embedded_url = '<iframe frameborder="0" width="540" height="304" ' +\
27+ 'data-src="//www.dailymotion.com/embed/video/{videoid}" allowfullscreen></iframe>'
2428
2529
2630# do search-request
@@ -51,14 +55,17 @@ def response(resp):
5155 for res in search_res['list']:
5256 title = res['title']
5357 url = res['url']
54− #content = res['description']
55− content = ''
58+ content = escape(res['description'])
5659 thumbnail = res['thumbnail_360_url']
60+ publishedDate = datetime.fromtimestamp(res['created_time'], None)
61+ embedded = embedded_url.format(videoid=res['id'])
5762
5863 results.append({'template': 'videos.html',
5964 'url': url,
6065 'title': title,
6166 'content': content,
67+ 'publishedDate': publishedDate,
68+ 'embedded': embedded,
6269 'thumbnail': thumbnail})
6370
6471 # return results
searx/engines/deezer.pynew file+61
@@ -0,0 +1,61 @@
1+## Deezer (Music)
2+#
3+# @website https://deezer.com
4+# @provide-api yes (http://developers.deezer.com/api/)
5+#
6+# @using-api yes
7+# @results JSON
8+# @stable yes
9+# @parse url, title, content, embedded
10+
11+from json import loads
12+from urllib import urlencode
13+
14+# engine dependent config
15+categories = ['music']
16+paging = True
17+
18+# search-url
19+url = 'http://api.deezer.com/'
20+search_url = url + 'search?{query}&index={offset}'
21+
22+embedded_url = '<iframe scrolling="no" frameborder="0" allowTransparency="true" ' +\
23+ 'data-src="http://www.deezer.com/plugins/player?type=tracks&id={audioid}" ' +\
24+ 'width="540" height="80"></iframe>'
25+
26+
27+# do search-request
28+def request(query, params):
29+ offset = (params['pageno'] - 1) * 25
30+
31+ params['url'] = search_url.format(query=urlencode({'q': query}),
32+ offset=offset)
33+
34+ return params
35+
36+
37+# get response from search-request
38+def response(resp):
39+ results = []
40+
41+ search_res = loads(resp.text)
42+
43+ # parse results
44+ for result in search_res.get('data', []):
45+ if result['type'] == 'track':
46+ title = result['title']
47+ url = result['link']
48+ content = result['artist']['name'] +\
49+ " &bull; " +\
50+ result['album']['title'] +\
51+ " &bull; " + result['title']
52+ embedded = embedded_url.format(audioid=result['id'])
53+
54+ # append result
55+ results.append({'url': url,
56+ 'title': title,
57+ 'embedded': embedded,
58+ 'content': content})
59+
60+ # return results
61+ return results
searx/engines/soundcloud.py+12−2
@@ -6,10 +6,11 @@
66# @using-api yes
77# @results JSON
88# @stable yes
9−# @parse url, title, content
9+# @parse url, title, content, publishedDate, embedded
1010
1111from json import loads
12−from urllib import urlencode
12+from urllib import urlencode, quote_plus
13+from dateutil import parser
1314
1415# engine dependent config
1516categories = ['music']
@@ -27,6 +28,10 @@ search_url = url + 'search?{query}'\
2728 '&linked_partitioning=1'\
2829 '&client_id={client_id}' # noqa
2930
31+embedded_url = '<iframe width="100%" height="166" ' +\
32+ 'scrolling="no" frameborder="no" ' +\
33+ 'data-src="https://w.soundcloud.com/player/?url={uri}"></iframe>'
34+
3035
3136# do search-request
3237def request(query, params):
@@ -50,10 +55,15 @@ def response(resp):
5055 if result['kind'] in ('track', 'playlist'):
5156 title = result['title']
5257 content = result['description']
58+ publishedDate = parser.parse(result['last_modified'])
59+ uri = quote_plus(result['uri'])
60+ embedded = embedded_url.format(uri=uri)
5361
5462 # append result
5563 results.append({'url': result['permalink_url'],
5664 'title': title,
65+ 'publishedDate': publishedDate,
66+ 'embedded': embedded,
5767 'content': content})
5868
5969 # return results
searx/engines/vimeo.py+17−7
@@ -1,4 +1,4 @@
1−## Vimeo (Videos)
1+# Vimeo (Videos)
22#
33# @website https://vimeo.com/
44# @provide-api yes (http://developer.vimeo.com/api),
@@ -7,15 +7,16 @@
77# @using-api no (TODO, rewrite to api)
88# @results HTML (using search portal)
99# @stable no (HTML can change)
10−# @parse url, title, publishedDate, thumbnail
10+# @parse url, title, publishedDate, thumbnail, embedded
1111#
1212# @todo rewrite to api
1313# @todo set content-parameter with correct data
1414
1515from urllib import urlencode
1616from lxml import html
17+from HTMLParser import HTMLParser
18+from searx.engines.xpath import extract_text
1719from dateutil import parser
18−from cgi import escape
1920
2021# engine dependent config
2122categories = ['videos']
@@ -32,6 +33,10 @@ title_xpath = './a/div[@class="data"]/p[@class="title"]'
3233content_xpath = './a/img/@src'
3334publishedDate_xpath = './/p[@class="meta"]//attribute::datetime'
3435
36+embedded_url = '<iframe data-src="//player.vimeo.com/video{videoid}" ' +\
37+ 'width="540" height="304" frameborder="0" ' +\
38+ 'webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
39+
3540
3641# do search-request
3742def request(query, params):
@@ -46,13 +51,17 @@ def response(resp):
4651 results = []
4752
4853 dom = html.fromstring(resp.text)
54+ p = HTMLParser()
4955
5056 # parse results
5157 for result in dom.xpath(results_xpath):
52− url = base_url + result.xpath(url_xpath)[0]
53− title = escape(html.tostring(result.xpath(title_xpath)[0], method='text', encoding='UTF-8').decode("utf-8"))
54− thumbnail = result.xpath(content_xpath)[0]
55− publishedDate = parser.parse(result.xpath(publishedDate_xpath)[0])
58+ videoid = result.xpath(url_xpath)[0]
59+ url = base_url + videoid
60+ title = p.unescape(extract_text(result.xpath(title_xpath)))
61+ thumbnail = extract_text(result.xpath(content_xpath)[0])
62+ publishedDate = parser.parse(extract_text(
63+ result.xpath(publishedDate_xpath)[0]))
64+ embedded = embedded_url.format(videoid=videoid)
5665
5766 # append result
5867 results.append({'url': url,
@@ -60,6 +69,7 @@ def response(resp):
6069 'content': '',
6170 'template': 'videos.html',
6271 'publishedDate': publishedDate,
72+ 'embedded': embedded,
6373 'thumbnail': thumbnail})
6474
6575 # return results
searx/engines/youtube.py+11−2
@@ -6,7 +6,7 @@
66# @using-api yes
77# @results JSON
88# @stable yes
9−# @parse url, title, content, publishedDate, thumbnail
9+# @parse url, title, content, publishedDate, thumbnail, embedded
1010
1111from json import loads
1212from urllib import urlencode
@@ -19,7 +19,11 @@ language_support = True
1919
2020# search-url
2121base_url = 'https://gdata.youtube.com/feeds/api/videos'
22−search_url = base_url + '?alt=json&{query}&start-index={index}&max-results=5' # noqa
22+search_url = base_url + '?alt=json&{query}&start-index={index}&max-results=5'
23+
24+embedded_url = '<iframe width="540" height="304" ' +\
25+ 'data-src="//www.youtube-nocookie.com/embed/{videoid}" ' +\
26+ 'frameborder="0" allowfullscreen></iframe>'
2327
2428
2529# do search-request
@@ -60,6 +64,8 @@ def response(resp):
6064 if url.endswith('&'):
6165 url = url[:-1]
6266
67+ videoid = url[32:]
68+
6369 title = result['title']['$t']
6470 content = ''
6571 thumbnail = ''
@@ -72,12 +78,15 @@ def response(resp):
7278
7379 content = result['content']['$t']
7480
81+ embedded = embedded_url.format(videoid=videoid)
82+
7583 # append result
7684 results.append({'url': url,
7785 'title': title,
7886 'content': content,
7987 'template': 'videos.html',
8088 'publishedDate': publishedDate,
89+ 'embedded': embedded,
8190 'thumbnail': thumbnail})
8291
8392 # return results
searx/settings.yml+4
@@ -35,6 +35,10 @@ engines:
3535 engine : currency_convert
3636 categories : general
3737 shortcut : cc
38+
39+ - name : deezer
40+ engine : deezer
41+ shortcut : dz
3842
3943 - name : deviantart
4044 engine : deviantart
searx/static/themes/oscar/js/searx.min.js+2−2
@@ -1,2 +1,2 @@
1−/*! oscar/searx.min.js | 19-12-2014 | https://github.com/asciimoo/searx */
2−requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"/autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){searx.autocompleter&&$("#q").typeahead(null,{name:"search-results",displayKey:function(a){return a},source:searx.searchResults.ttAdapter()})}),$(document).ready(function(){$("#q.autofocus").focus(),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var a=$(this).data("btn-text-collapsed"),b=$(this).data("btn-text-not-collapsed");""!==a&&""!==b&&(new_html=$(this).hasClass("collapsed")?$(this).html().replace(a,b):$(this).html().replace(b,a),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var a="btn-"+$(this).data("btn-class"),b=$(this).data("btn-label-default"),c=$(this).data("btn-label-toggled");""!==c&&(new_html=$(this).hasClass("btn-default")?$(this).html().replace(b,c):$(this).html().replace(c,b),$(this).html(new_html)),$(this).toggleClass(a),$(this).toggleClass("btn-default")}),$(".btn-sm").dblclick(function(){var a="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(a),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(a),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(a){var b="https://overpass-api.de/api/interpreter?data=",c=b+"[out:json][timeout:25];(",d=");out meta;",e=$(this).data("osm-id"),f=$(this).data("osm-type"),g=$(this).data("result-table"),h="#"+$(this).data("result-table-loadicon"),i=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(e&&f&&g){g="#"+g;var j=null;switch(f){case"node":j=c+"node("+e+");"+d;break;case"way":j=c+"way("+e+");"+d;break;case"relation":j=c+"relation("+e+");"+d}if(j){$.ajax(j).done(function(a){if(a&&a.elements&&a.elements[0]){var b=a.elements[0],c=$(g).html();for(var d in b.tags)if(null===b.tags.name||-1==i.indexOf(d)){switch(c+="<tr><td>"+d+"</td><td>",d){case"phone":case"fax":c+='<a href="tel:'+b.tags[d].replace(/ /g,"")+'">'+b.tags[d]+"</a>";break;case"email":c+='<a href="mailto:'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"website":case"url":c+='<a href="'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikidata":c+='<a href="https://www.wikidata.org/wiki/'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikipedia":if(-1!=b.tags[d].indexOf(":")){c+='<a href="https://'+b.tags[d].substring(0,b.tags[d].indexOf(":"))+".wikipedia.org/wiki/"+b.tags[d].substring(b.tags[d].indexOf(":")+1)+'">'+b.tags[d]+"</a>";break}default:c+=b.tags[d]}c+="</td></tr>"}$(g).html(c),$(g).removeClass("hidden"),$(h).addClass("hidden")}}).fail(function(){$(h).html($(h).html()+'<p class="text-muted">could not load data!</p>')})}}$(this).off(a)}),$(".searx_init_map").on("click",function(a){var b=$(this).data("leaflet-target"),c=$(this).data("map-lon"),d=$(this).data("map-lat"),e=$(this).data("map-zoom"),f=$(this).data("map-boundingbox"),g=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(){f&&(southWest=L.latLng(f[0],f[2]),northEast=L.latLng(f[1],f[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/oscar/img/map";{var a=L.map(b),h="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",i='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',j=new L.TileLayer(h,{minZoom:1,maxZoom:19,attribution:i}),k="http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg",l='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors | Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">',m=new L.TileLayer(k,{minZoom:1,maxZoom:18,subdomains:"1234",attribution:l}),n="http://otile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg",o='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors | Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png"> | Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency';new L.TileLayer(n,{minZoom:1,maxZoom:11,subdomains:"1234",attribution:o})}map_bounds?setTimeout(function(){a.fitBounds(map_bounds,{maxZoom:17})},0):c&&d&&(e?a.setView(new L.LatLng(d,c),e):a.setView(new L.LatLng(d,c),8)),a.addLayer(m);var p={"OSM Mapnik":j,MapQuest:m};L.control.layers(p).addTo(a),g&&L.geoJson(g).addTo(a)}),$(this).off(a)})});
1+/*! oscar/searx.min.js | 05-01-2015 | https://github.com/asciimoo/searx */
2+requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"/autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){searx.autocompleter&&$("#q").typeahead(null,{name:"search-results",displayKey:function(a){return a},source:searx.searchResults.ttAdapter()})}),$(document).ready(function(){$("#q.autofocus").focus(),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var a=$(this).data("btn-text-collapsed"),b=$(this).data("btn-text-not-collapsed");""!==a&&""!==b&&(new_html=$(this).hasClass("collapsed")?$(this).html().replace(a,b):$(this).html().replace(b,a),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var a="btn-"+$(this).data("btn-class"),b=$(this).data("btn-label-default"),c=$(this).data("btn-label-toggled");""!==c&&(new_html=$(this).hasClass("btn-default")?$(this).html().replace(b,c):$(this).html().replace(c,b),$(this).html(new_html)),$(this).toggleClass(a),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var a=$(this).data("target"),b=$(a+" > iframe"),c=b.attr("src");(void 0===c||c===!1)&&b.attr("src",b.data("src"))}),$(".btn-sm").dblclick(function(){var a="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(a),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(a),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(a){var b="https://overpass-api.de/api/interpreter?data=",c=b+"[out:json][timeout:25];(",d=");out meta;",e=$(this).data("osm-id"),f=$(this).data("osm-type"),g=$(this).data("result-table"),h="#"+$(this).data("result-table-loadicon"),i=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(e&&f&&g){g="#"+g;var j=null;switch(f){case"node":j=c+"node("+e+");"+d;break;case"way":j=c+"way("+e+");"+d;break;case"relation":j=c+"relation("+e+");"+d}if(j){$.ajax(j).done(function(a){if(a&&a.elements&&a.elements[0]){var b=a.elements[0],c=$(g).html();for(var d in b.tags)if(null===b.tags.name||-1==i.indexOf(d)){switch(c+="<tr><td>"+d+"</td><td>",d){case"phone":case"fax":c+='<a href="tel:'+b.tags[d].replace(/ /g,"")+'">'+b.tags[d]+"</a>";break;case"email":c+='<a href="mailto:'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"website":case"url":c+='<a href="'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikidata":c+='<a href="https://www.wikidata.org/wiki/'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikipedia":if(-1!=b.tags[d].indexOf(":")){c+='<a href="https://'+b.tags[d].substring(0,b.tags[d].indexOf(":"))+".wikipedia.org/wiki/"+b.tags[d].substring(b.tags[d].indexOf(":")+1)+'">'+b.tags[d]+"</a>";break}default:c+=b.tags[d]}c+="</td></tr>"}$(g).html(c),$(g).removeClass("hidden"),$(h).addClass("hidden")}}).fail(function(){$(h).html($(h).html()+'<p class="text-muted">could not load data!</p>')})}}$(this).off(a)}),$(".searx_init_map").on("click",function(a){var b=$(this).data("leaflet-target"),c=$(this).data("map-lon"),d=$(this).data("map-lat"),e=$(this).data("map-zoom"),f=$(this).data("map-boundingbox"),g=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(){f&&(southWest=L.latLng(f[0],f[2]),northEast=L.latLng(f[1],f[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";{var a=L.map(b),h="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",i='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',j=new L.TileLayer(h,{minZoom:1,maxZoom:19,attribution:i}),k="http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg",l='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors | Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">',m=new L.TileLayer(k,{minZoom:1,maxZoom:18,subdomains:"1234",attribution:l}),n="http://otile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg",o='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors | Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png"> | Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency';new L.TileLayer(n,{minZoom:1,maxZoom:11,subdomains:"1234",attribution:o})}map_bounds?setTimeout(function(){a.fitBounds(map_bounds,{maxZoom:17})},0):c&&d&&(e?a.setView(new L.LatLng(d,c),e):a.setView(new L.LatLng(d,c),8)),a.addLayer(m);var p={"OSM Mapnik":j,MapQuest:m};L.control.layers(p).addTo(a),g&&L.geoJson(g).addTo(a)}),$(this).off(a)})});
searx/static/themes/oscar/js/searx_src/element_modifiers.js+12
@@ -63,6 +63,18 @@ $(document).ready(function(){
6363 $(this).toggleClass(btnClass);
6464 $(this).toggleClass('btn-default');
6565 });
66+
67+ /**
68+ * change text during btn-toggle click if possible
69+ */
70+ $('.media-loader').click(function() {
71+ var target = $(this).data('target');
72+ var iframe_load = $(target + ' > iframe');
73+ var srctest = iframe_load.attr('src');
74+ if(srctest === undefined || srctest === false){
75+ iframe_load.attr('src', iframe_load.data('src'));
76+ }
77+ });
6678
6779 /**
6880 * Select or deselect every categories on double clic
searx/templates/oscar/result_templates/default.html+12
@@ -5,6 +5,18 @@
55{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
66<small><a class="text-info" href="https://web.archive.org/web/{{ result.url }}">{{ icon('link') }} {{ _('cached') }}</a></small>
77
8+{% if result.embedded %}
9+ <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader" data-toggle="collapse" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music') }} {{ _('show media') }}</a></small>
10+{% endif %}
11+
12+{% if result.embedded %}
13+<div id="result-media-{{ index }}" class="collapse">
14+{% autoescape false %}
15+ {{ result.embedded }}
16+{% endautoescape %}
17+</div>
18+{% endif %}
19+
820{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
921
1022<div class="clearfix"></div>
searx/templates/oscar/result_templates/videos.html+12
@@ -5,6 +5,18 @@
55{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
66<small><a class="text-info" href="https://web.archive.org/web/{{ result.url }}">{{ icon('link') }} {{ _('cached') }}</a></small>
77
8+{% if result.embedded %}
9+ <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader" data-toggle="collapse" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film') }} {{ _('show video') }}</a></small>
10+{% endif %}
11+
12+{% if result.embedded %}
13+<div id="result-video-{{ index }}" class="collapse">
14+{% autoescape false %}
15+ {{ result.embedded }}
16+{% endautoescape %}
17+</div>
18+{% endif %}
19+
820<div class="container-fluid">
921 <div class="row">
1022 <a href="{{ result.url }}"><img class="thumbnail col-xs-6 col-sm-4 col-md-4 result-content" src="{{ result.thumbnail|safe }}" alt="{{ result.title|striptags }} {{ result.engine }}" /></a>
searx/translations/de/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/de/LC_MESSAGES/messages.po+25−9
@@ -10,7 +10,7 @@ msgid ""
1010msgstr ""
1111"Project-Id-Version: searx\n"
1212"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
13−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
13+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1414"PO-Revision-Date: 2014-12-27 10:30+0000\n"
1515"Last-Translator: pointhi\n"
1616"Language-Team: German "
@@ -21,11 +21,11 @@ msgstr ""
2121"Content-Transfer-Encoding: 8bit\n"
2222"Generated-By: Babel 1.3\n"
2323
24−#: searx/webapp.py:247
24+#: searx/webapp.py:263
2525msgid "{minutes} minute(s) ago"
2626msgstr "vor {minutes} Minute(n)"
2727
28−#: searx/webapp.py:249
28+#: searx/webapp.py:265
2929msgid "{hours} hour(s), {minutes} minute(s) ago"
3030msgstr "vor {hours} Stunde(n), {minutes} Minute(n)"
3131
@@ -173,31 +173,31 @@ msgstr "Zurück"
173173
174174#: searx/templates/courgette/results.html:12
175175#: searx/templates/default/results.html:12
176−#: searx/templates/oscar/results.html:83
176+#: searx/templates/oscar/results.html:87
177177msgid "Search URL"
178178msgstr "Such-URL"
179179
180180#: searx/templates/courgette/results.html:16
181181#: searx/templates/default/results.html:16
182−#: searx/templates/oscar/results.html:88
182+#: searx/templates/oscar/results.html:92
183183msgid "Download results"
184184msgstr "Ergebnisse herunterladen"
185185
186186#: searx/templates/courgette/results.html:34
187187#: searx/templates/default/results.html:42
188−#: searx/templates/oscar/results.html:63
188+#: searx/templates/oscar/results.html:67
189189msgid "Suggestions"
190190msgstr "Vorschläge"
191191
192192#: searx/templates/courgette/results.html:62
193193#: searx/templates/default/results.html:78
194−#: searx/templates/oscar/results.html:37
194+#: searx/templates/oscar/results.html:41
195195msgid "previous page"
196196msgstr "vorherige Seite"
197197
198198#: searx/templates/courgette/results.html:73
199199#: searx/templates/default/results.html:89
200−#: searx/templates/oscar/results.html:45
200+#: searx/templates/oscar/results.html:49
201201msgid "next page"
202202msgstr "nächste Seite"
203203
@@ -276,7 +276,7 @@ msgstr "ändere das Aussehen von searx"
276276msgid "Search results"
277277msgstr "Suchergebnisse"
278278
279−#: searx/templates/oscar/results.html:78
279+#: searx/templates/oscar/results.html:82
280280msgid "Links"
281281msgstr "Links"
282282
@@ -360,6 +360,14 @@ msgstr "Irgendetwas ist falsch gelaufen."
360360msgid "cached"
361361msgstr "Im Cache"
362362
363+#: searx/templates/oscar/result_templates/default.html:9
364+msgid "show media"
365+msgstr ""
366+
367+#: searx/templates/oscar/result_templates/default.html:9
368+msgid "hide media"
369+msgstr ""
370+
363371#: searx/templates/oscar/result_templates/images.html:21
364372msgid "Get image"
365373msgstr "Bild ansehen"
@@ -392,6 +400,14 @@ msgstr "Seeder"
392400msgid "Leecher"
393401msgstr "Leecher"
394402
403+#: searx/templates/oscar/result_templates/videos.html:9
404+msgid "show video"
405+msgstr ""
406+
407+#: searx/templates/oscar/result_templates/videos.html:9
408+msgid "hide video"
409+msgstr ""
410+
395411msgid "Localization"
396412msgstr "Übersetzung"
397413
searx/translations/en/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/en/LC_MESSAGES/messages.po+25−9
@@ -7,7 +7,7 @@ msgid ""
77msgstr ""
88"Project-Id-Version: PROJECT VERSION\n"
99"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
10+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1111"PO-Revision-Date: 2014-01-30 15:22+0100\n"
1212"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313"Language-Team: en <LL@li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
1717"Content-Transfer-Encoding: 8bit\n"
1818"Generated-By: Babel 1.3\n"
1919
20−#: searx/webapp.py:247
20+#: searx/webapp.py:263
2121msgid "{minutes} minute(s) ago"
2222msgstr ""
2323
24−#: searx/webapp.py:249
24+#: searx/webapp.py:265
2525msgid "{hours} hour(s), {minutes} minute(s) ago"
2626msgstr ""
2727
@@ -165,31 +165,31 @@ msgstr ""
165165
166166#: searx/templates/courgette/results.html:12
167167#: searx/templates/default/results.html:12
168−#: searx/templates/oscar/results.html:83
168+#: searx/templates/oscar/results.html:87
169169msgid "Search URL"
170170msgstr ""
171171
172172#: searx/templates/courgette/results.html:16
173173#: searx/templates/default/results.html:16
174−#: searx/templates/oscar/results.html:88
174+#: searx/templates/oscar/results.html:92
175175msgid "Download results"
176176msgstr ""
177177
178178#: searx/templates/courgette/results.html:34
179179#: searx/templates/default/results.html:42
180−#: searx/templates/oscar/results.html:63
180+#: searx/templates/oscar/results.html:67
181181msgid "Suggestions"
182182msgstr ""
183183
184184#: searx/templates/courgette/results.html:62
185185#: searx/templates/default/results.html:78
186−#: searx/templates/oscar/results.html:37
186+#: searx/templates/oscar/results.html:41
187187msgid "previous page"
188188msgstr ""
189189
190190#: searx/templates/courgette/results.html:73
191191#: searx/templates/default/results.html:89
192−#: searx/templates/oscar/results.html:45
192+#: searx/templates/oscar/results.html:49
193193msgid "next page"
194194msgstr ""
195195
@@ -265,7 +265,7 @@ msgstr ""
265265msgid "Search results"
266266msgstr ""
267267
268−#: searx/templates/oscar/results.html:78
268+#: searx/templates/oscar/results.html:82
269269msgid "Links"
270270msgstr ""
271271
@@ -346,6 +346,14 @@ msgstr ""
346346msgid "cached"
347347msgstr ""
348348
349+#: searx/templates/oscar/result_templates/default.html:9
350+msgid "show media"
351+msgstr ""
352+
353+#: searx/templates/oscar/result_templates/default.html:9
354+msgid "hide media"
355+msgstr ""
356+
349357#: searx/templates/oscar/result_templates/images.html:21
350358msgid "Get image"
351359msgstr ""
@@ -378,6 +386,14 @@ msgstr ""
378386msgid "Leecher"
379387msgstr ""
380388
389+#: searx/templates/oscar/result_templates/videos.html:9
390+msgid "show video"
391+msgstr ""
392+
393+#: searx/templates/oscar/result_templates/videos.html:9
394+msgid "hide video"
395+msgstr ""
396+
381397msgid "Localization"
382398msgstr ""
383399
searx/translations/es/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/es/LC_MESSAGES/messages.po+25−15
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: searx\n"
1010"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
11+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1212"PO-Revision-Date: 2014-11-26 20:38+0000\n"
1313"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
1414"Language-Team: Spanish "
@@ -19,11 +19,11 @@ msgstr ""
1919"Content-Transfer-Encoding: 8bit\n"
2020"Generated-By: Babel 1.3\n"
2121
22−#: searx/webapp.py:247
22+#: searx/webapp.py:263
2323msgid "{minutes} minute(s) ago"
2424msgstr "hace {minutes} minuto(s)"
2525
26−#: searx/webapp.py:249
26+#: searx/webapp.py:265
2727msgid "{hours} hour(s), {minutes} minute(s) ago"
2828msgstr "hace {hours} hora(s) y {minutes} minuto(s)"
2929
@@ -171,31 +171,31 @@ msgstr "Atrás"
171171
172172#: searx/templates/courgette/results.html:12
173173#: searx/templates/default/results.html:12
174−#: searx/templates/oscar/results.html:83
174+#: searx/templates/oscar/results.html:87
175175msgid "Search URL"
176176msgstr "Buscar URL"
177177
178178#: searx/templates/courgette/results.html:16
179179#: searx/templates/default/results.html:16
180−#: searx/templates/oscar/results.html:88
180+#: searx/templates/oscar/results.html:92
181181msgid "Download results"
182182msgstr "Descargar resultados"
183183
184184#: searx/templates/courgette/results.html:34
185185#: searx/templates/default/results.html:42
186−#: searx/templates/oscar/results.html:63
186+#: searx/templates/oscar/results.html:67
187187msgid "Suggestions"
188188msgstr "Sugerencias"
189189
190190#: searx/templates/courgette/results.html:62
191191#: searx/templates/default/results.html:78
192−#: searx/templates/oscar/results.html:37
192+#: searx/templates/oscar/results.html:41
193193msgid "previous page"
194194msgstr "Página anterior"
195195
196196#: searx/templates/courgette/results.html:73
197197#: searx/templates/default/results.html:89
198−#: searx/templates/oscar/results.html:45
198+#: searx/templates/oscar/results.html:49
199199msgid "next page"
200200msgstr "Página siguiente"
201201
@@ -271,7 +271,7 @@ msgstr ""
271271msgid "Search results"
272272msgstr ""
273273
274−#: searx/templates/oscar/results.html:78
274+#: searx/templates/oscar/results.html:82
275275msgid "Links"
276276msgstr ""
277277
@@ -352,6 +352,14 @@ msgstr ""
352352msgid "cached"
353353msgstr ""
354354
355+#: searx/templates/oscar/result_templates/default.html:9
356+msgid "show media"
357+msgstr ""
358+
359+#: searx/templates/oscar/result_templates/default.html:9
360+msgid "hide media"
361+msgstr ""
362+
355363#: searx/templates/oscar/result_templates/images.html:21
356364msgid "Get image"
357365msgstr ""
@@ -384,6 +392,14 @@ msgstr ""
384392msgid "Leecher"
385393msgstr ""
386394
395+#: searx/templates/oscar/result_templates/videos.html:9
396+msgid "show video"
397+msgstr ""
398+
399+#: searx/templates/oscar/result_templates/videos.html:9
400+msgid "hide video"
401+msgstr ""
402+
387403msgid "Localization"
388404msgstr ""
389405
@@ -404,15 +420,9 @@ msgstr "General"
404420msgid "music"
405421msgstr "Música"
406422
407−msgid "social media"
408−msgstr "Medios sociales"
409−
410423msgid "images"
411424msgstr "Imágenes"
412425
413−msgid "videos"
414−msgstr "Vídeos"
415−
416426msgid "it"
417427msgstr "TIC"
418428
searx/translations/fr/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/fr/LC_MESSAGES/messages.po+25−9
@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version: searx\n"
1313"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
14−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
14+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1515"PO-Revision-Date: 2014-12-14 21:00+0000\n"
1616"Last-Translator: Cqoicebordel <david.barouh@wanadoo.fr>\n"
1717"Language-Team: French "
@@ -22,11 +22,11 @@ msgstr ""
2222"Content-Transfer-Encoding: 8bit\n"
2323"Generated-By: Babel 1.3\n"
2424
25−#: searx/webapp.py:247
25+#: searx/webapp.py:263
2626msgid "{minutes} minute(s) ago"
2727msgstr "il y a {minutes} minute(s)"
2828
29−#: searx/webapp.py:249
29+#: searx/webapp.py:265
3030msgid "{hours} hour(s), {minutes} minute(s) ago"
3131msgstr "il y a {hours} heure(s), {minutes} minute(s)"
3232
@@ -174,31 +174,31 @@ msgstr "retour"
174174
175175#: searx/templates/courgette/results.html:12
176176#: searx/templates/default/results.html:12
177−#: searx/templates/oscar/results.html:83
177+#: searx/templates/oscar/results.html:87
178178msgid "Search URL"
179179msgstr "URL de recherche"
180180
181181#: searx/templates/courgette/results.html:16
182182#: searx/templates/default/results.html:16
183−#: searx/templates/oscar/results.html:88
183+#: searx/templates/oscar/results.html:92
184184msgid "Download results"
185185msgstr "Télécharger les résultats"
186186
187187#: searx/templates/courgette/results.html:34
188188#: searx/templates/default/results.html:42
189−#: searx/templates/oscar/results.html:63
189+#: searx/templates/oscar/results.html:67
190190msgid "Suggestions"
191191msgstr "Suggestions"
192192
193193#: searx/templates/courgette/results.html:62
194194#: searx/templates/default/results.html:78
195−#: searx/templates/oscar/results.html:37
195+#: searx/templates/oscar/results.html:41
196196msgid "previous page"
197197msgstr "page précédente"
198198
199199#: searx/templates/courgette/results.html:73
200200#: searx/templates/default/results.html:89
201−#: searx/templates/oscar/results.html:45
201+#: searx/templates/oscar/results.html:49
202202msgid "next page"
203203msgstr "page suivante"
204204
@@ -277,7 +277,7 @@ msgstr "Modifier l'affichage de searx"
277277msgid "Search results"
278278msgstr "Résultats de recherche"
279279
280−#: searx/templates/oscar/results.html:78
280+#: searx/templates/oscar/results.html:82
281281msgid "Links"
282282msgstr "Liens"
283283
@@ -362,6 +362,14 @@ msgstr "Il y a un problème."
362362msgid "cached"
363363msgstr "en cache"
364364
365+#: searx/templates/oscar/result_templates/default.html:9
366+msgid "show media"
367+msgstr "afficher le média"
368+
369+#: searx/templates/oscar/result_templates/default.html:9
370+msgid "hide media"
371+msgstr "cacher le media"
372+
365373#: searx/templates/oscar/result_templates/images.html:21
366374msgid "Get image"
367375msgstr "Voir l'image"
@@ -394,6 +402,14 @@ msgstr "Sources"
394402msgid "Leecher"
395403msgstr "Téléchargeurs"
396404
405+#: searx/templates/oscar/result_templates/videos.html:9
406+msgid "show video"
407+msgstr "afficher la vidéo"
408+
409+#: searx/templates/oscar/result_templates/videos.html:9
410+msgid "hide video"
411+msgstr "cacher la vidéo"
412+
397413msgid "Localization"
398414msgstr "Localisation"
399415
searx/translations/hu/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/hu/LC_MESSAGES/messages.po+25−9
@@ -9,7 +9,7 @@ msgid ""
99msgstr ""
1010"Project-Id-Version: searx\n"
1111"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
12−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
12+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1313"PO-Revision-Date: 2014-12-22 16:11+0000\n"
1414"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
1515"Language-Team: Hungarian "
@@ -20,11 +20,11 @@ msgstr ""
2020"Content-Transfer-Encoding: 8bit\n"
2121"Generated-By: Babel 1.3\n"
2222
23−#: searx/webapp.py:247
23+#: searx/webapp.py:263
2424msgid "{minutes} minute(s) ago"
2525msgstr "{minutes} perce"
2626
27−#: searx/webapp.py:249
27+#: searx/webapp.py:265
2828msgid "{hours} hour(s), {minutes} minute(s) ago"
2929msgstr "{hours} óra, {minutes} perce"
3030
@@ -170,31 +170,31 @@ msgstr "vissza"
170170
171171#: searx/templates/courgette/results.html:12
172172#: searx/templates/default/results.html:12
173−#: searx/templates/oscar/results.html:83
173+#: searx/templates/oscar/results.html:87
174174msgid "Search URL"
175175msgstr "Keresési URL"
176176
177177#: searx/templates/courgette/results.html:16
178178#: searx/templates/default/results.html:16
179−#: searx/templates/oscar/results.html:88
179+#: searx/templates/oscar/results.html:92
180180msgid "Download results"
181181msgstr "Találatok letöltése"
182182
183183#: searx/templates/courgette/results.html:34
184184#: searx/templates/default/results.html:42
185−#: searx/templates/oscar/results.html:63
185+#: searx/templates/oscar/results.html:67
186186msgid "Suggestions"
187187msgstr "Javaslatok"
188188
189189#: searx/templates/courgette/results.html:62
190190#: searx/templates/default/results.html:78
191−#: searx/templates/oscar/results.html:37
191+#: searx/templates/oscar/results.html:41
192192msgid "previous page"
193193msgstr "előző oldal"
194194
195195#: searx/templates/courgette/results.html:73
196196#: searx/templates/default/results.html:89
197−#: searx/templates/oscar/results.html:45
197+#: searx/templates/oscar/results.html:49
198198msgid "next page"
199199msgstr "következő oldal"
200200
@@ -273,7 +273,7 @@ msgstr "Megjelenés"
273273msgid "Search results"
274274msgstr "Keresési eredmények"
275275
276−#: searx/templates/oscar/results.html:78
276+#: searx/templates/oscar/results.html:82
277277msgid "Links"
278278msgstr "Linkek"
279279
@@ -354,6 +354,14 @@ msgstr "Hiba történt"
354354msgid "cached"
355355msgstr "tárolt"
356356
357+#: searx/templates/oscar/result_templates/default.html:9
358+msgid "show media"
359+msgstr ""
360+
361+#: searx/templates/oscar/result_templates/default.html:9
362+msgid "hide media"
363+msgstr ""
364+
357365#: searx/templates/oscar/result_templates/images.html:21
358366msgid "Get image"
359367msgstr "Kép megjelenítése"
@@ -386,6 +394,14 @@ msgstr "Seeder"
386394msgid "Leecher"
387395msgstr "Leecher"
388396
397+#: searx/templates/oscar/result_templates/videos.html:9
398+msgid "show video"
399+msgstr ""
400+
401+#: searx/templates/oscar/result_templates/videos.html:9
402+msgid "hide video"
403+msgstr ""
404+
389405msgid "Localization"
390406msgstr "Nyelv"
391407
searx/translations/it/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/it/LC_MESSAGES/messages.po+25−15
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: searx\n"
1010"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
11+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1212"PO-Revision-Date: 2014-11-26 20:38+0000\n"
1313"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
1414"Language-Team: Italian "
@@ -19,11 +19,11 @@ msgstr ""
1919"Content-Transfer-Encoding: 8bit\n"
2020"Generated-By: Babel 1.3\n"
2121
22−#: searx/webapp.py:247
22+#: searx/webapp.py:263
2323msgid "{minutes} minute(s) ago"
2424msgstr "di {minutes} minuti fa"
2525
26−#: searx/webapp.py:249
26+#: searx/webapp.py:265
2727msgid "{hours} hour(s), {minutes} minute(s) ago"
2828msgstr "di {ore} h e {minutes} minuti fa"
2929
@@ -171,31 +171,31 @@ msgstr "indietro"
171171
172172#: searx/templates/courgette/results.html:12
173173#: searx/templates/default/results.html:12
174−#: searx/templates/oscar/results.html:83
174+#: searx/templates/oscar/results.html:87
175175msgid "Search URL"
176176msgstr "URL della ricerca"
177177
178178#: searx/templates/courgette/results.html:16
179179#: searx/templates/default/results.html:16
180−#: searx/templates/oscar/results.html:88
180+#: searx/templates/oscar/results.html:92
181181msgid "Download results"
182182msgstr "Scarica i risultati"
183183
184184#: searx/templates/courgette/results.html:34
185185#: searx/templates/default/results.html:42
186−#: searx/templates/oscar/results.html:63
186+#: searx/templates/oscar/results.html:67
187187msgid "Suggestions"
188188msgstr "Suggerimenti"
189189
190190#: searx/templates/courgette/results.html:62
191191#: searx/templates/default/results.html:78
192−#: searx/templates/oscar/results.html:37
192+#: searx/templates/oscar/results.html:41
193193msgid "previous page"
194194msgstr "pagina precedente"
195195
196196#: searx/templates/courgette/results.html:73
197197#: searx/templates/default/results.html:89
198−#: searx/templates/oscar/results.html:45
198+#: searx/templates/oscar/results.html:49
199199msgid "next page"
200200msgstr "pagina successiva"
201201
@@ -271,7 +271,7 @@ msgstr ""
271271msgid "Search results"
272272msgstr ""
273273
274−#: searx/templates/oscar/results.html:78
274+#: searx/templates/oscar/results.html:82
275275msgid "Links"
276276msgstr ""
277277
@@ -352,6 +352,14 @@ msgstr ""
352352msgid "cached"
353353msgstr ""
354354
355+#: searx/templates/oscar/result_templates/default.html:9
356+msgid "show media"
357+msgstr ""
358+
359+#: searx/templates/oscar/result_templates/default.html:9
360+msgid "hide media"
361+msgstr ""
362+
355363#: searx/templates/oscar/result_templates/images.html:21
356364msgid "Get image"
357365msgstr ""
@@ -384,6 +392,14 @@ msgstr ""
384392msgid "Leecher"
385393msgstr ""
386394
395+#: searx/templates/oscar/result_templates/videos.html:9
396+msgid "show video"
397+msgstr ""
398+
399+#: searx/templates/oscar/result_templates/videos.html:9
400+msgid "hide video"
401+msgstr ""
402+
387403msgid "Localization"
388404msgstr ""
389405
@@ -404,15 +420,9 @@ msgstr "generale"
404420msgid "music"
405421msgstr "musica"
406422
407−msgid "social media"
408−msgstr "social media"
409−
410423msgid "images"
411424msgstr "immagini"
412425
413−msgid "videos"
414−msgstr "video"
415−
416426msgid "it"
417427msgstr "it"
418428
searx/translations/ja/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/ja/LC_MESSAGES/messages.po+25−15
@@ -9,7 +9,7 @@ msgid ""
99msgstr ""
1010"Project-Id-Version: searx\n"
1111"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
12−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
12+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1313"PO-Revision-Date: 2014-11-26 20:38+0000\n"
1414"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
1515"Language-Team: Japanese "
@@ -20,11 +20,11 @@ msgstr ""
2020"Content-Transfer-Encoding: 8bit\n"
2121"Generated-By: Babel 1.3\n"
2222
23−#: searx/webapp.py:247
23+#: searx/webapp.py:263
2424msgid "{minutes} minute(s) ago"
2525msgstr "{minutes}分前"
2626
27−#: searx/webapp.py:249
27+#: searx/webapp.py:265
2828msgid "{hours} hour(s), {minutes} minute(s) ago"
2929msgstr "{hours}時間と{minutes}分前"
3030
@@ -168,31 +168,31 @@ msgstr "バック"
168168
169169#: searx/templates/courgette/results.html:12
170170#: searx/templates/default/results.html:12
171−#: searx/templates/oscar/results.html:83
171+#: searx/templates/oscar/results.html:87
172172msgid "Search URL"
173173msgstr ""
174174
175175#: searx/templates/courgette/results.html:16
176176#: searx/templates/default/results.html:16
177−#: searx/templates/oscar/results.html:88
177+#: searx/templates/oscar/results.html:92
178178msgid "Download results"
179179msgstr "ダウンロードの結果"
180180
181181#: searx/templates/courgette/results.html:34
182182#: searx/templates/default/results.html:42
183−#: searx/templates/oscar/results.html:63
183+#: searx/templates/oscar/results.html:67
184184msgid "Suggestions"
185185msgstr "提案"
186186
187187#: searx/templates/courgette/results.html:62
188188#: searx/templates/default/results.html:78
189−#: searx/templates/oscar/results.html:37
189+#: searx/templates/oscar/results.html:41
190190msgid "previous page"
191191msgstr "前のページ"
192192
193193#: searx/templates/courgette/results.html:73
194194#: searx/templates/default/results.html:89
195−#: searx/templates/oscar/results.html:45
195+#: searx/templates/oscar/results.html:49
196196msgid "next page"
197197msgstr "次のページ"
198198
@@ -268,7 +268,7 @@ msgstr ""
268268msgid "Search results"
269269msgstr ""
270270
271−#: searx/templates/oscar/results.html:78
271+#: searx/templates/oscar/results.html:82
272272msgid "Links"
273273msgstr ""
274274
@@ -349,6 +349,14 @@ msgstr ""
349349msgid "cached"
350350msgstr ""
351351
352+#: searx/templates/oscar/result_templates/default.html:9
353+msgid "show media"
354+msgstr ""
355+
356+#: searx/templates/oscar/result_templates/default.html:9
357+msgid "hide media"
358+msgstr ""
359+
352360#: searx/templates/oscar/result_templates/images.html:21
353361msgid "Get image"
354362msgstr ""
@@ -381,6 +389,14 @@ msgstr ""
381389msgid "Leecher"
382390msgstr ""
383391
392+#: searx/templates/oscar/result_templates/videos.html:9
393+msgid "show video"
394+msgstr ""
395+
396+#: searx/templates/oscar/result_templates/videos.html:9
397+msgid "hide video"
398+msgstr ""
399+
384400msgid "Localization"
385401msgstr ""
386402
@@ -401,15 +417,9 @@ msgstr "ウェブ"
401417msgid "music"
402418msgstr "音楽"
403419
404−msgid "social media"
405−msgstr "ソーシャルメディア"
406−
407420msgid "images"
408421msgstr "画像"
409422
410−msgid "videos"
411−msgstr "動画"
412−
413423msgid "it"
414424msgstr "情報技術"
415425
searx/translations/nl/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/nl/LC_MESSAGES/messages.po+25−9
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: searx\n"
1010"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
11+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1212"PO-Revision-Date: 2014-12-11 13:50+0000\n"
1313"Last-Translator: André Koot <meneer@tken.net>\n"
1414"Language-Team: Dutch "
@@ -19,11 +19,11 @@ msgstr ""
1919"Content-Transfer-Encoding: 8bit\n"
2020"Generated-By: Babel 1.3\n"
2121
22−#: searx/webapp.py:247
22+#: searx/webapp.py:263
2323msgid "{minutes} minute(s) ago"
2424msgstr "{minutes} min geleden"
2525
26−#: searx/webapp.py:249
26+#: searx/webapp.py:265
2727msgid "{hours} hour(s), {minutes} minute(s) ago"
2828msgstr "{hours} uur, {minutes} min geleden"
2929
@@ -171,31 +171,31 @@ msgstr "terug"
171171
172172#: searx/templates/courgette/results.html:12
173173#: searx/templates/default/results.html:12
174−#: searx/templates/oscar/results.html:83
174+#: searx/templates/oscar/results.html:87
175175msgid "Search URL"
176176msgstr "Zoek URL"
177177
178178#: searx/templates/courgette/results.html:16
179179#: searx/templates/default/results.html:16
180−#: searx/templates/oscar/results.html:88
180+#: searx/templates/oscar/results.html:92
181181msgid "Download results"
182182msgstr "Downloaden zoekresultaten"
183183
184184#: searx/templates/courgette/results.html:34
185185#: searx/templates/default/results.html:42
186−#: searx/templates/oscar/results.html:63
186+#: searx/templates/oscar/results.html:67
187187msgid "Suggestions"
188188msgstr "Suggesties"
189189
190190#: searx/templates/courgette/results.html:62
191191#: searx/templates/default/results.html:78
192−#: searx/templates/oscar/results.html:37
192+#: searx/templates/oscar/results.html:41
193193msgid "previous page"
194194msgstr "vorige pagina"
195195
196196#: searx/templates/courgette/results.html:73
197197#: searx/templates/default/results.html:89
198−#: searx/templates/oscar/results.html:45
198+#: searx/templates/oscar/results.html:49
199199msgid "next page"
200200msgstr "volgende pagina"
201201
@@ -274,7 +274,7 @@ msgstr "Wijzig searx layout"
274274msgid "Search results"
275275msgstr "Zoekresultaten"
276276
277−#: searx/templates/oscar/results.html:78
277+#: searx/templates/oscar/results.html:82
278278msgid "Links"
279279msgstr "Links"
280280
@@ -357,6 +357,14 @@ msgstr "Er ging iets fout."
357357msgid "cached"
358358msgstr "gecached"
359359
360+#: searx/templates/oscar/result_templates/default.html:9
361+msgid "show media"
362+msgstr ""
363+
364+#: searx/templates/oscar/result_templates/default.html:9
365+msgid "hide media"
366+msgstr ""
367+
360368#: searx/templates/oscar/result_templates/images.html:21
361369msgid "Get image"
362370msgstr "Toon afbeelding"
@@ -389,6 +397,14 @@ msgstr "Aanbieder"
389397msgid "Leecher"
390398msgstr "Ophaler"
391399
400+#: searx/templates/oscar/result_templates/videos.html:9
401+msgid "show video"
402+msgstr ""
403+
404+#: searx/templates/oscar/result_templates/videos.html:9
405+msgid "hide video"
406+msgstr ""
407+
392408msgid "Localization"
393409msgstr "Vertaling"
394410
searx/translations/tr/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/tr/LC_MESSAGES/messages.po+53−26
@@ -1,30 +1,30 @@
1−# English translations for PROJECT.
1+# English translations for .
22# Copyright (C) 2014 ORGANIZATION
3−# This file is distributed under the same license as the PROJECT project.
4−#
3+# This file is distributed under the same license as the project.
4+#
55# Translators:
66# Caner Başaran <basaran.caner@gmail.com>, 2014
77# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
88msgid ""
99msgstr ""
10−"Project-Id-Version: searx\n"
10+"Project-Id-Version: searx\n"
1111"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
12−"POT-Creation-Date: 2014-12-27 14:39+0100\n"
12+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
1313"PO-Revision-Date: 2014-12-28 08:20+0000\n"
1414"Last-Translator: Caner Başaran <basaran.caner@gmail.com>\n"
15−"Language-Team: Turkish (http://www.transifex.com/projects/p/searx/language/tr/)\n"
15+"Language-Team: Turkish "
16+"(http://www.transifex.com/projects/p/searx/language/tr/)\n"
17+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
1618"MIME-Version: 1.0\n"
17−"Content-Type: text/plain; charset=UTF-8\n"
19+"Content-Type: text/plain; charset=utf-8\n"
1820"Content-Transfer-Encoding: 8bit\n"
1921"Generated-By: Babel 1.3\n"
20−"Language: tr\n"
21−"Plural-Forms: nplurals=2; plural=(n > 1);\n"
2222
23−#: searx/webapp.py:247
23+#: searx/webapp.py:263
2424msgid "{minutes} minute(s) ago"
2525msgstr "{minutes} dakika() önce"
2626
27−#: searx/webapp.py:249
27+#: searx/webapp.py:265
2828msgid "{hours} hour(s), {minutes} minute(s) ago"
2929msgstr "{hours} saat(), {minutes} dakika() önce"
3030
@@ -142,9 +142,11 @@ msgstr "Engelle"
142142#: searx/templates/default/preferences.html:92
143143#: searx/templates/oscar/preferences.html:132
144144msgid ""
145−"These settings are stored in your cookies, this allows us not to store this "
146−"data about you."
147−msgstr "Ayarlar çerezlerinizde saklanır. Verdiğiniz izinler, sizin hakkınızda veri saklamak için değil."
145+"These settings are stored in your cookies, this allows us not to store "
146+"this data about you."
147+msgstr ""
148+"Ayarlar çerezlerinizde saklanır. Verdiğiniz izinler, sizin hakkınızda "
149+"veri saklamak için değil."
148150
149151#: searx/templates/courgette/preferences.html:94
150152#: searx/templates/default/preferences.html:94
@@ -168,31 +170,31 @@ msgstr "geri"
168170
169171#: searx/templates/courgette/results.html:12
170172#: searx/templates/default/results.html:12
171−#: searx/templates/oscar/results.html:83
173+#: searx/templates/oscar/results.html:87
172174msgid "Search URL"
173175msgstr "Arama Bağlantısı"
174176
175177#: searx/templates/courgette/results.html:16
176178#: searx/templates/default/results.html:16
177−#: searx/templates/oscar/results.html:88
179+#: searx/templates/oscar/results.html:92
178180msgid "Download results"
179181msgstr "Arama sonuçlarını indir"
180182
181183#: searx/templates/courgette/results.html:34
182184#: searx/templates/default/results.html:42
183−#: searx/templates/oscar/results.html:63
185+#: searx/templates/oscar/results.html:67
184186msgid "Suggestions"
185187msgstr "Öneriler"
186188
187189#: searx/templates/courgette/results.html:62
188190#: searx/templates/default/results.html:78
189−#: searx/templates/oscar/results.html:37
191+#: searx/templates/oscar/results.html:41
190192msgid "previous page"
191193msgstr "önceki sayfa"
192194
193195#: searx/templates/courgette/results.html:73
194196#: searx/templates/default/results.html:89
195−#: searx/templates/oscar/results.html:45
197+#: searx/templates/oscar/results.html:49
196198msgid "next page"
197199msgstr "sonraki sayfa"
198200
@@ -221,7 +223,9 @@ msgstr "Gücümün kaynağı"
221223
222224#: searx/templates/oscar/base.html:69
223225msgid "a privacy-respecting, hackable metasearch engine"
224−msgstr "kişisel gizliliğe saygılı ve merak edenlerin kurcalayabildiği bir meta arama motoru"
226+msgstr ""
227+"kişisel gizliliğe saygılı ve merak edenlerin kurcalayabildiği bir meta "
228+"arama motoru"
225229
226230#: searx/templates/oscar/navbar.html:6
227231msgid "Toggle navigation"
@@ -258,7 +262,10 @@ msgid ""
258262"Change how forms are submited, <a "
259263"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
260264" rel=\"external\">learn more about request methods</a>"
261−msgstr "Aramaların nasıl gönderildiğini değiştir, <a href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\" rel=\"external\">istek yöntemleri hakkında daha fazla bilgi</a>"
265+msgstr ""
266+"Aramaların nasıl gönderildiğini değiştir, <a "
267+"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
268+" rel=\"external\">istek yöntemleri hakkında daha fazla bilgi</a>"
262269
263270#: searx/templates/oscar/preferences.html:84
264271msgid "Change searx layout"
@@ -268,12 +275,11 @@ msgstr "searx yerleşim düzenini değiştir"
268275msgid "Search results"
269276msgstr "Arama sonuçları"
270277
271−#: searx/templates/oscar/results.html:78
278+#: searx/templates/oscar/results.html:82
272279msgid "Links"
273280msgstr "Bağlantılar"
274281
275−#: searx/templates/oscar/search.html:6
276−#: searx/templates/oscar/search_full.html:7
282+#: searx/templates/oscar/search.html:6 searx/templates/oscar/search_full.html:7
277283msgid "Start search"
278284msgstr "Aramayı başlat"
279285
@@ -311,7 +317,9 @@ msgstr "Uyarı!"
311317
312318#: searx/templates/oscar/messages/js_disabled.html:3
313319msgid "Please enable JavaScript to use full functionality of this site."
314−msgstr "Lütfen, bu sitenin tüm işlevlerini kullanmak için JavaScript'i etkinleştirin."
320+msgstr ""
321+"Lütfen, bu sitenin tüm işlevlerini kullanmak için JavaScript'i "
322+"etkinleştirin."
315323
316324#: searx/templates/oscar/messages/no_data_available.html:4
317325msgid "There is currently no data available. "
@@ -325,7 +333,9 @@ msgstr "Üzgünüz!"
325333msgid ""
326334"we didn't find any results. Please use another query or search in more "
327335"categories."
328−msgstr "herhangi bir sonuç bulamadık. Lütfen, başka sorgu kullanın veya daha fazla kategoride arama yapın."
336+msgstr ""
337+"herhangi bir sonuç bulamadık. Lütfen, başka sorgu kullanın veya daha "
338+"fazla kategoride arama yapın."
329339
330340#: searx/templates/oscar/messages/save_settings_successfull.html:7
331341msgid "Well done!"
@@ -350,6 +360,14 @@ msgstr "Bazı bazı şeylerde problem olmuş."
350360msgid "cached"
351361msgstr "önbellek"
352362
363+#: searx/templates/oscar/result_templates/default.html:9
364+msgid "show media"
365+msgstr ""
366+
367+#: searx/templates/oscar/result_templates/default.html:9
368+msgid "hide media"
369+msgstr ""
370+
353371#: searx/templates/oscar/result_templates/images.html:21
354372msgid "Get image"
355373msgstr "Görseli indir"
@@ -382,6 +400,14 @@ msgstr "Besleyenler"
382400msgid "Leecher"
383401msgstr "Sömürenler"
384402
403+#: searx/templates/oscar/result_templates/videos.html:9
404+msgid "show video"
405+msgstr ""
406+
407+#: searx/templates/oscar/result_templates/videos.html:9
408+msgid "hide video"
409+msgstr ""
410+
385411msgid "Localization"
386412msgstr ""
387413
@@ -419,3 +445,4 @@ msgstr "haberler"
419445
420446msgid "map"
421447msgstr "harita"
448+
utils/update-translations.sh+1−1
@@ -9,7 +9,7 @@ SEARX_DIR='searx'
99
1010pybabel extract -F babel.cfg -o messages.pot $SEARX_DIR
1111for f in `ls $SEARX_DIR'/translations/'`; do
12− pybabel update -i messages.pot -d $SEARX_DIR'/translations/' -l $f
12+ pybabel update -N -i messages.pot -d $SEARX_DIR'/translations/' -l $f
1313 # TODO - need to fix category translations
1414 sed -i 's/#~ //' $SEARX_DIR'/translations/'$f'/LC_MESSAGES/messages.po'
1515done