commit: 400b54191c590663f0cfe91045f70a5d9223aa19
parent af8dac93a8acff5042b7b399c38e348f0bdc32ad
Author: Thomas Pointhuber <thomas.pointhuber@gmx.at>
Date: Fri, 9 Jan 2015 21:25:13 +0100
Merge branch 'master' of https://github.com/asciimoo/searx into code_results
Conflicts:
searx/engines/searchcode_code.py
searx/engines/searchcode_doc.py
searx/static/oscar/js/searx.min.js
searx/templates/oscar/result_templates/default.html
searx/templates/oscar/result_templates/images.html
searx/templates/oscar/result_templates/map.html
searx/templates/oscar/result_templates/torrent.html
searx/templates/oscar/result_templates/videos.html
Diffstat:
256 files changed, 2042 insertions(+), 895 deletions(-)
diff --git a/.travis.yml b/.travis.yml
@@ -5,7 +5,7 @@ before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- npm install -g less grunt-cli
- - ( cd searx/static/oscar;npm install )
+ - ( cd searx/static/themes/oscar;npm install )
install:
- "make"
- pip install coveralls
diff --git a/AUTHORS.rst b/AUTHORS.rst
@@ -29,3 +29,6 @@ generally made searx better:
- @kernc
- @Cqoicebordel
- @Reventl0v
+- Caner Başaran
+- Benjamin Sonntag
+- @opi
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
@@ -0,0 +1,27 @@
+0.6.0 - 2014.12.25
+==================
+
+- Changelog added
+- New engines
+
+ - Flickr (api)
+ - Subtitleseeker
+ - photon
+ - 500px
+ - Searchcode
+ - Searchcode doc
+ - Kickass torrent
+- Precise search request timeout handling
+- Better favicon support
+- Stricter config parsing
+- Translation updates
+- Multiple ui fixes
+- Flickr (noapi) engine fix
+- Pep8 fixes
+
+
+News
+~~~~
+
+Health status of searx instances and engines: http://stats.searx.oe5tpo.com
+(source: https://github.com/pointhi/searx_stats)
diff --git a/Makefile b/Makefile
@@ -18,10 +18,6 @@ $(python):
virtualenv -p python$(version) --no-site-packages .
@touch $@
-tests: .installed.cfg
- @bin/test
- @grunt test --gruntfile searx/static/oscar/gruntfile.js
-
robot: .installed.cfg
@bin/robot
@@ -29,6 +25,10 @@ flake8: .installed.cfg
@bin/flake8 setup.py
@bin/flake8 ./searx/
+tests: .installed.cfg flake8
+ @bin/test
+ @grunt test --gruntfile searx/static/themes/oscar/gruntfile.js
+
coverage: .installed.cfg
@bin/coverage run bin/test
@bin/coverage report
@@ -45,18 +45,18 @@ minimal: bin/buildout minimal.cfg setup.py
bin/buildout -c minimal.cfg $(options)
styles:
- @lessc -x searx/static/default/less/style.less > searx/static/default/css/style.css
- @lessc -x searx/static/oscar/less/bootstrap/bootstrap.less > searx/static/oscar/css/bootstrap.min.css
- @lessc -x searx/static/oscar/less/oscar/oscar.less > searx/static/oscar/css/oscar.min.css
+ @lessc -x searx/static/themes/default/less/style.less > searx/static/themes/default/css/style.css
+ @lessc -x searx/static/themes/oscar/less/bootstrap/bootstrap.less > searx/static/themes/oscar/css/bootstrap.min.css
+ @lessc -x searx/static/themes/oscar/less/oscar/oscar.less > searx/static/themes/oscar/css/oscar.min.css
grunt:
- @grunt --gruntfile searx/static/oscar/gruntfile.js
+ @grunt --gruntfile searx/static/themes/oscar/gruntfile.js
locales:
@pybabel compile -d searx/translations
clean:
@rm -rf .installed.cfg .mr.developer.cfg bin parts develop-eggs \
- searx.egg-info lib include .coverage coverage searx/static/default/css/*.css
+ searx.egg-info lib include .coverage coverage searx/static/themes/default/css/*.css
.PHONY: all tests robot flake8 coverage production minimal styles locales clean
diff --git a/README.rst b/README.rst
@@ -14,16 +14,17 @@ See the `wiki <https://github.com/asciimoo/searx/wiki>`__ for more information.
Features
~~~~~~~~
-- Tracking free
-- Supports multiple output formats
- - json ``curl https://searx.me/?format=json&q=[query]``
- - csv ``curl https://searx.me/?format=csv&q=[query]``
- - opensearch/rss ``curl https://searx.me/?format=rss&q=[query]``
-- Opensearch support (you can set as default search engine)
-- Configurable search engines/categories
-- Different search languages
-- Duckduckgo like !bang functionality with engine shortcuts
-- Parallel queries - relatively fast
+- Tracking free
+- Supports multiple output formats
+
+ - json ``curl https://searx.me/?format=json&q=[query]``
+ - csv ``curl https://searx.me/?format=csv&q=[query]``
+ - opensearch/rss ``curl https://searx.me/?format=rss&q=[query]``
+- Opensearch support (you can set as default search engine)
+- Configurable search engines/categories
+- Different search languages
+- Duckduckgo like !bang functionality with engine shortcuts
+- Parallel queries - relatively fast
Installation
~~~~~~~~~~~~
@@ -131,14 +132,11 @@ next time you run any other ``make`` command it will rebuild everithing.
TODO
~~~~
-- Moar engines
-- Better ui
-- Browser integration
-- Documentation
-- Fix ``flake8`` errors, ``make flake8`` will be merged into
- ``make tests`` when it does not fail anymore
-- Tests
-- When we have more tests, we can integrate Travis-CI
+- Moar engines
+- Better ui
+- Browser integration
+- Documentation
+- Tests
Bugs
~~~~
diff --git a/searx/__init__.py b/searx/__init__.py
@@ -15,9 +15,9 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
'''
+import logging
from os import environ
from os.path import realpath, dirname, join, abspath
-from searx.https_rewrite import load_https_rules
try:
from yaml import load
except:
@@ -45,7 +45,17 @@ else:
with open(settings_path) as settings_yaml:
settings = load(settings_yaml)
+if settings.get('server', {}).get('debug'):
+ logging.basicConfig(level=logging.DEBUG)
+else:
+ logging.basicConfig(level=logging.WARNING)
+
+logger = logging.getLogger('searx')
+
# load https rules only if https rewrite is enabled
if settings.get('server', {}).get('https_rewrite'):
# loade https rules
+ from searx.https_rewrite import load_https_rules
load_https_rules(https_rewrite_path)
+
+logger.info('Initialisation done')
diff --git a/searx/engines/500px.py b/searx/engines/500px.py
@@ -35,9 +35,9 @@ def request(query, params):
# get response from search-request
def response(resp):
results = []
-
+
dom = html.fromstring(resp.text)
-
+
# parse results
for result in dom.xpath('//div[@class="photo"]'):
link = result.xpath('.//a')[0]
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
@@ -22,6 +22,10 @@ from imp import load_source
from flask.ext.babel import gettext
from operator import itemgetter
from searx import settings
+from searx import logger
+
+
+logger = logger.getChild('engines')
engine_dir = dirname(realpath(__file__))
@@ -81,7 +85,7 @@ def load_engine(engine_data):
if engine_attr.startswith('_'):
continue
if getattr(engine, engine_attr) is None:
- print('[E] Engine config error: Missing attribute "{0}.{1}"'\
+ logger.error('Missing engine config attribute: "{0}.{1}"'
.format(engine.name, engine_attr))
sys.exit(1)
@@ -100,9 +104,8 @@ def load_engine(engine_data):
categories['general'].append(engine)
if engine.shortcut:
- # TODO check duplications
if engine.shortcut in engine_shortcuts:
- print('[E] Engine config error: ambigious shortcut: {0}'\
+ logger.error('Engine config error: ambigious shortcut: {0}'
.format(engine.shortcut))
sys.exit(1)
engine_shortcuts[engine.shortcut] = engine.name
@@ -199,7 +202,7 @@ def get_engines_stats():
if 'engines' not in settings or not settings['engines']:
- print '[E] Error no engines found. Edit your settings.yml'
+ logger.error('No engines found. Edit your settings.yml')
exit(2)
for engine_data in settings['engines']:
diff --git a/searx/engines/dailymotion.py b/searx/engines/dailymotion.py
@@ -6,12 +6,14 @@
# @using-api yes
# @results JSON
# @stable yes
-# @parse url, title, thumbnail
+# @parse url, title, thumbnail, publishedDate, embedded
#
# @todo set content-parameter with correct data
from urllib import urlencode
from json import loads
+from cgi import escape
+from datetime import datetime
# engine dependent config
categories = ['videos']
@@ -20,7 +22,9 @@ language_support = True
# search-url
# see http://www.dailymotion.com/doc/api/obj-video.html
-search_url = 'https://api.dailymotion.com/videos?fields=title,description,duration,url,thumbnail_360_url&sort=relevance&limit=5&page={pageno}&{query}' # noqa
+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
+embedded_url = '<iframe frameborder="0" width="540" height="304" ' +\
+ 'data-src="//www.dailymotion.com/embed/video/{videoid}" allowfullscreen></iframe>'
# do search-request
@@ -51,14 +55,17 @@ def response(resp):
for res in search_res['list']:
title = res['title']
url = res['url']
- #content = res['description']
- content = ''
+ content = escape(res['description'])
thumbnail = res['thumbnail_360_url']
+ publishedDate = datetime.fromtimestamp(res['created_time'], None)
+ embedded = embedded_url.format(videoid=res['id'])
results.append({'template': 'videos.html',
'url': url,
'title': title,
'content': content,
+ 'publishedDate': publishedDate,
+ 'embedded': embedded,
'thumbnail': thumbnail})
# return results
diff --git a/searx/engines/deezer.py b/searx/engines/deezer.py
@@ -0,0 +1,61 @@
+## Deezer (Music)
+#
+# @website https://deezer.com
+# @provide-api yes (http://developers.deezer.com/api/)
+#
+# @using-api yes
+# @results JSON
+# @stable yes
+# @parse url, title, content, embedded
+
+from json import loads
+from urllib import urlencode
+
+# engine dependent config
+categories = ['music']
+paging = True
+
+# search-url
+url = 'http://api.deezer.com/'
+search_url = url + 'search?{query}&index={offset}'
+
+embedded_url = '<iframe scrolling="no" frameborder="0" allowTransparency="true" ' +\
+ 'data-src="http://www.deezer.com/plugins/player?type=tracks&id={audioid}" ' +\
+ 'width="540" height="80"></iframe>'
+
+
+# do search-request
+def request(query, params):
+ offset = (params['pageno'] - 1) * 25
+
+ params['url'] = search_url.format(query=urlencode({'q': query}),
+ offset=offset)
+
+ return params
+
+
+# get response from search-request
+def response(resp):
+ results = []
+
+ search_res = loads(resp.text)
+
+ # parse results
+ for result in search_res.get('data', []):
+ if result['type'] == 'track':
+ title = result['title']
+ url = result['link']
+ content = result['artist']['name'] +\
+ " • " +\
+ result['album']['title'] +\
+ " • " + result['title']
+ embedded = embedded_url.format(audioid=result['id'])
+
+ # append result
+ results.append({'url': url,
+ 'title': title,
+ 'embedded': embedded,
+ 'content': content})
+
+ # return results
+ return results
diff --git a/searx/engines/digg.py b/searx/engines/digg.py
@@ -0,0 +1,70 @@
+## Digg (News, Social media)
+#
+# @website https://digg.com/
+# @provide-api no
+#
+# @using-api no
+# @results HTML (using search portal)
+# @stable no (HTML can change)
+# @parse url, title, content, publishedDate, thumbnail
+
+from urllib import quote_plus
+from json import loads
+from lxml import html
+from cgi import escape
+from dateutil import parser
+
+# engine dependent config
+categories = ['news', 'social media']
+paging = True
+
+# search-url
+base_url = 'https://digg.com/'
+search_url = base_url+'api/search/{query}.json?position={position}&format=html'
+
+# specific xpath variables
+results_xpath = '//article'
+link_xpath = './/small[@class="time"]//a'
+title_xpath = './/h2//a//text()'
+content_xpath = './/p//text()'
+pubdate_xpath = './/time'
+
+
+# do search-request
+def request(query, params):
+ offset = (params['pageno'] - 1) * 10
+ params['url'] = search_url.format(position=offset,
+ query=quote_plus(query))
+ return params
+
+
+# get response from search-request
+def response(resp):
+ results = []
+
+ search_result = loads(resp.text)
+
+ if search_result['html'] == '':
+ return results
+
+ dom = html.fromstring(search_result['html'])
+
+ # parse results
+ for result in dom.xpath(results_xpath):
+ url = result.attrib.get('data-contenturl')
+ thumbnail = result.xpath('.//img')[0].attrib.get('src')
+ title = ''.join(result.xpath(title_xpath))
+ content = escape(''.join(result.xpath(content_xpath)))
+ pubdate = result.xpath(pubdate_xpath)[0].attrib.get('datetime')
+ publishedDate = parser.parse(pubdate)
+
+ # append result
+ results.append({'url': url,
+ 'title': title,
+ 'content': content,
+ 'template': 'videos.html',
+ 'publishedDate': publishedDate,
+ 'thumbnail': thumbnail})
+
+ # return results
+ return results
diff --git a/searx/engines/duckduckgo_definitions.py b/searx/engines/duckduckgo_definitions.py
@@ -1,6 +1,7 @@
import json
from urllib import urlencode
from lxml import html
+from searx.utils import html_to_text
from searx.engines.xpath import extract_text
url = 'https://api.duckduckgo.com/'\
@@ -17,11 +18,6 @@ def result_to_text(url, text, htmlResult):
return text
-def html_to_text(htmlFragment):
- dom = html.fromstring(htmlFragment)
- return extract_text(dom)
-
-
def request(query, params):
# TODO add kl={locale}
params['url'] = url.format(query=urlencode({'q': query}))
diff --git a/searx/engines/flickr-noapi.py b/searx/engines/flickr-noapi.py
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+
+# Flickr (Images)
+#
+# @website https://www.flickr.com
+# @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html)
+#
+# @using-api no
+# @results HTML
+# @stable no
+# @parse url, title, thumbnail, img_src
+
+from urllib import urlencode
+from json import loads
+import re
+
+categories = ['images']
+
+url = 'https://secure.flickr.com/'
+search_url = url+'search/?{query}&page={page}'
+photo_url = 'https://www.flickr.com/photos/{userid}/{photoid}'
+regex = re.compile(r"\"search-photos-models\",\"photos\":(.*}),\"totalItems\":", re.DOTALL)
+image_sizes = ('o', 'k', 'h', 'b', 'c', 'z', 'n', 'm', 't', 'q', 's')
+
+paging = True
+
+
+def build_flickr_url(user_id, photo_id):
+ return photo_url.format(userid=user_id, photoid=photo_id)
+
+
+def request(query, params):
+ params['url'] = search_url.format(query=urlencode({'text': query}),
+ page=params['pageno'])
+ return params
+
+
+def response(resp):
+ results = []
+
+ matches = regex.search(resp.text)
+
+ if matches is None:
+ return results
+
+ match = matches.group(1)
+ search_results = loads(match)
+
+ if '_data' not in search_results:
+ return []
+
+ photos = search_results['_data']
+
+ for photo in photos:
+
+ # In paged configuration, the first pages' photos
+ # are represented by a None object
+ if photo is None:
+ continue
+
+ img_src = None
+ # From the biggest to the lowest format
+ for image_size in image_sizes:
+ if image_size in photo['sizes']:
+ img_src = photo['sizes'][image_size]['displayUrl']
+ break
+
+ if not img_src:
+ continue
+
+ if 'id' not in photo['owner']:
+ continue
+
+ url = build_flickr_url(photo['owner']['id'], photo['id'])
+
+ title = photo['title']
+
+ content = '<span class="photo-author">' +\
+ photo['owner']['username'] +\
+ '</span><br />'
+
+ if 'description' in photo:
+ content = content +\
+ '<span class="description">' +\
+ photo['description'] +\
+ '</span>'
+
+ # append result
+ results.append({'url': url,
+ 'title': title,
+ 'img_src': img_src,
+ 'content': content,
+ 'template': 'images.html'})
+
+ return results
diff --git a/searx/engines/flickr.py b/searx/engines/flickr.py
@@ -1,54 +1,87 @@
#!/usr/bin/env python
+## Flickr (Images)
+#
+# @website https://www.flickr.com
+# @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html)
+#
+# @using-api yes
+# @results JSON
+# @stable yes
+# @parse url, title, thumbnail, img_src
+#More info on api-key : https://www.flickr.com/services/apps/create/
+
from urllib import urlencode
-#from json import loads
-from urlparse import urljoin
-from lxml import html
-from time import time
+from json import loads
categories = ['images']
-url = 'https://secure.flickr.com/'
-search_url = url+'search/?{query}&page={page}'
-results_xpath = '//div[@class="view display-item-tile"]/figure/div'
+nb_per_page = 15
+paging = True
+api_key = None
+
+
+url = 'https://api.flickr.com/services/rest/?method=flickr.photos.search' +\
+ '&api_key={api_key}&{text}&sort=relevance' +\
+ '&extras=description%2C+owner_name%2C+url_o%2C+url_z' +\
+ '&per_page={nb_per_page}&format=json&nojsoncallback=1&page={page}'
+photo_url = 'https://www.flickr.com/photos/{userid}/{photoid}'
paging = True
+def build_flickr_url(user_id, photo_id):
+ return photo_url.format(userid=user_id, photoid=photo_id)
+
+
def request(query, params):
- params['url'] = search_url.format(query=urlencode({'text': query}),
- page=params['pageno'])
- time_string = str(int(time())-3)
- params['cookies']['BX'] = '3oqjr6d9nmpgl&b=3&s=dh'
- params['cookies']['xb'] = '421409'
- params['cookies']['localization'] = 'en-us'
- params['cookies']['flrbp'] = time_string +\
- '-3a8cdb85a427a33efda421fbda347b2eaf765a54'
- params['cookies']['flrbs'] = time_string +\
- '-ed142ae8765ee62c9ec92a9513665e0ee1ba6776'
- params['cookies']['flrb'] = '9'
+ params['url'] = url.format(text=urlencode({'text': query}),
+ api_key=api_key,
+ nb_per_page=nb_per_page,
+ page=params['pageno'])
return params
def response(resp):
results = []
- dom = html.fromstring(resp.text)
- for result in dom.xpath(results_xpath):
- img = result.xpath('.//img')
- if not img:
- continue
+ search_results = loads(resp.text)
- img = img[0]
- img_src = 'https:'+img.attrib.get('src')
+ # return empty array if there are no results
+ if not 'photos' in search_results:
+ return []
- if not img_src:
+ if not 'photo' in search_results['photos']:
+ return []
+
+ photos = search_results['photos']['photo']
+
+ # parse results
+ for photo in photos:
+ if 'url_o' in photo:
+ img_src = photo['url_o']
+ elif 'url_z' in photo:
+ img_src = photo['url_z']
+ else:
continue
- href = urljoin(url, result.xpath('.//a')[0].attrib.get('href'))
- title = img.attrib.get('alt', '')
- results.append({'url': href,
+ url = build_flickr_url(photo['owner'], photo['id'])
+
+ title = photo['title']
+
+ content = '<span class="photo-author">' +\
+ photo['ownername'] +\
+ '</span><br />' +\
+ '<span class="description">' +\
+ photo['description']['_content'] +\
+ '</span>'
+
+ # append result
+ results.append({'url': url,
'title': title,
'img_src': img_src,
+ 'content': content,
'template': 'images.html'})
+
+ # return results
return results
diff --git a/searx/engines/kickass.py b/searx/engines/kickass.py
@@ -24,7 +24,7 @@ search_url = url + 'search/{search_term}/{pageno}/'
# specific xpath variables
magnet_xpath = './/a[@title="Torrent magnet link"]'
-#content_xpath = './/font[@class="detDesc"]//text()'
+content_xpath = './/span[@class="font11px lightgrey block"]'
# do search-request
@@ -56,7 +56,8 @@ def response(resp):
link = result.xpath('.//a[@class="cellMainLink"]')[0]
href = urljoin(url, link.attrib['href'])
title = ' '.join(link.xpath('.//text()'))
- content = escape(html.tostring(result.xpath('.//span[@class="font11px lightgrey block"]')[0], method="text"))
+ content = escape(html.tostring(result.xpath(content_xpath)[0],
+ method="text"))
seed = result.xpath('.//td[contains(@class, "green")]/text()')[0]
leech = result.xpath('.//td[contains(@class, "red")]/text()')[0]
diff --git a/searx/engines/searchcode_doc.py b/searx/engines/searchcode_doc.py
@@ -38,10 +38,14 @@ def response(resp):
for result in search_results['results']:
href = result['url']
title = "[" + result['type'] + "] " +\
- result['namespace'] + " " + result['name']
- content = '<span class="highlight">[' + result['type'] + "] " +\
- result['name'] + " " + result['synopsis'] +\
- "</span><br />" + result['description']
+ result['namespace'] +\
+ " " + result['name']
+ content = '<span class="highlight">[' +\
+ result['type'] + "] " +\
+ result['name'] + " " +\
+ result['synopsis'] +\
+ "</span><br />" +\
+ result['description']
# append result
results.append({'url': href,
diff --git a/searx/engines/soundcloud.py b/searx/engines/soundcloud.py
@@ -6,10 +6,11 @@
# @using-api yes
# @results JSON
# @stable yes
-# @parse url, title, content
+# @parse url, title, content, publishedDate, embedded
from json import loads
-from urllib import urlencode
+from urllib import urlencode, quote_plus
+from dateutil import parser
# engine dependent config
categories = ['music']
@@ -27,6 +28,10 @@ search_url = url + 'search?{query}'\
'&linked_partitioning=1'\
'&client_id={client_id}' # noqa
+embedded_url = '<iframe width="100%" height="166" ' +\
+ 'scrolling="no" frameborder="no" ' +\
+ 'data-src="https://w.soundcloud.com/player/?url={uri}"></iframe>'
+
# do search-request
def request(query, params):
@@ -50,10 +55,15 @@ def response(resp):
if result['kind'] in ('track', 'playlist'):
title = result['title']
content = result['description']
+ publishedDate = parser.parse(result['last_modified'])
+ uri = quote_plus(result['uri'])
+ embedded = embedded_url.format(uri=uri)
# append result
results.append({'url': result['permalink_url'],
'title': title,
+ 'publishedDate': publishedDate,
+ 'embedded': embedded,
'content': content})
# return results
diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py
@@ -66,7 +66,10 @@ def response(resp):
continue
link = links[0]
url = link.attrib.get('href')
- title = escape(link.text_content())
+ try:
+ title = escape(link.text_content())
+ except UnicodeDecodeError:
+ continue
# block google-ad url's
if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url):
diff --git a/searx/engines/subtitleseeker.py b/searx/engines/subtitleseeker.py
@@ -0,0 +1,78 @@
+## Subtitleseeker (Video)
+#
+# @website http://www.subtitleseeker.com
+# @provide-api no
+#
+# @using-api no
+# @results HTML
+# @stable no (HTML can change)
+# @parse url, title, content
+
+from cgi import escape
+from urllib import quote_plus
+from lxml import html
+from searx.languages import language_codes
+
+# engine dependent config
+categories = ['videos']
+paging = True
+language = ""
+
+# search-url
+url = 'http://www.subtitleseeker.com/'
+search_url = url+'search/TITLES/{query}&p={pageno}'
+
+# specific xpath variables
+results_xpath = '//div[@class="boxRows"]'
+
+
+# do search-request
+def request(query, params):
+ params['url'] = search_url.format(query=quote_plus(query),
+ pageno=params['pageno'])
+ return params
+
+
+# get response from search-request
+def response(resp):
+ results = []
+
+ dom = html.fromstring(resp.text)
+
+ search_lang = ""
+
+ if resp.search_params['language'] != 'all':
+ search_lang = [lc[1]
+ for lc in language_codes
+ if lc[0][:2] == resp.search_params['language']][0]
+
+ # parse results
+ for result in dom.xpath(results_xpath):
+ link = result.xpath(".//a")[0]
+ href = link.attrib.get('href')
+
+ if language is not "":
+ href = href + language + '/'
+ elif search_lang:
+ href = href + search_lang + '/'
+
+ title = escape(link.xpath(".//text()")[0])
+
+ content = result.xpath('.//div[contains(@class,"red")]//text()')[0]
+ content = content + " - "
+ text = result.xpath('.//div[contains(@class,"grey-web")]')[0]
+ content = content + html.tostring(text, method='text')
+
+ if result.xpath(".//span") != []:
+ content = content +\
+ " - (" +\
+ result.xpath(".//span//text()")[0].strip() +\
+ ")"
+
+ # append result
+ results.append({'url': href,
+ 'title': title,
+ 'content': escape(content)})
+
+ # return results
+ return results
diff --git a/searx/engines/twitter.py b/searx/engines/twitter.py
@@ -1,6 +1,6 @@
## Twitter (Social media)
#
-# @website https://www.bing.com/news
+# @website https://twitter.com/
# @provide-api yes (https://dev.twitter.com/docs/using-search)
#
# @using-api no
@@ -14,6 +14,7 @@ from urlparse import urljoin
from urllib import urlencode
from lxml import html
from cgi import escape
+from datetime import datetime
# engine dependent config
categories = ['social media']
@@ -27,7 +28,8 @@ search_url = base_url+'search?'
results_xpath = '//li[@data-item-type="tweet"]'
link_xpath = './/small[@class="time"]//a'
title_xpath = './/span[@class="username js-action-profile-name"]//text()'
-content_xpath = './/p[@class="js-tweet-text tweet-text"]//text()'
+content_xpath = './/p[@class="js-tweet-text tweet-text"]'
+timestamp_xpath = './/span[contains(@class,"_timestamp")]'
# do search-request
@@ -52,12 +54,21 @@ def response(resp):
link = tweet.xpath(link_xpath)[0]
url = urljoin(base_url, link.attrib.get('href'))
title = ''.join(tweet.xpath(title_xpath))
- content = escape(''.join(tweet.xpath(content_xpath)))
-
- # append result
- results.append({'url': url,
- 'title': title,
- 'content': content})
+ content = escape(html.tostring(tweet.xpath(content_xpath)[0], method='text', encoding='UTF-8').decode("utf-8"))
+ pubdate = tweet.xpath(timestamp_xpath)
+ if len(pubdate) > 0:
+ timestamp = float(pubdate[0].attrib.get('data-time'))
+ publishedDate = datetime.fromtimestamp(timestamp, None)
+ # append result
+ results.append({'url': url,
+ 'title': title,
+ 'content': content,
+ 'publishedDate': publishedDate})
+ else:
+ # append result
+ results.append({'url': url,
+ 'title': title,
+ 'content': content})
# return results
return results
diff --git a/searx/engines/vimeo.py b/searx/engines/vimeo.py
@@ -1,4 +1,4 @@
-## Vimeo (Videos)
+# Vimeo (Videos)
#
# @website https://vimeo.com/
# @provide-api yes (http://developer.vimeo.com/api),
@@ -7,14 +7,14 @@
# @using-api no (TODO, rewrite to api)
# @results HTML (using search portal)
# @stable no (HTML can change)
-# @parse url, title, publishedDate, thumbnail
+# @parse url, title, publishedDate, thumbnail, embedded
#
# @todo rewrite to api
# @todo set content-parameter with correct data
from urllib import urlencode
-from HTMLParser import HTMLParser
from lxml import html
+from HTMLParser import HTMLParser
from searx.engines.xpath import extract_text
from dateutil import parser
@@ -23,26 +23,26 @@ categories = ['videos']
paging = True
# search-url
-base_url = 'https://vimeo.com'
+base_url = 'http://vimeo.com'
search_url = base_url + '/search/page:{pageno}?{query}'
# specific xpath variables
+results_xpath = '//div[@id="browse_content"]/ol/li'
url_xpath = './a/@href'
+title_xpath = './a/div[@class="data"]/p[@class="title"]'
content_xpath = './a/img/@src'
-title_xpath = './a/div[@class="data"]/p[@class="title"]/text()'
-results_xpath = '//div[@id="browse_content"]/ol/li'
publishedDate_xpath = './/p[@class="meta"]//attribute::datetime'
+embedded_url = '<iframe data-src="//player.vimeo.com/video{videoid}" ' +\
+ 'width="540" height="304" frameborder="0" ' +\
+ 'webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'
+
# do search-request
def request(query, params):
params['url'] = search_url.format(pageno=params['pageno'],
query=urlencode({'q': query}))
- # TODO required?
- params['cookies']['__utma'] =\
- '00000000.000#0000000.0000000000.0000000000.0000000000.0'
-
return params
@@ -51,16 +51,17 @@ def response(resp):
results = []
dom = html.fromstring(resp.text)
-
p = HTMLParser()
# parse results
for result in dom.xpath(results_xpath):
- url = base_url + result.xpath(url_xpath)[0]
+ videoid = result.xpath(url_xpath)[0]
+ url = base_url + videoid
title = p.unescape(extract_text(result.xpath(title_xpath)))
thumbnail = extract_text(result.xpath(content_xpath)[0])
publishedDate = parser.parse(extract_text(
result.xpath(publishedDate_xpath)[0]))
+ embedded = embedded_url.format(videoid=videoid)
# append result
results.append({'url': url,
@@ -68,6 +69,7 @@ def response(resp):
'content': '',
'template': 'videos.html',
'publishedDate': publishedDate,
+ 'embedded': embedded,
'thumbnail': thumbnail})
# return results
diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py
@@ -1,6 +1,8 @@
import json
from requests import get
from urllib import urlencode
+import locale
+import dateutil.parser
result_count = 1
wikidata_host = 'https://www.wikidata.org'
@@ -35,6 +37,16 @@ def response(resp):
language = resp.search_params['language'].split('_')[0]
if language == 'all':
language = 'en'
+
+ try:
+ locale.setlocale(locale.LC_ALL, str(resp.search_params['language']))
+ except:
+ try:
+ locale.setlocale(locale.LC_ALL, 'en_US')
+ except:
+ pass
+ pass
+
url = url_detail.format(query=urlencode({'ids': '|'.join(wikidata_ids),
'languages': language + '|en'}))
@@ -164,10 +176,12 @@ def getDetail(jsonresponse, wikidata_id, language):
date_of_birth = get_time(claims, 'P569', None)
if date_of_birth is not None:
+ date_of_birth = dateutil.parser.parse(date_of_birth[8:]).strftime(locale.nl_langinfo(locale.D_FMT))
attributes.append({'label': 'Date of birth', 'value': date_of_birth})
date_of_death = get_time(claims, 'P570', None)
if date_of_death is not None:
+ date_of_death = dateutil.parser.parse(date_of_death[8:]).strftime(locale.nl_langinfo(locale.D_FMT))
attributes.append({'label': 'Date of death', 'value': date_of_death})
if len(attributes) == 0 and len(urls) == 2 and len(description) == 0:
diff --git a/searx/engines/youtube.py b/searx/engines/youtube.py
@@ -6,7 +6,7 @@
# @using-api yes
# @results JSON
# @stable yes
-# @parse url, title, content, publishedDate, thumbnail
+# @parse url, title, content, publishedDate, thumbnail, embedded
from json import loads
from urllib import urlencode
@@ -19,7 +19,11 @@ language_support = True
# search-url
base_url = 'https://gdata.youtube.com/feeds/api/videos'
-search_url = base_url + '?alt=json&{query}&start-index={index}&max-results=5' # noqa
+search_url = base_url + '?alt=json&{query}&start-index={index}&max-results=5'
+
+embedded_url = '<iframe width="540" height="304" ' +\
+ 'data-src="//www.youtube-nocookie.com/embed/{videoid}" ' +\
+ 'frameborder="0" allowfullscreen></iframe>'
# do search-request
@@ -60,6 +64,8 @@ def response(resp):
if url.endswith('&'):
url = url[:-1]
+ videoid = url[32:]
+
title = result['title']['$t']
content = ''
thumbnail = ''
@@ -72,12 +78,15 @@ def response(resp):
content = result['content']['$t']
+ embedded = embedded_url.format(videoid=videoid)
+
# append result
results.append({'url': url,
'title': title,
'content': content,
'template': 'videos.html',
'publishedDate': publishedDate,
+ 'embedded': embedded,
'thumbnail': thumbnail})
# return results
diff --git a/searx/https_rewrite.py b/searx/https_rewrite.py
@@ -20,8 +20,11 @@ from urlparse import urlparse
from lxml import etree
from os import listdir
from os.path import isfile, isdir, join
+from searx import logger
+logger = logger.getChild("https_rewrite")
+
# https://gitweb.torproject.org/\
# pde/https-everywhere.git/tree/4.0:/src/chrome/content/rules
@@ -131,7 +134,7 @@ def load_single_https_ruleset(filepath):
def load_https_rules(rules_path):
# check if directory exists
if not isdir(rules_path):
- print("[E] directory not found: '" + rules_path + "'")
+ logger.error("directory not found: '" + rules_path + "'")
return
# search all xml files which are stored in the https rule directory
@@ -151,8 +154,7 @@ def load_https_rules(rules_path):
# append ruleset
https_rules.append(ruleset)
- print(' * {n} https-rules loaded'.format(n=len(https_rules)))
-
+ logger.info('{n} rules loaded'.format(n=len(https_rules)))
def https_url_rewrite(result):
diff --git a/searx/search.py b/searx/search.py
@@ -29,21 +29,23 @@ from searx.engines import (
from searx.languages import language_codes
from searx.utils import gen_useragent
from searx.query import Query
+from searx import logger
+logger = logger.getChild('search')
+
number_of_searches = 0
def search_request_wrapper(fn, url, engine_name, **kwargs):
try:
return fn(url, **kwargs)
- except Exception, e:
+ except:
# increase errors stats
engines[engine_name].stats['errors'] += 1
# print engine name and specific error message
- print('[E] Error with engine "{0}":\n\t{1}'.format(
- engine_name, str(e)))
+ logger.exception('engine crash: {0}'.format(engine_name))
return
@@ -66,14 +68,19 @@ def threaded_requests(requests):
remaining_time = max(0.0, timeout_limit - (time() - search_start))
th.join(remaining_time)
if th.isAlive():
- print('engine timeout: {0}'.format(th._engine_name))
-
+ logger.warning('engine timeout: {0}'.format(th._engine_name))
# get default reqest parameter
def default_request_params():
return {
- 'method': 'GET', 'headers': {}, 'data': {}, 'url': '', 'cookies': {}, 'verify': True}
+ 'method': 'GET',
+ 'headers': {},
+ 'data': {},
+ 'url': '',
+ 'cookies': {},
+ 'verify': True
+ }
# create a callback wrapper for the search engine results
@@ -487,14 +494,15 @@ class Search(object):
continue
# append request to list
- requests.append((req, request_params['url'], request_args, selected_engine['name']))
+ requests.append((req, request_params['url'],
+ request_args,
+ selected_engine['name']))
if not requests:
return results, suggestions, answers, infoboxes
# send all search-request
threaded_requests(requests)
-
while not results_queue.empty():
engine_name, engine_results = results_queue.get_nowait()
diff --git a/searx/settings.yml b/searx/settings.yml
@@ -35,6 +35,10 @@ engines:
engine : currency_convert
categories : general
shortcut : cc
+
+ - name : deezer
+ engine : deezer
+ shortcut : dz
- name : deviantart
engine : deviantart
@@ -44,6 +48,10 @@ engines:
- name : ddg definitions
engine : duckduckgo_definitions
shortcut : ddd
+
+ - name : digg
+ engine : digg
+ shortcut : dg
- name : wikidata
engine : wikidata
@@ -70,10 +78,14 @@ engines:
shortcut : px
- name : flickr
- engine : flickr
categories : images
shortcut : fl
- timeout: 3.0
+# You can use the engine using the official stable API, but you need an API key
+# See : https://www.flickr.com/services/apps/create/
+# engine : flickr
+# api_key: 'apikey' # required!
+# Or you can use the html non-stable engine, activated by default
+ engine : flickr-noapi
- name : general-file
engine : generalfile
@@ -95,6 +107,33 @@ engines:
engine : google_news
shortcut : gon
+ - name : google play apps
+ engine : xpath
+ search_url : https://play.google.com/store/search?q={query}&c=apps
+ url_xpath : //a[@class="title"]/@href
+ title_xpath : //a[@class="title"]
+ content_xpath : //a[@class="subtitle"]
+ categories : files
+ shortcut : gpa
+
+ - name : google play movies
+ engine : xpath
+ search_url : https://play.google.com/store/search?q={query}&c=movies
+ url_xpath : //a[@class="title"]/@href
+ title_xpath : //a[@class="title"]
+ content_xpath : //a[@class="subtitle"]
+ categories : videos
+ shortcut : gpm
+
+ - name : google play music
+ engine : xpath
+ search_url : https://play.google.com/store/search?q={query}&c=music
+ url_xpath : //a[@class="title"]/@href
+ title_xpath : //a[@class="title"]
+ content_xpath : //a[@class="subtitle"]
+ categories : music
+ shortcut : gps
+
- name : openstreetmap
engine : openstreetmap
shortcut : osm
@@ -127,6 +166,13 @@ engines:
engine : searchcode_code
shortcut : scc
+ - name : subtitleseeker
+ engine : subtitleseeker
+ shortcut : ss
+# The language is an option. You can put any language written in english
+# Examples : English, French, German, Hungarian, Chinese...
+# language : English
+
- name : startpage
engine : startpage
shortcut : sp
@@ -194,3 +240,4 @@ locales:
it : Italiano
nl : Nederlands
ja : 日本語 (Japanese)
+ tr : Türkçe
diff --git a/searx/static/oscar/README.rst b/searx/static/oscar/README.rst
@@ -1,17 +0,0 @@
-install dependencies
-~~~~~~~~~~~~~~~~~~~~
-
-run this command in the directory ``searx/static/oscar``
-
-``npm install``
-
-compile sources
-~~~~~~~~~~~~~~~
-
-run this command in the directory ``searx/static/oscar``
-
-``grunt``
-
-or in the root directory:
-
-``make grunt``
diff --git a/searx/static/oscar/js/searx.min.js b/searx/static/oscar/js/searx.min.js
@@ -1,2 +0,0 @@
-/*! oscar/searx.min.js | 22-12-2014 | https://github.com/asciimoo/searx */
-requirejs.config({baseUrl:"./static/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)})});
-\ No newline at end of file
diff --git a/searx/static/oscar/js/searx_src/00_requirejs_config.js b/searx/static/oscar/js/searx_src/00_requirejs_config.js
@@ -1,23 +0,0 @@
-/**
- * searx is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * searx is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with searx. If not, see < http://www.gnu.org/licenses/ >.
- *
- * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
- */
-
-requirejs.config({
- baseUrl: './static/oscar/js',
- paths: {
- app: '../app'
- }
-});
diff --git a/searx/static/oscar/js/searx_src/element_modifiers.js b/searx/static/oscar/js/searx_src/element_modifiers.js
@@ -1,87 +0,0 @@
-/**
- * searx is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * searx is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with searx. If not, see < http://www.gnu.org/licenses/ >.
- *
- * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
- */
-
-$(document).ready(function(){
- /**
- * focus element if class="autofocus" and id="q"
- */
- $('#q.autofocus').focus();
-
- /**
- * select full content on click if class="select-all-on-click"
- */
- $(".select-all-on-click").click(function () {
- $(this).select();
- });
-
- /**
- * change text during btn-collapse click if possible
- */
- $('.btn-collapse').click(function() {
- var btnTextCollapsed = $(this).data('btn-text-collapsed');
- var btnTextNotCollapsed = $(this).data('btn-text-not-collapsed');
-
- if(btnTextCollapsed !== '' && btnTextNotCollapsed !== '') {
- if($(this).hasClass('collapsed')) {
- new_html = $(this).html().replace(btnTextCollapsed, btnTextNotCollapsed);
- } else {
- new_html = $(this).html().replace(btnTextNotCollapsed, btnTextCollapsed);
- }
- $(this).html(new_html);
- }
- });
-
- /**
- * change text during btn-toggle click if possible
- */
- $('.btn-toggle .btn').click(function() {
- var btnClass = 'btn-' + $(this).data('btn-class');
- var btnLabelDefault = $(this).data('btn-label-default');
- var btnLabelToggled = $(this).data('btn-label-toggled');
- if(btnLabelToggled !== '') {
- if($(this).hasClass('btn-default')) {
- new_html = $(this).html().replace(btnLabelDefault, btnLabelToggled);
- } else {
- new_html = $(this).html().replace(btnLabelToggled, btnLabelDefault);
- }
- $(this).html(new_html);
- }
- $(this).toggleClass(btnClass);
- $(this).toggleClass('btn-default');
- });
-
- /**
- * Select or deselect every categories on double clic
- */
- $(".btn-sm").dblclick(function() {
- var btnClass = 'btn-' + $(this).data('btn-class'); // primary
- if($(this).hasClass('btn-default')) {
- $(".btn-sm > input").attr('checked', 'checked');
- $(".btn-sm > input").prop("checked", true);
- $(".btn-sm").addClass(btnClass);
- $(".btn-sm").addClass('active');
- $(".btn-sm").removeClass('btn-default');
- } else {
- $(".btn-sm > input").attr('checked', '');
- $(".btn-sm > input").removeAttr('checked');
- $(".btn-sm > input").checked = false;
- $(".btn-sm").removeClass(btnClass);
- $(".btn-sm").removeClass('active');
- $(".btn-sm").addClass('btn-default');
- }
- });
-});
diff --git a/searx/static/oscar/js/searx_src/leaflet_map.js b/searx/static/oscar/js/searx_src/leaflet_map.js
@@ -1,172 +0,0 @@
-/**
- * searx is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * searx is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with searx. If not, see < http://www.gnu.org/licenses/ >.
- *
- * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
- */
-
-$(document).ready(function(){
- $(".searx_overpass_request").on( "click", function( event ) {
- var overpass_url = "https://overpass-api.de/api/interpreter?data=";
- var query_start = overpass_url + "[out:json][timeout:25];(";
- var query_end = ");out meta;";
-
- var osm_id = $(this).data('osm-id');
- var osm_type = $(this).data('osm-type');
- var result_table = $(this).data('result-table');
- var result_table_loadicon = "#" + $(this).data('result-table-loadicon');
-
- // tags which can be ignored
- var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
-
- if(osm_id && osm_type && result_table) {
- result_table = "#" + result_table;
- var query = null;
- switch(osm_type) {
- case 'node':
- query = query_start + "node(" + osm_id + ");" + query_end;
- break;
- case 'way':
- query = query_start + "way(" + osm_id + ");" + query_end;
- break;
- case 'relation':
- query = query_start + "relation(" + osm_id + ");" + query_end;
- break;
- default:
- break;
- }
- if(query) {
- //alert(query);
- var ajaxRequest = $.ajax( query )
- .done(function( html) {
- if(html && html.elements && html.elements[0]) {
- var element = html.elements[0];
- var newHtml = $(result_table).html();
- for (var row in element.tags) {
- if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
- newHtml += "<tr><td>" + row + "</td><td>";
- switch(row) {
- case "phone":
- case "fax":
- newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
- break;
- case "email":
- newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
- break;
- case "website":
- case "url":
- newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
- break;
- case "wikidata":
- newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
- break;
- case "wikipedia":
- if(element.tags[row].indexOf(":") != -1) {
- newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
- break;
- }
- /* jshint ignore:start */
- default:
- /* jshint ignore:end */
- newHtml += element.tags[row];
- break;
- }
- newHtml += "</td></tr>";
- }
- }
- $(result_table).html(newHtml);
- $(result_table).removeClass('hidden');
- $(result_table_loadicon).addClass('hidden');
- }
- })
- .fail(function() {
- $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
- });
- }
- }
-
- // this event occour only once per element
- $( this ).off( event );
- });
-
- $(".searx_init_map").on( "click", function( event ) {
- var leaflet_target = $(this).data('leaflet-target');
- var map_lon = $(this).data('map-lon');
- var map_lat = $(this).data('map-lat');
- var map_zoom = $(this).data('map-zoom');
- var map_boundingbox = $(this).data('map-boundingbox');
- var map_geojson = $(this).data('map-geojson');
-
- require(['leaflet-0.7.3.min'], function(leaflet) {
- if(map_boundingbox) {
- southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
- northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
- map_bounds = L.latLngBounds(southWest, northEast);
- }
-
- // TODO hack
- // change default imagePath
- L.Icon.Default.imagePath = "./static/oscar/img/map";
-
- // init map
- var map = L.map(leaflet_target);
-
- // create the tile layer with correct attribution
- var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
- var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
- var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
-
- var osmMapquestUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg';
- var osmMapquestAttrib='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">';
- var osmMapquest = new L.TileLayer(osmMapquestUrl, {minZoom: 1, maxZoom: 18, subdomains: '1234', attribution: osmMapquestAttrib});
-
- var osmMapquestOpenAerialUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg';
- var osmMapquestOpenAerialAttrib='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';
- var osmMapquestOpenAerial = new L.TileLayer(osmMapquestOpenAerialUrl, {minZoom: 1, maxZoom: 11, subdomains: '1234', attribution: osmMapquestOpenAerialAttrib});
-
- // init map view
- if(map_bounds) {
- // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
- setTimeout(function () {
- map.fitBounds(map_bounds, {
- maxZoom:17
- });
- }, 0);
- } else if (map_lon && map_lat) {
- if(map_zoom)
- map.setView(new L.LatLng(map_lat, map_lon),map_zoom);
- else
- map.setView(new L.LatLng(map_lat, map_lon),8);
- }
-
- map.addLayer(osmMapquest);
-
- var baseLayers = {
- "OSM Mapnik": osmMapnik,
- "MapQuest": osmMapquest/*,
- "MapQuest Open Aerial": osmMapquestOpenAerial*/
- };
-
- L.control.layers(baseLayers).addTo(map);
-
-
- if(map_geojson)
- L.geoJson(map_geojson).addTo(map);
- /*else if(map_bounds)
- L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/
- });
-
- // this event occour only once per element
- $( this ).off( event );
- });
-});
diff --git a/searx/static/courgette/css/style.css b/searx/static/themes/courgette/css/style.css
diff --git a/searx/static/courgette/img/bg-body-index.jpg b/searx/static/themes/courgette/img/bg-body-index.jpg
Binary files differ.
diff --git a/searx/static/courgette/img/favicon.png b/searx/static/themes/courgette/img/favicon.png
Binary files differ.
diff --git a/searx/static/courgette/img/github_ribbon.png b/searx/static/themes/courgette/img/github_ribbon.png
Binary files differ.
diff --git a/searx/static/courgette/img/icon_dailymotion.ico b/searx/static/themes/courgette/img/icons/icon_dailymotion.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_deviantart.ico b/searx/static/themes/courgette/img/icons/icon_deviantart.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_github.ico b/searx/static/themes/courgette/img/icons/icon_github.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_kickass.ico b/searx/static/themes/courgette/img/icons/icon_kickass.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_soundcloud.ico b/searx/static/themes/courgette/img/icons/icon_soundcloud.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_stackoverflow.ico b/searx/static/themes/courgette/img/icons/icon_stackoverflow.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_twitter.ico b/searx/static/themes/courgette/img/icons/icon_twitter.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_vimeo.ico b/searx/static/themes/courgette/img/icons/icon_vimeo.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_wikipedia.ico b/searx/static/themes/courgette/img/icons/icon_wikipedia.ico
Binary files differ.
diff --git a/searx/static/courgette/img/icon_youtube.ico b/searx/static/themes/courgette/img/icons/icon_youtube.ico
Binary files differ.
diff --git a/searx/static/courgette/img/preference-icon.png b/searx/static/themes/courgette/img/preference-icon.png
Binary files differ.
diff --git a/searx/static/courgette/img/search-icon.png b/searx/static/themes/courgette/img/search-icon.png
Binary files differ.
diff --git a/searx/static/courgette/img/searx-mobile.png b/searx/static/themes/courgette/img/searx-mobile.png
Binary files differ.
diff --git a/searx/static/courgette/img/searx.png b/searx/static/themes/courgette/img/searx.png
Binary files differ.
diff --git a/searx/static/courgette/img/searx_logo.svg b/searx/static/themes/courgette/img/searx_logo.svg
diff --git a/searx/static/courgette/js/mootools-autocompleter-1.1.2-min.js b/searx/static/themes/courgette/js/mootools-autocompleter-1.1.2-min.js
diff --git a/searx/static/courgette/js/mootools-core-1.4.5-min.js b/searx/static/themes/courgette/js/mootools-core-1.4.5-min.js
diff --git a/searx/static/courgette/js/searx.js b/searx/static/themes/courgette/js/searx.js
diff --git a/searx/static/default/css/style.css b/searx/static/themes/default/css/style.css
diff --git a/searx/static/default/img/favicon.png b/searx/static/themes/default/img/favicon.png
Binary files differ.
diff --git a/searx/static/default/img/github_ribbon.png b/searx/static/themes/default/img/github_ribbon.png
Binary files differ.
diff --git a/searx/static/default/img/icon_dailymotion.ico b/searx/static/themes/default/img/icons/icon_dailymotion.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_deviantart.ico b/searx/static/themes/default/img/icons/icon_deviantart.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_github.ico b/searx/static/themes/default/img/icons/icon_github.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_kickass.ico b/searx/static/themes/default/img/icons/icon_kickass.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_soundcloud.ico b/searx/static/themes/default/img/icons/icon_soundcloud.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_stackoverflow.ico b/searx/static/themes/default/img/icons/icon_stackoverflow.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_twitter.ico b/searx/static/themes/default/img/icons/icon_twitter.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_vimeo.ico b/searx/static/themes/default/img/icons/icon_vimeo.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_wikipedia.ico b/searx/static/themes/default/img/icons/icon_wikipedia.ico
Binary files differ.
diff --git a/searx/static/default/img/icon_youtube.ico b/searx/static/themes/default/img/icons/icon_youtube.ico
Binary files differ.
diff --git a/searx/static/default/img/preference-icon.png b/searx/static/themes/default/img/preference-icon.png
Binary files differ.
diff --git a/searx/static/default/img/search-icon.png b/searx/static/themes/default/img/search-icon.png
Binary files differ.
diff --git a/searx/static/default/img/searx.png b/searx/static/themes/default/img/searx.png
Binary files differ.
diff --git a/searx/static/default/img/searx_logo.svg b/searx/static/themes/default/img/searx_logo.svg
diff --git a/searx/static/default/js/mootools-autocompleter-1.1.2-min.js b/searx/static/themes/default/js/mootools-autocompleter-1.1.2-min.js
diff --git a/searx/static/default/js/mootools-core-1.4.5-min.js b/searx/static/themes/default/js/mootools-core-1.4.5-min.js
diff --git a/searx/static/default/js/searx.js b/searx/static/themes/default/js/searx.js
diff --git a/searx/static/default/less/autocompleter.less b/searx/static/themes/default/less/autocompleter.less
diff --git a/searx/static/default/less/code.less b/searx/static/themes/default/less/code.less
diff --git a/searx/static/default/less/definitions.less b/searx/static/themes/default/less/definitions.less
diff --git a/searx/static/default/less/mixins.less b/searx/static/themes/default/less/mixins.less
diff --git a/searx/static/default/less/search.less b/searx/static/themes/default/less/search.less
diff --git a/searx/static/default/less/style.less b/searx/static/themes/default/less/style.less
diff --git a/searx/static/oscar/.gitignore b/searx/static/themes/oscar/.gitignore
diff --git a/searx/static/themes/oscar/README.rst b/searx/static/themes/oscar/README.rst
@@ -0,0 +1,17 @@
+install dependencies
+~~~~~~~~~~~~~~~~~~~~
+
+run this command in the directory ``searx/static/themes/oscar``
+
+``npm install``
+
+compile sources
+~~~~~~~~~~~~~~~
+
+run this command in the directory ``searx/static/themes/oscar``
+
+``grunt``
+
+or in the root directory:
+
+``make grunt``
diff --git a/searx/static/oscar/css/bootstrap.min.css b/searx/static/themes/oscar/css/bootstrap.min.css
diff --git a/searx/static/oscar/css/leaflet.min.css b/searx/static/themes/oscar/css/leaflet.min.css
diff --git a/searx/static/oscar/css/oscar.min.css b/searx/static/themes/oscar/css/oscar.min.css
diff --git a/searx/static/oscar/fonts/glyphicons-halflings-regular.eot b/searx/static/themes/oscar/fonts/glyphicons-halflings-regular.eot
Binary files differ.
diff --git a/searx/static/oscar/fonts/glyphicons-halflings-regular.svg b/searx/static/themes/oscar/fonts/glyphicons-halflings-regular.svg
diff --git a/searx/static/oscar/fonts/glyphicons-halflings-regular.ttf b/searx/static/themes/oscar/fonts/glyphicons-halflings-regular.ttf
Binary files differ.
diff --git a/searx/static/oscar/fonts/glyphicons-halflings-regular.woff b/searx/static/themes/oscar/fonts/glyphicons-halflings-regular.woff
Binary files differ.
diff --git a/searx/static/oscar/gruntfile.js b/searx/static/themes/oscar/gruntfile.js
diff --git a/searx/static/oscar/img/favicon.png b/searx/static/themes/oscar/img/favicon.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/README.md b/searx/static/themes/oscar/img/icons/README.md
diff --git a/searx/static/oscar/img/icons/amazon.png b/searx/static/themes/oscar/img/icons/amazon.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/dailymotion.png b/searx/static/themes/oscar/img/icons/dailymotion.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/deviantart.png b/searx/static/themes/oscar/img/icons/deviantart.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/facebook.png b/searx/static/themes/oscar/img/icons/facebook.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/flickr.png b/searx/static/themes/oscar/img/icons/flickr.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/github.png b/searx/static/themes/oscar/img/icons/github.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/kickass.png b/searx/static/themes/oscar/img/icons/kickass.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/icons/openstreetmap.png b/searx/static/themes/oscar/img/icons/openstreetmap.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/icons/photon.png b/searx/static/themes/oscar/img/icons/photon.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/icons/searchcode code.png b/searx/static/themes/oscar/img/icons/searchcode code.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/icons/searchcode doc.png b/searx/static/themes/oscar/img/icons/searchcode doc.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/soundcloud.png b/searx/static/themes/oscar/img/icons/soundcloud.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/stackoverflow.png b/searx/static/themes/oscar/img/icons/stackoverflow.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/twitter.png b/searx/static/themes/oscar/img/icons/twitter.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/vimeo.png b/searx/static/themes/oscar/img/icons/vimeo.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/wikipedia.png b/searx/static/themes/oscar/img/icons/wikipedia.png
Binary files differ.
diff --git a/searx/static/oscar/img/icons/youtube.png b/searx/static/themes/oscar/img/icons/youtube.png
Binary files differ.
diff --git a/searx/static/oscar/img/loader.gif b/searx/static/themes/oscar/img/loader.gif
Binary files differ.
diff --git a/searx/static/oscar/img/map/layers-2x.png b/searx/static/themes/oscar/img/map/layers-2x.png
Binary files differ.
diff --git a/searx/static/oscar/img/map/layers.png b/searx/static/themes/oscar/img/map/layers.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/map/marker-icon-2x-green.png b/searx/static/themes/oscar/img/map/marker-icon-2x-green.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/map/marker-icon-2x-orange.png b/searx/static/themes/oscar/img/map/marker-icon-2x-orange.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/map/marker-icon-2x-red.png b/searx/static/themes/oscar/img/map/marker-icon-2x-red.png
Binary files differ.
diff --git a/searx/static/oscar/img/map/marker-icon-2x.png b/searx/static/themes/oscar/img/map/marker-icon-2x.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/map/marker-icon-green.png b/searx/static/themes/oscar/img/map/marker-icon-green.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/map/marker-icon-orange.png b/searx/static/themes/oscar/img/map/marker-icon-orange.png
Binary files differ.
diff --git a/searx/static/themes/oscar/img/map/marker-icon-red.png b/searx/static/themes/oscar/img/map/marker-icon-red.png
Binary files differ.
diff --git a/searx/static/oscar/img/map/marker-icon.png b/searx/static/themes/oscar/img/map/marker-icon.png
Binary files differ.
diff --git a/searx/static/oscar/img/map/marker-shadow.png b/searx/static/themes/oscar/img/map/marker-shadow.png
Binary files differ.
diff --git a/searx/static/oscar/img/searx_logo.png b/searx/static/themes/oscar/img/searx_logo.png
Binary files differ.
diff --git a/searx/static/oscar/js/bootstrap.min.js b/searx/static/themes/oscar/js/bootstrap.min.js
diff --git a/searx/static/oscar/js/html5shiv.min.js b/searx/static/themes/oscar/js/html5shiv.min.js
diff --git a/searx/static/oscar/js/jquery-1.11.1.min.js b/searx/static/themes/oscar/js/jquery-1.11.1.min.js
diff --git a/searx/static/oscar/js/leaflet-0.7.3.min.js b/searx/static/themes/oscar/js/leaflet-0.7.3.min.js
diff --git a/searx/static/oscar/js/require-2.1.15.min.js b/searx/static/themes/oscar/js/require-2.1.15.min.js
diff --git a/searx/static/oscar/js/respond.min.js b/searx/static/themes/oscar/js/respond.min.js
diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js
@@ -0,0 +1,2 @@
+/*! oscar/searx.min.js | 09-01-2015 | https://github.com/asciimoo/searx */
+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)})});
+\ No newline at end of file
diff --git a/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js b/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js
@@ -0,0 +1,23 @@
+/**
+ * searx is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * searx is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
+ *
+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
+ */
+
+requirejs.config({
+ baseUrl: './static/themes/oscar/js',
+ paths: {
+ app: '../app'
+ }
+});
diff --git a/searx/static/oscar/js/searx_src/autocompleter.js b/searx/static/themes/oscar/js/searx_src/autocompleter.js
diff --git a/searx/static/themes/oscar/js/searx_src/element_modifiers.js b/searx/static/themes/oscar/js/searx_src/element_modifiers.js
@@ -0,0 +1,99 @@
+/**
+ * searx is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * searx is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
+ *
+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
+ */
+
+$(document).ready(function(){
+ /**
+ * focus element if class="autofocus" and id="q"
+ */
+ $('#q.autofocus').focus();
+
+ /**
+ * select full content on click if class="select-all-on-click"
+ */
+ $(".select-all-on-click").click(function () {
+ $(this).select();
+ });
+
+ /**
+ * change text during btn-collapse click if possible
+ */
+ $('.btn-collapse').click(function() {
+ var btnTextCollapsed = $(this).data('btn-text-collapsed');
+ var btnTextNotCollapsed = $(this).data('btn-text-not-collapsed');
+
+ if(btnTextCollapsed !== '' && btnTextNotCollapsed !== '') {
+ if($(this).hasClass('collapsed')) {
+ new_html = $(this).html().replace(btnTextCollapsed, btnTextNotCollapsed);
+ } else {
+ new_html = $(this).html().replace(btnTextNotCollapsed, btnTextCollapsed);
+ }
+ $(this).html(new_html);
+ }
+ });
+
+ /**
+ * change text during btn-toggle click if possible
+ */
+ $('.btn-toggle .btn').click(function() {
+ var btnClass = 'btn-' + $(this).data('btn-class');
+ var btnLabelDefault = $(this).data('btn-label-default');
+ var btnLabelToggled = $(this).data('btn-label-toggled');
+ if(btnLabelToggled !== '') {
+ if($(this).hasClass('btn-default')) {
+ new_html = $(this).html().replace(btnLabelDefault, btnLabelToggled);
+ } else {
+ new_html = $(this).html().replace(btnLabelToggled, btnLabelDefault);
+ }
+ $(this).html(new_html);
+ }
+ $(this).toggleClass(btnClass);
+ $(this).toggleClass('btn-default');
+ });
+
+ /**
+ * change text during btn-toggle click if possible
+ */
+ $('.media-loader').click(function() {
+ var target = $(this).data('target');
+ var iframe_load = $(target + ' > iframe');
+ var srctest = iframe_load.attr('src');
+ if(srctest === undefined || srctest === false){
+ iframe_load.attr('src', iframe_load.data('src'));
+ }
+ });
+
+ /**
+ * Select or deselect every categories on double clic
+ */
+ $(".btn-sm").dblclick(function() {
+ var btnClass = 'btn-' + $(this).data('btn-class'); // primary
+ if($(this).hasClass('btn-default')) {
+ $(".btn-sm > input").attr('checked', 'checked');
+ $(".btn-sm > input").prop("checked", true);
+ $(".btn-sm").addClass(btnClass);
+ $(".btn-sm").addClass('active');
+ $(".btn-sm").removeClass('btn-default');
+ } else {
+ $(".btn-sm > input").attr('checked', '');
+ $(".btn-sm > input").removeAttr('checked');
+ $(".btn-sm > input").checked = false;
+ $(".btn-sm").removeClass(btnClass);
+ $(".btn-sm").removeClass('active');
+ $(".btn-sm").addClass('btn-default');
+ }
+ });
+});
diff --git a/searx/static/themes/oscar/js/searx_src/leaflet_map.js b/searx/static/themes/oscar/js/searx_src/leaflet_map.js
@@ -0,0 +1,172 @@
+/**
+ * searx is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * searx is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with searx. If not, see < http://www.gnu.org/licenses/ >.
+ *
+ * (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
+ */
+
+$(document).ready(function(){
+ $(".searx_overpass_request").on( "click", function( event ) {
+ var overpass_url = "https://overpass-api.de/api/interpreter?data=";
+ var query_start = overpass_url + "[out:json][timeout:25];(";
+ var query_end = ");out meta;";
+
+ var osm_id = $(this).data('osm-id');
+ var osm_type = $(this).data('osm-type');
+ var result_table = $(this).data('result-table');
+ var result_table_loadicon = "#" + $(this).data('result-table-loadicon');
+
+ // tags which can be ignored
+ var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
+
+ if(osm_id && osm_type && result_table) {
+ result_table = "#" + result_table;
+ var query = null;
+ switch(osm_type) {
+ case 'node':
+ query = query_start + "node(" + osm_id + ");" + query_end;
+ break;
+ case 'way':
+ query = query_start + "way(" + osm_id + ");" + query_end;
+ break;
+ case 'relation':
+ query = query_start + "relation(" + osm_id + ");" + query_end;
+ break;
+ default:
+ break;
+ }
+ if(query) {
+ //alert(query);
+ var ajaxRequest = $.ajax( query )
+ .done(function( html) {
+ if(html && html.elements && html.elements[0]) {
+ var element = html.elements[0];
+ var newHtml = $(result_table).html();
+ for (var row in element.tags) {
+ if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
+ newHtml += "<tr><td>" + row + "</td><td>";
+ switch(row) {
+ case "phone":
+ case "fax":
+ newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
+ break;
+ case "email":
+ newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "website":
+ case "url":
+ newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "wikidata":
+ newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "wikipedia":
+ if(element.tags[row].indexOf(":") != -1) {
+ newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
+ break;
+ }
+ /* jshint ignore:start */
+ default:
+ /* jshint ignore:end */
+ newHtml += element.tags[row];
+ break;
+ }
+ newHtml += "</td></tr>";
+ }
+ }
+ $(result_table).html(newHtml);
+ $(result_table).removeClass('hidden');
+ $(result_table_loadicon).addClass('hidden');
+ }
+ })
+ .fail(function() {
+ $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
+ });
+ }
+ }
+
+ // this event occour only once per element
+ $( this ).off( event );
+ });
+
+ $(".searx_init_map").on( "click", function( event ) {
+ var leaflet_target = $(this).data('leaflet-target');
+ var map_lon = $(this).data('map-lon');
+ var map_lat = $(this).data('map-lat');
+ var map_zoom = $(this).data('map-zoom');
+ var map_boundingbox = $(this).data('map-boundingbox');
+ var map_geojson = $(this).data('map-geojson');
+
+ require(['leaflet-0.7.3.min'], function(leaflet) {
+ if(map_boundingbox) {
+ southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
+ northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
+ map_bounds = L.latLngBounds(southWest, northEast);
+ }
+
+ // TODO hack
+ // change default imagePath
+ L.Icon.Default.imagePath = "./static/themes/oscar/img/map";
+
+ // init map
+ var map = L.map(leaflet_target);
+
+ // create the tile layer with correct attribution
+ var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
+ var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
+ var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
+
+ var osmMapquestUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg';
+ var osmMapquestAttrib='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">';
+ var osmMapquest = new L.TileLayer(osmMapquestUrl, {minZoom: 1, maxZoom: 18, subdomains: '1234', attribution: osmMapquestAttrib});
+
+ var osmMapquestOpenAerialUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg';
+ var osmMapquestOpenAerialAttrib='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';
+ var osmMapquestOpenAerial = new L.TileLayer(osmMapquestOpenAerialUrl, {minZoom: 1, maxZoom: 11, subdomains: '1234', attribution: osmMapquestOpenAerialAttrib});
+
+ // init map view
+ if(map_bounds) {
+ // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
+ setTimeout(function () {
+ map.fitBounds(map_bounds, {
+ maxZoom:17
+ });
+ }, 0);
+ } else if (map_lon && map_lat) {
+ if(map_zoom)
+ map.setView(new L.LatLng(map_lat, map_lon),map_zoom);
+ else
+ map.setView(new L.LatLng(map_lat, map_lon),8);
+ }
+
+ map.addLayer(osmMapquest);
+
+ var baseLayers = {
+ "OSM Mapnik": osmMapnik,
+ "MapQuest": osmMapquest/*,
+ "MapQuest Open Aerial": osmMapquestOpenAerial*/
+ };
+
+ L.control.layers(baseLayers).addTo(map);
+
+
+ if(map_geojson)
+ L.geoJson(map_geojson).addTo(map);
+ /*else if(map_bounds)
+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/
+ });
+
+ // this event occour only once per element
+ $( this ).off( event );
+ });
+});
diff --git a/searx/static/oscar/js/typeahead.bundle.min.js b/searx/static/themes/oscar/js/typeahead.bundle.min.js
diff --git a/searx/static/oscar/less/bootstrap/.csscomb.json b/searx/static/themes/oscar/less/bootstrap/.csscomb.json
diff --git a/searx/static/oscar/less/bootstrap/.csslintrc b/searx/static/themes/oscar/less/bootstrap/.csslintrc
diff --git a/searx/static/oscar/less/bootstrap/alerts.less b/searx/static/themes/oscar/less/bootstrap/alerts.less
diff --git a/searx/static/oscar/less/bootstrap/badges.less b/searx/static/themes/oscar/less/bootstrap/badges.less
diff --git a/searx/static/oscar/less/bootstrap/bootstrap.less b/searx/static/themes/oscar/less/bootstrap/bootstrap.less
diff --git a/searx/static/oscar/less/bootstrap/breadcrumbs.less b/searx/static/themes/oscar/less/bootstrap/breadcrumbs.less
diff --git a/searx/static/oscar/less/bootstrap/button-groups.less b/searx/static/themes/oscar/less/bootstrap/button-groups.less
diff --git a/searx/static/oscar/less/bootstrap/buttons.less b/searx/static/themes/oscar/less/bootstrap/buttons.less
diff --git a/searx/static/oscar/less/bootstrap/carousel.less b/searx/static/themes/oscar/less/bootstrap/carousel.less
diff --git a/searx/static/oscar/less/bootstrap/close.less b/searx/static/themes/oscar/less/bootstrap/close.less
diff --git a/searx/static/oscar/less/bootstrap/code.less b/searx/static/themes/oscar/less/bootstrap/code.less
diff --git a/searx/static/oscar/less/bootstrap/component-animations.less b/searx/static/themes/oscar/less/bootstrap/component-animations.less
diff --git a/searx/static/oscar/less/bootstrap/dropdowns.less b/searx/static/themes/oscar/less/bootstrap/dropdowns.less
diff --git a/searx/static/oscar/less/bootstrap/forms.less b/searx/static/themes/oscar/less/bootstrap/forms.less
diff --git a/searx/static/oscar/less/bootstrap/glyphicons.less b/searx/static/themes/oscar/less/bootstrap/glyphicons.less
diff --git a/searx/static/oscar/less/bootstrap/grid.less b/searx/static/themes/oscar/less/bootstrap/grid.less
diff --git a/searx/static/oscar/less/bootstrap/input-groups.less b/searx/static/themes/oscar/less/bootstrap/input-groups.less
diff --git a/searx/static/oscar/less/bootstrap/jumbotron.less b/searx/static/themes/oscar/less/bootstrap/jumbotron.less
diff --git a/searx/static/oscar/less/bootstrap/labels.less b/searx/static/themes/oscar/less/bootstrap/labels.less
diff --git a/searx/static/oscar/less/bootstrap/list-group.less b/searx/static/themes/oscar/less/bootstrap/list-group.less
diff --git a/searx/static/oscar/less/bootstrap/media.less b/searx/static/themes/oscar/less/bootstrap/media.less
diff --git a/searx/static/oscar/less/bootstrap/mixins.less b/searx/static/themes/oscar/less/bootstrap/mixins.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/alerts.less b/searx/static/themes/oscar/less/bootstrap/mixins/alerts.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/background-variant.less b/searx/static/themes/oscar/less/bootstrap/mixins/background-variant.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/border-radius.less b/searx/static/themes/oscar/less/bootstrap/mixins/border-radius.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/buttons.less b/searx/static/themes/oscar/less/bootstrap/mixins/buttons.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/center-block.less b/searx/static/themes/oscar/less/bootstrap/mixins/center-block.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/clearfix.less b/searx/static/themes/oscar/less/bootstrap/mixins/clearfix.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/forms.less b/searx/static/themes/oscar/less/bootstrap/mixins/forms.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/gradients.less b/searx/static/themes/oscar/less/bootstrap/mixins/gradients.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/grid-framework.less b/searx/static/themes/oscar/less/bootstrap/mixins/grid-framework.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/grid.less b/searx/static/themes/oscar/less/bootstrap/mixins/grid.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/hide-text.less b/searx/static/themes/oscar/less/bootstrap/mixins/hide-text.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/image.less b/searx/static/themes/oscar/less/bootstrap/mixins/image.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/labels.less b/searx/static/themes/oscar/less/bootstrap/mixins/labels.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/list-group.less b/searx/static/themes/oscar/less/bootstrap/mixins/list-group.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/nav-divider.less b/searx/static/themes/oscar/less/bootstrap/mixins/nav-divider.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/nav-vertical-align.less b/searx/static/themes/oscar/less/bootstrap/mixins/nav-vertical-align.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/opacity.less b/searx/static/themes/oscar/less/bootstrap/mixins/opacity.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/pagination.less b/searx/static/themes/oscar/less/bootstrap/mixins/pagination.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/panels.less b/searx/static/themes/oscar/less/bootstrap/mixins/panels.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/progress-bar.less b/searx/static/themes/oscar/less/bootstrap/mixins/progress-bar.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/reset-filter.less b/searx/static/themes/oscar/less/bootstrap/mixins/reset-filter.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/resize.less b/searx/static/themes/oscar/less/bootstrap/mixins/resize.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/responsive-visibility.less b/searx/static/themes/oscar/less/bootstrap/mixins/responsive-visibility.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/size.less b/searx/static/themes/oscar/less/bootstrap/mixins/size.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/tab-focus.less b/searx/static/themes/oscar/less/bootstrap/mixins/tab-focus.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/table-row.less b/searx/static/themes/oscar/less/bootstrap/mixins/table-row.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/text-emphasis.less b/searx/static/themes/oscar/less/bootstrap/mixins/text-emphasis.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/text-overflow.less b/searx/static/themes/oscar/less/bootstrap/mixins/text-overflow.less
diff --git a/searx/static/oscar/less/bootstrap/mixins/vendor-prefixes.less b/searx/static/themes/oscar/less/bootstrap/mixins/vendor-prefixes.less
diff --git a/searx/static/oscar/less/bootstrap/modals.less b/searx/static/themes/oscar/less/bootstrap/modals.less
diff --git a/searx/static/oscar/less/bootstrap/navbar.less b/searx/static/themes/oscar/less/bootstrap/navbar.less
diff --git a/searx/static/oscar/less/bootstrap/navs.less b/searx/static/themes/oscar/less/bootstrap/navs.less
diff --git a/searx/static/oscar/less/bootstrap/normalize.less b/searx/static/themes/oscar/less/bootstrap/normalize.less
diff --git a/searx/static/oscar/less/bootstrap/pager.less b/searx/static/themes/oscar/less/bootstrap/pager.less
diff --git a/searx/static/oscar/less/bootstrap/pagination.less b/searx/static/themes/oscar/less/bootstrap/pagination.less
diff --git a/searx/static/oscar/less/bootstrap/panels.less b/searx/static/themes/oscar/less/bootstrap/panels.less
diff --git a/searx/static/oscar/less/bootstrap/popovers.less b/searx/static/themes/oscar/less/bootstrap/popovers.less
diff --git a/searx/static/oscar/less/bootstrap/print.less b/searx/static/themes/oscar/less/bootstrap/print.less
diff --git a/searx/static/oscar/less/bootstrap/progress-bars.less b/searx/static/themes/oscar/less/bootstrap/progress-bars.less
diff --git a/searx/static/oscar/less/bootstrap/responsive-embed.less b/searx/static/themes/oscar/less/bootstrap/responsive-embed.less
diff --git a/searx/static/oscar/less/bootstrap/responsive-utilities.less b/searx/static/themes/oscar/less/bootstrap/responsive-utilities.less
diff --git a/searx/static/oscar/less/bootstrap/scaffolding.less b/searx/static/themes/oscar/less/bootstrap/scaffolding.less
diff --git a/searx/static/oscar/less/bootstrap/tables.less b/searx/static/themes/oscar/less/bootstrap/tables.less
diff --git a/searx/static/oscar/less/bootstrap/theme.less b/searx/static/themes/oscar/less/bootstrap/theme.less
diff --git a/searx/static/oscar/less/bootstrap/thumbnails.less b/searx/static/themes/oscar/less/bootstrap/thumbnails.less
diff --git a/searx/static/oscar/less/bootstrap/tooltip.less b/searx/static/themes/oscar/less/bootstrap/tooltip.less
diff --git a/searx/static/oscar/less/bootstrap/type.less b/searx/static/themes/oscar/less/bootstrap/type.less
diff --git a/searx/static/oscar/less/bootstrap/typeahead.less b/searx/static/themes/oscar/less/bootstrap/typeahead.less
diff --git a/searx/static/oscar/less/bootstrap/utilities.less b/searx/static/themes/oscar/less/bootstrap/utilities.less
diff --git a/searx/static/oscar/less/bootstrap/variables.less b/searx/static/themes/oscar/less/bootstrap/variables.less
diff --git a/searx/static/oscar/less/bootstrap/wells.less b/searx/static/themes/oscar/less/bootstrap/wells.less
diff --git a/searx/static/oscar/less/oscar/checkbox.less b/searx/static/themes/oscar/less/oscar/checkbox.less
diff --git a/searx/static/oscar/less/oscar/code.less b/searx/static/themes/oscar/less/oscar/code.less
diff --git a/searx/static/oscar/less/oscar/cursor.less b/searx/static/themes/oscar/less/oscar/cursor.less
diff --git a/searx/static/oscar/less/oscar/footer.less b/searx/static/themes/oscar/less/oscar/footer.less
diff --git a/searx/static/oscar/less/oscar/infobox.less b/searx/static/themes/oscar/less/oscar/infobox.less
diff --git a/searx/static/oscar/less/oscar/oscar.less b/searx/static/themes/oscar/less/oscar/oscar.less
diff --git a/searx/static/oscar/less/oscar/results.less b/searx/static/themes/oscar/less/oscar/results.less
diff --git a/searx/static/oscar/less/oscar/search.less b/searx/static/themes/oscar/less/oscar/search.less
diff --git a/searx/static/oscar/package.json b/searx/static/themes/oscar/package.json
diff --git a/searx/templates/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html
@@ -1,7 +1,7 @@
<div class="result {{ result.class }}">
- {% if result['favicon'] %}
- <img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />
+ {% if "icon_"~result.engine~".ico" in favicons %}
+ <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
<div>
diff --git a/searx/templates/courgette/result_templates/map.html b/searx/templates/courgette/result_templates/map.html
@@ -1,7 +1,7 @@
<div class="result {{ result.class }}">
- {% if result['favicon'] %}
- <img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />
+ {% if "icon_"~result.engine~".ico" in favicons %}
+ <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
<div>
diff --git a/searx/templates/courgette/result_templates/videos.html b/searx/templates/courgette/result_templates/videos.html
@@ -1,6 +1,6 @@
<div class="result">
- {% if result['favicon'] %}
- <img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />
+ {% if "icon_"~result.engine~".ico" in favicons %}
+ <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
diff --git a/searx/templates/courgette/results.html b/searx/templates/courgette/results.html
@@ -43,7 +43,7 @@
{% for result in results %}
{% if result['template'] %}
- {% include 'courgette/result_templates/'+result['template'] %}
+ {% include get_result_template('courgette', result['template']) %}
{% else %}
{% include 'courgette/result_templates/default.html' %}
{% endif %}
diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html
@@ -1,5 +1,5 @@
<div class="result {{ result.class }}">
- <h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
+ <h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
<p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
<p class="content">{% if result.img_src %}<img src="{{ result.img_src }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/default/result_templates/map.html
@@ -1,7 +1,7 @@
<div class="result {{ result.class }}">
- {% if result['favicon'] %}
- <img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />
+ {% if "icon_"~result.engine~".ico" in favicons %}
+ <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
{% endif %}
<div>
diff --git a/searx/templates/default/result_templates/torrent.html b/searx/templates/default/result_templates/torrent.html
@@ -1,4 +1,7 @@
<div class="result torrent_result">
+ {% if "icon_"~result.engine~".ico" in favicons %}
+ <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
+ {% endif %}
<h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
<p class="url">{{ result.pretty_url }}</p>
{% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/default/result_templates/videos.html
@@ -1,5 +1,5 @@
<div class="result">
- <h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
+ <h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
<a href="{{ result.url }}"><img class="thumbnail" src="{{ result.thumbnail }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
<p class="url">{{ result.url }}</p>
diff --git a/searx/templates/default/results.html b/searx/templates/default/results.html
@@ -59,7 +59,7 @@
{% for result in results %}
{% if result['template'] %}
- {% include 'default/result_templates/'+result['template'] %}
+ {% include get_result_template('default', result['template']) %}
{% else %}
{% include 'default/result_templates/default.html' %}
{% endif %}
diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html
@@ -6,12 +6,12 @@
<!-- Draw favicon -->
<!-- TODO: using url_for methode -->
{% macro draw_favicon(favicon) -%}
- <img width="32" height="32" class="favicon" src="static/oscar/img/icons/{{ favicon }}.png" alt="{{ favicon }}" />
+ <img width="32" height="32" class="favicon" src="static/themes/oscar/img/icons/{{ favicon }}.png" alt="{{ favicon }}" />
{%- endmacro %}
<!-- Draw result header -->
-{% macro result_header(result) -%}
- <h4 class="result_header">{% if result.favicon %}{{ draw_favicon(result.favicon) }} {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h4>
+{% macro result_header(result, favicons) -%}
+ <h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h4>
{%- endmacro %}
<!-- Draw result sub header -->
diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html
@@ -1,6 +1,6 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
-{{ result_header(result) }}
+{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html
@@ -1,8 +1,20 @@
-{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer %}
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
-{{ result_header(result) }}
+{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
+{% if result.embedded %}
+ <small> • <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>
+{% endif %}
+
+{% if result.embedded %}
+<div id="result-media-{{ index }}" class="collapse">
+{% autoescape false %}
+ {{ result.embedded }}
+{% endautoescape %}
+</div>
+{% endif %}
+
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
{{ result_footer(result) }}
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html
@@ -9,7 +9,7 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
- <h4 class="modal-title">{% if result['favicon'] %}{{ draw_favicon(result['favicon']) }} {% endif %}{{ result.title|striptags }}</h4>
+ <h4 class="modal-title">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result.title|striptags }}</h4>
</div>
<div class="modal-body">
<img class="img-responsive center-block" src="{{ result.img_src }}" alt="{{ result.title }}">
diff --git a/searx/templates/oscar/result_templates/map.html b/searx/templates/oscar/result_templates/map.html
@@ -1,6 +1,6 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
-{{ result_header(result) }}
+{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
{% if (result.latitude and result.longitude) or result.boundingbox %}
diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html
@@ -1,6 +1,6 @@
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
-{{ result_header(result) }}
+{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
<p class="result-content">{{ icon('transfer') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span>, {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>
diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html
@@ -1,11 +1,23 @@
-{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer %}
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
-{{ result_header(result) }}
+{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
+{% if result.embedded %}
+ <small> • <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>
+{% endif %}
+
+{% if result.embedded %}
+<div id="result-video-{{ index }}" class="collapse">
+{% autoescape false %}
+ {{ result.embedded }}
+{% endautoescape %}
+</div>
+{% endif %}
+
<div class="container-fluid">
<div class="row">
- <img class="thumbnail col-xs-6 col-sm-4 col-md-4 result-content" src="{{ result.thumbnail|safe }}" alt="{{ result.title|urlencode }} {{ result['favicon'] }}" />
+ <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>
{% if result.content %}<p class="col-xs-12 col-sm-8 col-md-8 result-content">{{ result.content|safe }}</p>{% endif %}
</div>
</div>
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
@@ -17,7 +17,11 @@
{% for result in results %}
<div class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %}">
{% set index = loop.index %}
- {% if result.template %}{% include 'oscar/result_templates/'+result['template'] %}{% else %}{% include 'oscar/result_templates/default.html' %}{% endif %}
+ {% if result.template %}
+ {% include get_result_template('oscar', result['template']) %}
+ {% else %}
+ {% include 'oscar/result_templates/default.html' %}
+ {% endif %}
</div>
{% endfor %}
diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py
@@ -49,7 +49,7 @@ class ViewsTestCase(SearxTestCase):
)
result = self.app.post('/', data={'q': 'test'})
self.assertIn(
- '<h3 class="result_title"> <img width="14" height="14" class="favicon" src="static/default/img/icon_youtube.ico" alt="youtube" /><a href="http://first.test.xyz">First <span class="highlight">Test</span></a></h3>', # noqa
+ '<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/default/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz">Second <span class="highlight">Test</span></a></h3>', # noqa
result.data
)
self.assertIn(
diff --git a/searx/translations/de/LC_MESSAGES/messages.mo b/searx/translations/de/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/de/LC_MESSAGES/messages.po b/searx/translations/de/LC_MESSAGES/messages.po
@@ -4,14 +4,14 @@
#
# Translators:
# pointhi, 2014
-# stf <stefan.marsiske@gmail.com>, 2014
# rike, 2014
+# stf <stefan.marsiske@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
-"PO-Revision-Date: 2014-03-15 18:40+0000\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-12-27 10:30+0000\n"
"Last-Translator: pointhi\n"
"Language-Team: German "
"(http://www.transifex.com/projects/p/searx/language/de/)\n"
@@ -21,31 +21,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
msgstr "vor {minutes} Minute(n)"
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr "vor {hours} Stunde(n), {minutes} Minute(n)"
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr "Ladezeit (sek)"
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr "Trefferanzahl"
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr "Punkte"
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr "Punkte pro Treffer"
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
msgstr "Fehler"
@@ -125,22 +125,22 @@ msgstr "Kategorie"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr "Erlauben"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr "Blockieren"
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -150,54 +150,54 @@ msgstr ""
"damit wir keine Ihrer persönlichen Daten speichern müssen."
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
"track you."
msgstr ""
-"Diese Cookies dienen einzig Ihrem Komfort, wir verwenden sie nicht, um "
+"Diese Cookies dienen einzig Ihrem Komfort. Wir verwenden sie nicht, um "
"Sie zu überwachen."
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
msgstr "Speichern"
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
msgstr "Zurück"
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr "Such-URL"
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
msgstr "Ergebnisse herunterladen"
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr "Vorschläge"
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr "vorherige Seite"
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr "nächste Seite"
@@ -210,39 +210,27 @@ msgstr "Suche nach..."
#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
#: searx/templates/oscar/stats.html:5
msgid "Engine stats"
-msgstr "Suchmaschinenstatistik"
+msgstr "Suchmaschinenstatistiken"
#: searx/templates/default/categories.html:8
msgid "Click on the magnifier to perform search"
-msgstr ""
-
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
+msgstr "klicke auf die Lupe, um die Suche zu starten"
#: searx/templates/default/results.html:34
msgid "Answers"
-msgstr ""
+msgstr "Antworten"
#: searx/templates/oscar/base.html:69
msgid "Powered by"
-msgstr ""
+msgstr "Powered by"
#: searx/templates/oscar/base.html:69
msgid "a privacy-respecting, hackable metasearch engine"
-msgstr "eine privatsphären respektierende, hackbare Metasuchmaschine"
+msgstr "eine privatsphären-respektierende, hackbare Metasuchmaschine"
#: searx/templates/oscar/navbar.html:6
msgid "Toggle navigation"
-msgstr ""
+msgstr "Navigation umschalten"
#: searx/templates/oscar/navbar.html:15
msgid "home"
@@ -260,15 +248,15 @@ msgstr "Suchmaschinen"
#: searx/templates/oscar/preferences.html:39
msgid "What language do you prefer for search?"
-msgstr "Welche Sprache bevorzugst du für die Suche?"
+msgstr "welche Sprache bevorzugst du für die Suche?"
#: searx/templates/oscar/preferences.html:50
msgid "Change the language of the layout"
-msgstr "Ändere die Sprache des Layouts"
+msgstr "ändere die Sprache des Layouts"
#: searx/templates/oscar/preferences.html:63
msgid "Find stuff as you type"
-msgstr "finde Sachen während der Eingabe"
+msgstr "zeige Vorschläge während der Eingabe an"
#: searx/templates/oscar/preferences.html:73
msgid ""
@@ -288,9 +276,9 @@ msgstr "ändere das Aussehen von searx"
msgid "Search results"
msgstr "Suchergebnisse"
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
-msgstr ""
+msgstr "Links"
#: searx/templates/oscar/search.html:6 searx/templates/oscar/search_full.html:7
msgid "Start search"
@@ -302,7 +290,7 @@ msgstr "Suchfilter anzeigen"
#: searx/templates/oscar/search_full.html:11
msgid "Hide search filters"
-msgstr "Suchfilter verstecke"
+msgstr "Suchfilter verstecken"
#: searx/templates/oscar/stats.html:2
msgid "stats"
@@ -318,11 +306,11 @@ msgstr "Schließen"
#: searx/templates/oscar/messages/first_time.html:6
#: searx/templates/oscar/messages/no_data_available.html:3
msgid "Heads up!"
-msgstr "Information!"
+msgstr "Achtung!"
#: searx/templates/oscar/messages/first_time.html:7
msgid "It look like you are using searx first time."
-msgstr ""
+msgstr "Es sieht so aus, als ob das erstes mal mit searx arbeitest."
#: searx/templates/oscar/messages/js_disabled.html:2
msgid "Warning!"
@@ -330,7 +318,7 @@ msgstr "Warnung!"
#: searx/templates/oscar/messages/js_disabled.html:3
msgid "Please enable JavaScript to use full functionality of this site."
-msgstr "Bitte aktiviere JavaScript um alle möglichkeiten dieser Seite zu nutzen."
+msgstr "Bitte aktiviere JavaScript, um alle Funktionen dieser Seite zu nutzen. "
#: searx/templates/oscar/messages/no_data_available.html:4
msgid "There is currently no data available. "
@@ -346,7 +334,8 @@ msgid ""
"categories."
msgstr ""
"Es konnten keine Suchergebnisse gefunden werden. Bitte nutze einen "
-"anderen Suchbegriff oder Suche das gewünschte in einer anderen Kategorie."
+"anderen Suchbegriff, oder suche das gewünschte in einer anderen "
+"Kategorie. "
#: searx/templates/oscar/messages/save_settings_successfull.html:7
msgid "Well done!"
@@ -358,7 +347,7 @@ msgstr "Einstellungen wurden erfolgreich gespeichert."
#: searx/templates/oscar/messages/unknow_error.html:7
msgid "Oh snap!"
-msgstr "Verdammt!"
+msgstr "Oh nein!"
#: searx/templates/oscar/messages/unknow_error.html:8
msgid "Something went wrong."
@@ -369,7 +358,15 @@ msgstr "Irgendetwas ist falsch gelaufen."
#: searx/templates/oscar/result_templates/torrent.html:6
#: searx/templates/oscar/result_templates/videos.html:6
msgid "cached"
-msgstr "cached"
+msgstr "Im Cache"
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
+msgstr ""
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
@@ -393,16 +390,33 @@ msgstr "Details anzeigen"
#: searx/templates/oscar/result_templates/map.html:14
msgid "hide details"
-msgstr "Details verstecke"
+msgstr "Details verstecken"
#: searx/templates/oscar/result_templates/torrent.html:8
msgid "Seeder"
-msgstr ""
+msgstr "Seeder"
#: searx/templates/oscar/result_templates/torrent.html:8
msgid "Leecher"
+msgstr "Leecher"
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
msgstr ""
+msgid "Localization"
+msgstr "Übersetzung"
+
+msgid "Yes"
+msgstr "Ja"
+
+msgid "No"
+msgstr "Nein"
+
# categories - manually added
# TODO - automatically add
msgid "files"
diff --git a/searx/translations/en/LC_MESSAGES/messages.mo b/searx/translations/en/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/en/LC_MESSAGES/messages.po b/searx/translations/en/LC_MESSAGES/messages.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
"PO-Revision-Date: 2014-01-30 15:22+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: en <LL@li.org>\n"
@@ -17,31 +17,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
msgstr ""
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr ""
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr ""
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr ""
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr ""
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr ""
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
msgstr ""
@@ -121,22 +121,22 @@ msgstr ""
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr ""
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr ""
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -144,7 +144,7 @@ msgid ""
msgstr ""
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
@@ -152,44 +152,44 @@ msgid ""
msgstr ""
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
msgstr ""
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
msgstr ""
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr ""
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
msgstr ""
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr ""
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr ""
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr ""
@@ -208,18 +208,6 @@ msgstr ""
msgid "Click on the magnifier to perform search"
msgstr ""
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
-
#: searx/templates/default/results.html:34
msgid "Answers"
msgstr ""
@@ -277,7 +265,7 @@ msgstr ""
msgid "Search results"
msgstr ""
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
msgstr ""
@@ -358,6 +346,14 @@ msgstr ""
msgid "cached"
msgstr ""
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
+msgstr ""
+
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
msgstr ""
@@ -390,6 +386,23 @@ msgstr ""
msgid "Leecher"
msgstr ""
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr ""
+
+msgid "Localization"
+msgstr ""
+
+msgid "Yes"
+msgstr ""
+
+msgid "No"
+msgstr ""
+
# categories - manually added
# TODO - automatically add
msgid "files"
diff --git a/searx/translations/es/LC_MESSAGES/messages.mo b/searx/translations/es/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/es/LC_MESSAGES/messages.po b/searx/translations/es/LC_MESSAGES/messages.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
-"PO-Revision-Date: 2014-09-08 11:01+0000\n"
-"Last-Translator: Alejandro León Aznar\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-11-26 20:38+0000\n"
+"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
"Language-Team: Spanish "
"(http://www.transifex.com/projects/p/searx/language/es/)\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -19,31 +19,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
msgstr "hace {minutes} minuto(s)"
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr "hace {hours} hora(s) y {minutes} minuto(s)"
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr "Tiempo de carga (segundos)"
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr "Número de resultados"
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr "Puntuaciones"
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr "Puntuaciones por resultado"
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
msgstr "Errores"
@@ -92,19 +92,19 @@ msgstr "Idioma de la interfaz"
#: searx/templates/default/preferences.html:36
#: searx/templates/oscar/preferences.html:53
msgid "Autocomplete"
-msgstr ""
+msgstr "Autocompletar"
#: searx/templates/courgette/preferences.html:47
#: searx/templates/default/preferences.html:47
#: searx/templates/oscar/preferences.html:66
msgid "Method"
-msgstr ""
+msgstr "Método"
#: searx/templates/courgette/preferences.html:56
#: searx/templates/default/preferences.html:56
#: searx/templates/oscar/preferences.html:76
msgid "Themes"
-msgstr ""
+msgstr "Temas"
#: searx/templates/courgette/preferences.html:66
#: searx/templates/default/preferences.html:66
@@ -123,22 +123,22 @@ msgstr "Categoría"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr "Permitir"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr "Bloquear"
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -148,7 +148,7 @@ msgstr ""
"almacenar dicha información sobre usted."
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
@@ -158,44 +158,44 @@ msgstr ""
"rastrearle."
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
msgstr "Guardar"
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
msgstr "Atrás"
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr "Buscar URL"
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
msgstr "Descargar resultados"
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr "Sugerencias"
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr "Página anterior"
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr "Página siguiente"
@@ -214,18 +214,6 @@ msgstr "Estadísticas del motor de búsqueda"
msgid "Click on the magnifier to perform search"
msgstr ""
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
-
#: searx/templates/default/results.html:34
msgid "Answers"
msgstr ""
@@ -283,7 +271,7 @@ msgstr ""
msgid "Search results"
msgstr ""
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
msgstr ""
@@ -364,6 +352,14 @@ msgstr ""
msgid "cached"
msgstr ""
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
+msgstr ""
+
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
msgstr ""
@@ -396,6 +392,23 @@ msgstr ""
msgid "Leecher"
msgstr ""
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr ""
+
+msgid "Localization"
+msgstr ""
+
+msgid "Yes"
+msgstr ""
+
+msgid "No"
+msgstr ""
+
# categories - manually added
# TODO - automatically add
msgid "files"
@@ -407,15 +420,9 @@ msgstr "General"
msgid "music"
msgstr "Música"
-msgid "social media"
-msgstr "Medios sociales"
-
msgid "images"
msgstr "Imágenes"
-msgid "videos"
-msgstr "Vídeos"
-
msgid "it"
msgstr "TIC"
diff --git a/searx/translations/fr/LC_MESSAGES/messages.mo b/searx/translations/fr/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/fr/LC_MESSAGES/messages.po b/searx/translations/fr/LC_MESSAGES/messages.po
@@ -1,17 +1,19 @@
-# French translations for SEARX
-# Copyright (C) 2014 Benjamin Sonntag, rike, Adam Tauber
-# This file is distributed under CC0 License
+# English translations for .
+# Copyright (C) 2014 ORGANIZATION
+# This file is distributed under the same license as the project.
#
# Translators:
# Benjamin Sonntag <benjamin@sonntag.fr>, 2014
+# Cqoicebordel <david.barouh@wanadoo.fr>, 2014
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
# rike, 2014
msgid ""
msgstr ""
"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
-"PO-Revision-Date: 2014-09-07 21:24+0000\n"
-"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-12-14 21:00+0000\n"
+"Last-Translator: Cqoicebordel <david.barouh@wanadoo.fr>\n"
"Language-Team: French "
"(http://www.transifex.com/projects/p/searx/language/fr/)\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
@@ -20,31 +22,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
msgstr "il y a {minutes} minute(s)"
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr "il y a {hours} heure(s), {minutes} minute(s)"
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr "Chargement de la page (sec)"
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr "Nombre de résultats"
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr "Score"
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr "Score par résultat"
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
msgstr "Erreurs"
@@ -124,22 +126,22 @@ msgstr "Catégorie"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr "Autoriser"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr "Bloquer"
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -149,7 +151,7 @@ msgstr ""
" collecter vos données."
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
@@ -159,44 +161,44 @@ msgstr ""
"utilisons pas pour vous espionner."
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
msgstr "enregistrer"
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
msgstr "retour"
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr "URL de recherche"
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
msgstr "Télécharger les résultats"
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr "Suggestions"
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr "page précédente"
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr "page suivante"
@@ -213,19 +215,7 @@ msgstr "Statistiques du moteur"
#: searx/templates/default/categories.html:8
msgid "Click on the magnifier to perform search"
-msgstr ""
-
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
+msgstr "Cliquez sur la loupe pour effectuer une recherche"
#: searx/templates/default/results.html:34
msgid "Answers"
@@ -287,7 +277,7 @@ msgstr "Modifier l'affichage de searx"
msgid "Search results"
msgstr "Résultats de recherche"
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
msgstr "Liens"
@@ -372,6 +362,14 @@ msgstr "Il y a un problème."
msgid "cached"
msgstr "en cache"
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr "afficher le média"
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
+msgstr "cacher le media"
+
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
msgstr "Voir l'image"
@@ -404,6 +402,23 @@ msgstr "Sources"
msgid "Leecher"
msgstr "Téléchargeurs"
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
+msgstr "afficher la vidéo"
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr "cacher la vidéo"
+
+msgid "Localization"
+msgstr "Localisation"
+
+msgid "Yes"
+msgstr "Oui"
+
+msgid "No"
+msgstr "Non"
+
# categories - manually added
# TODO - automatically add
msgid "files"
diff --git a/searx/translations/hu/LC_MESSAGES/messages.mo b/searx/translations/hu/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/hu/LC_MESSAGES/messages.po b/searx/translations/hu/LC_MESSAGES/messages.po
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
-"PO-Revision-Date: 2014-09-07 21:30+0000\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-12-22 16:11+0000\n"
"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
"Language-Team: Hungarian "
"(http://www.transifex.com/projects/p/searx/language/hu/)\n"
@@ -20,31 +20,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
msgstr "{minutes} perce"
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr "{hours} óra, {minutes} perce"
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr "Válaszidők (sec)"
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr "Találatok száma"
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr "Pontszámok"
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr "Pontszámok találatonként"
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
msgstr "Hibák"
@@ -93,19 +93,19 @@ msgstr "Felület nyelve"
#: searx/templates/default/preferences.html:36
#: searx/templates/oscar/preferences.html:53
msgid "Autocomplete"
-msgstr ""
+msgstr "Automatikus kiegészítés"
#: searx/templates/courgette/preferences.html:47
#: searx/templates/default/preferences.html:47
#: searx/templates/oscar/preferences.html:66
msgid "Method"
-msgstr ""
+msgstr "Method"
#: searx/templates/courgette/preferences.html:56
#: searx/templates/default/preferences.html:56
#: searx/templates/oscar/preferences.html:76
msgid "Themes"
-msgstr ""
+msgstr "Megjelenés"
#: searx/templates/courgette/preferences.html:66
#: searx/templates/default/preferences.html:66
@@ -124,22 +124,22 @@ msgstr "Kategória"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr "Engedélyezés"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr "Tiltás"
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -147,7 +147,7 @@ msgid ""
msgstr "Ezek a beállítások csak a böngésző cookie-jaiban tárolódnak."
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
@@ -157,44 +157,44 @@ msgstr ""
"felhasználók követésére."
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
msgstr "mentés"
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
msgstr "vissza"
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr "Keresési URL"
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
msgstr "Találatok letöltése"
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr "Javaslatok"
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr "előző oldal"
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr "következő oldal"
@@ -211,61 +211,49 @@ msgstr "Kereső statisztikák"
#: searx/templates/default/categories.html:8
msgid "Click on the magnifier to perform search"
-msgstr ""
-
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
+msgstr "A nagyítóra kattintva indítható a keresés"
#: searx/templates/default/results.html:34
msgid "Answers"
-msgstr ""
+msgstr "Válaszok"
#: searx/templates/oscar/base.html:69
msgid "Powered by"
-msgstr ""
+msgstr "Az oldalt kiszolgálja: "
#: searx/templates/oscar/base.html:69
msgid "a privacy-respecting, hackable metasearch engine"
-msgstr ""
+msgstr "egy privátszféra tisztelő, könnyen módosítható metakereső"
#: searx/templates/oscar/navbar.html:6
msgid "Toggle navigation"
-msgstr ""
+msgstr "Navigáció megjelenítés"
#: searx/templates/oscar/navbar.html:15
msgid "home"
-msgstr ""
+msgstr "főoldal"
#: searx/templates/oscar/preferences.html:11
#: searx/templates/oscar/preferences.html:17
msgid "General"
-msgstr ""
+msgstr "Általános"
#: searx/templates/oscar/preferences.html:12
#: searx/templates/oscar/preferences.html:99
msgid "Engines"
-msgstr ""
+msgstr "Kereső motorok"
#: searx/templates/oscar/preferences.html:39
msgid "What language do you prefer for search?"
-msgstr ""
+msgstr "Preferált keresési nyelv"
#: searx/templates/oscar/preferences.html:50
msgid "Change the language of the layout"
-msgstr ""
+msgstr "Felület nyelve"
#: searx/templates/oscar/preferences.html:63
msgid "Find stuff as you type"
-msgstr ""
+msgstr "Autómatikus kereső kifejezés kiegészítés"
#: searx/templates/oscar/preferences.html:73
msgid ""
@@ -273,128 +261,156 @@ msgid ""
"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
" rel=\"external\">learn more about request methods</a>"
msgstr ""
+"Keresés metódusa (<a "
+"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
+" rel=\"external\">bővebben</a>)"
#: searx/templates/oscar/preferences.html:84
msgid "Change searx layout"
-msgstr ""
+msgstr "Megjelenés"
#: searx/templates/oscar/results.html:6
msgid "Search results"
-msgstr ""
+msgstr "Keresési eredmények"
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
-msgstr ""
+msgstr "Linkek"
#: searx/templates/oscar/search.html:6 searx/templates/oscar/search_full.html:7
msgid "Start search"
-msgstr ""
+msgstr "Keresés indítása"
#: searx/templates/oscar/search_full.html:11
msgid "Show search filters"
-msgstr ""
+msgstr "Keresési szűrők megjelenítése"
#: searx/templates/oscar/search_full.html:11
msgid "Hide search filters"
-msgstr ""
+msgstr "Keresési szűrők elrejtése"
#: searx/templates/oscar/stats.html:2
msgid "stats"
-msgstr ""
+msgstr "statisztikák"
#: searx/templates/oscar/messages/first_time.html:4
#: searx/templates/oscar/messages/no_results.html:5
#: searx/templates/oscar/messages/save_settings_successfull.html:5
#: searx/templates/oscar/messages/unknow_error.html:5
msgid "Close"
-msgstr ""
+msgstr "Bezár"
#: searx/templates/oscar/messages/first_time.html:6
#: searx/templates/oscar/messages/no_data_available.html:3
msgid "Heads up!"
-msgstr ""
+msgstr "Figyelem!"
#: searx/templates/oscar/messages/first_time.html:7
msgid "It look like you are using searx first time."
-msgstr ""
+msgstr "Úgy tűnik először használod a keresőt."
#: searx/templates/oscar/messages/js_disabled.html:2
msgid "Warning!"
-msgstr ""
+msgstr "Figyelem!"
#: searx/templates/oscar/messages/js_disabled.html:3
msgid "Please enable JavaScript to use full functionality of this site."
-msgstr ""
+msgstr "Engedélyezze a javascript-et a teljes funkcionalitás használathoz"
#: searx/templates/oscar/messages/no_data_available.html:4
msgid "There is currently no data available. "
-msgstr ""
+msgstr "Nincs megjeleníthető adat."
#: searx/templates/oscar/messages/no_results.html:7
msgid "Sorry!"
-msgstr ""
+msgstr "Elnézést!"
#: searx/templates/oscar/messages/no_results.html:8
msgid ""
"we didn't find any results. Please use another query or search in more "
"categories."
-msgstr ""
+msgstr "Nincs megjeleníthető találat."
#: searx/templates/oscar/messages/save_settings_successfull.html:7
msgid "Well done!"
-msgstr ""
+msgstr "Siker!"
#: searx/templates/oscar/messages/save_settings_successfull.html:8
msgid "Settings saved successfully."
-msgstr ""
+msgstr "Beállítások mentve"
#: searx/templates/oscar/messages/unknow_error.html:7
msgid "Oh snap!"
-msgstr ""
+msgstr "Oh!"
#: searx/templates/oscar/messages/unknow_error.html:8
msgid "Something went wrong."
-msgstr ""
+msgstr "Hiba történt"
#: searx/templates/oscar/result_templates/default.html:6
#: searx/templates/oscar/result_templates/map.html:7
#: searx/templates/oscar/result_templates/torrent.html:6
#: searx/templates/oscar/result_templates/videos.html:6
msgid "cached"
+msgstr "tárolt"
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
msgstr ""
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
-msgstr ""
+msgstr "Kép megjelenítése"
#: searx/templates/oscar/result_templates/images.html:22
msgid "View source"
-msgstr ""
+msgstr "Forrás megtekintése"
#: searx/templates/oscar/result_templates/map.html:10
msgid "show map"
-msgstr ""
+msgstr "Térkép"
#: searx/templates/oscar/result_templates/map.html:10
msgid "hide map"
-msgstr ""
+msgstr "Térkép elrejtése"
#: searx/templates/oscar/result_templates/map.html:14
msgid "show details"
-msgstr ""
+msgstr "Részletek"
#: searx/templates/oscar/result_templates/map.html:14
msgid "hide details"
-msgstr ""
+msgstr "Részletek elrejtése"
#: searx/templates/oscar/result_templates/torrent.html:8
msgid "Seeder"
-msgstr ""
+msgstr "Seeder"
#: searx/templates/oscar/result_templates/torrent.html:8
msgid "Leecher"
+msgstr "Leecher"
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
msgstr ""
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr ""
+
+msgid "Localization"
+msgstr "Nyelv"
+
+msgid "Yes"
+msgstr "Igen"
+
+msgid "No"
+msgstr "Nem"
+
# categories - manually added
# TODO - automatically add
msgid "files"
diff --git a/searx/translations/it/LC_MESSAGES/messages.mo b/searx/translations/it/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/it/LC_MESSAGES/messages.po b/searx/translations/it/LC_MESSAGES/messages.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
-"PO-Revision-Date: 2014-09-08 08:19+0000\n"
-"Last-Translator: dp <d.pitrolo@gmx.com>\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-11-26 20:38+0000\n"
+"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
"Language-Team: Italian "
"(http://www.transifex.com/projects/p/searx/language/it/)\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -19,31 +19,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
msgstr "di {minutes} minuti fa"
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr "di {ore} h e {minutes} minuti fa"
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr " Caricamento della pagina (secondi)"
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr "Risultati ottenuti"
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr "Punteggio"
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr "Punteggio per risultato"
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
msgstr "Errori"
@@ -92,19 +92,19 @@ msgstr "Linguaggio dell'interfaccia"
#: searx/templates/default/preferences.html:36
#: searx/templates/oscar/preferences.html:53
msgid "Autocomplete"
-msgstr ""
+msgstr "Completamento automatico"
#: searx/templates/courgette/preferences.html:47
#: searx/templates/default/preferences.html:47
#: searx/templates/oscar/preferences.html:66
msgid "Method"
-msgstr ""
+msgstr "Metodo"
#: searx/templates/courgette/preferences.html:56
#: searx/templates/default/preferences.html:56
#: searx/templates/oscar/preferences.html:76
msgid "Themes"
-msgstr ""
+msgstr "Grafica"
#: searx/templates/courgette/preferences.html:66
#: searx/templates/default/preferences.html:66
@@ -123,22 +123,22 @@ msgstr "Categoria"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr "Autorizza"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr "Blocca"
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -148,7 +148,7 @@ msgstr ""
"conservare dati su di te."
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
@@ -158,44 +158,44 @@ msgstr ""
" sorvegliarti."
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
msgstr "salva"
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
msgstr "indietro"
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr "URL della ricerca"
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
msgstr "Scarica i risultati"
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr "Suggerimenti"
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr "pagina precedente"
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr "pagina successiva"
@@ -214,18 +214,6 @@ msgstr "Statistiche dei motori"
msgid "Click on the magnifier to perform search"
msgstr ""
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
-
#: searx/templates/default/results.html:34
msgid "Answers"
msgstr ""
@@ -283,7 +271,7 @@ msgstr ""
msgid "Search results"
msgstr ""
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
msgstr ""
@@ -364,6 +352,14 @@ msgstr ""
msgid "cached"
msgstr ""
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
+msgstr ""
+
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
msgstr ""
@@ -396,6 +392,23 @@ msgstr ""
msgid "Leecher"
msgstr ""
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr ""
+
+msgid "Localization"
+msgstr ""
+
+msgid "Yes"
+msgstr ""
+
+msgid "No"
+msgstr ""
+
# categories - manually added
# TODO - automatically add
msgid "files"
@@ -407,15 +420,9 @@ msgstr "generale"
msgid "music"
msgstr "musica"
-msgid "social media"
-msgstr "social media"
-
msgid "images"
msgstr "immagini"
-msgid "videos"
-msgstr "video"
-
msgid "it"
msgstr "it"
diff --git a/searx/translations/ja/LC_MESSAGES/messages.mo b/searx/translations/ja/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/ja/LC_MESSAGES/messages.po b/searx/translations/ja/LC_MESSAGES/messages.po
@@ -1,49 +1,52 @@
-# Japanese translations for PROJECT.
+# English translations for .
# Copyright (C) 2014 ORGANIZATION
-# This file is distributed under the same license as the PROJECT project.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
+# This file is distributed under the same license as the project.
#
+# Translators:
+# pointhi, 2014
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
msgid ""
msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
+"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
-"PO-Revision-Date: 2014-10-05 16:38+0200\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: ja <LL@li.org>\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-11-26 20:38+0000\n"
+"Last-Translator: Adam Tauber <asciimoo@gmail.com>\n"
+"Language-Team: Japanese "
+"(http://www.transifex.com/projects/p/searx/language/ja/)\n"
"Plural-Forms: nplurals=1; plural=0\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
-msgstr ""
+msgstr "{minutes}分前"
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
-msgstr ""
+msgstr "{hours}時間と{minutes}分前"
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr ""
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr ""
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr ""
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr ""
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
-msgstr ""
+msgstr "エラー"
#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:7
#: searx/templates/oscar/about.html:3 searx/templates/oscar/navbar.html:16
@@ -72,7 +75,7 @@ msgstr ""
#: searx/templates/default/preferences.html:15
#: searx/templates/oscar/preferences.html:30
msgid "Search language"
-msgstr ""
+msgstr "検索の言語"
#: searx/templates/courgette/preferences.html:18
#: searx/templates/default/preferences.html:18
@@ -84,7 +87,7 @@ msgstr ""
#: searx/templates/default/preferences.html:26
#: searx/templates/oscar/preferences.html:42
msgid "Interface language"
-msgstr ""
+msgstr "界面の言語"
#: searx/templates/courgette/preferences.html:36
#: searx/templates/default/preferences.html:36
@@ -117,26 +120,26 @@ msgstr ""
#: searx/templates/courgette/preferences.html:71
#: searx/templates/default/preferences.html:71
msgid "Category"
-msgstr ""
+msgstr "カテゴリー"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr ""
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr ""
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -144,7 +147,7 @@ msgid ""
msgstr ""
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
@@ -152,44 +155,44 @@ msgid ""
msgstr ""
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
-msgstr ""
+msgstr "保存"
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
-msgstr ""
+msgstr "バック"
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr ""
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
-msgstr ""
+msgstr "ダウンロードの結果"
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr "提案"
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr "前のページ"
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr "次のページ"
@@ -208,18 +211,6 @@ msgstr ""
msgid "Click on the magnifier to perform search"
msgstr ""
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
-
#: searx/templates/default/results.html:34
msgid "Answers"
msgstr ""
@@ -238,7 +229,7 @@ msgstr ""
#: searx/templates/oscar/navbar.html:15
msgid "home"
-msgstr ""
+msgstr "スタートページ"
#: searx/templates/oscar/preferences.html:11
#: searx/templates/oscar/preferences.html:17
@@ -277,7 +268,7 @@ msgstr ""
msgid "Search results"
msgstr ""
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
msgstr ""
@@ -358,6 +349,14 @@ msgstr ""
msgid "cached"
msgstr ""
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
+msgstr ""
+
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
msgstr ""
@@ -390,6 +389,23 @@ msgstr ""
msgid "Leecher"
msgstr ""
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr ""
+
+msgid "Localization"
+msgstr ""
+
+msgid "Yes"
+msgstr ""
+
+msgid "No"
+msgstr ""
+
# categories - manually added
# TODO - automatically add
msgid "files"
@@ -398,24 +414,18 @@ msgstr "ファイル"
msgid "general"
msgstr "ウェブ"
-msgid "map"
-msgstr "地図"
-
msgid "music"
msgstr "音楽"
-msgid "social media"
-msgstr "ソーシャルメディア"
-
msgid "images"
msgstr "画像"
-msgid "videos"
-msgstr "動画"
-
msgid "it"
msgstr "情報技術"
msgid "news"
msgstr "ニュース"
+msgid "map"
+msgstr "地図"
+
diff --git a/searx/translations/nl/LC_MESSAGES/messages.mo b/searx/translations/nl/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/nl/LC_MESSAGES/messages.po b/searx/translations/nl/LC_MESSAGES/messages.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-11-26 20:41+0100\n"
-"PO-Revision-Date: 2014-09-09 15:33+0000\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-12-11 13:50+0000\n"
"Last-Translator: André Koot <meneer@tken.net>\n"
"Language-Team: Dutch "
"(http://www.transifex.com/projects/p/searx/language/nl/)\n"
@@ -19,31 +19,31 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
-#: searx/webapp.py:308
+#: searx/webapp.py:263
msgid "{minutes} minute(s) ago"
msgstr "{minutes} min geleden"
-#: searx/webapp.py:310
+#: searx/webapp.py:265
msgid "{hours} hour(s), {minutes} minute(s) ago"
msgstr "{hours} uur, {minutes} min geleden"
-#: searx/engines/__init__.py:177
+#: searx/engines/__init__.py:179
msgid "Page loads (sec)"
msgstr "Pagina laadt (sec)"
-#: searx/engines/__init__.py:181
+#: searx/engines/__init__.py:183
msgid "Number of results"
msgstr "Aantal zoekresultaten"
-#: searx/engines/__init__.py:185
+#: searx/engines/__init__.py:187
msgid "Scores"
msgstr "Scores"
-#: searx/engines/__init__.py:189
+#: searx/engines/__init__.py:191
msgid "Scores per result"
msgstr "Scores per zoekresultaat"
-#: searx/engines/__init__.py:193
+#: searx/engines/__init__.py:195
msgid "Errors"
msgstr "Fouten"
@@ -92,19 +92,19 @@ msgstr "Interfacetaal"
#: searx/templates/default/preferences.html:36
#: searx/templates/oscar/preferences.html:53
msgid "Autocomplete"
-msgstr ""
+msgstr "Auto-aanvullen"
#: searx/templates/courgette/preferences.html:47
#: searx/templates/default/preferences.html:47
#: searx/templates/oscar/preferences.html:66
msgid "Method"
-msgstr ""
+msgstr "Methode"
#: searx/templates/courgette/preferences.html:56
#: searx/templates/default/preferences.html:56
#: searx/templates/oscar/preferences.html:76
msgid "Themes"
-msgstr ""
+msgstr "Thema's"
#: searx/templates/courgette/preferences.html:66
#: searx/templates/default/preferences.html:66
@@ -123,22 +123,22 @@ msgstr "Categorie"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:83
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:85
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
#: searx/templates/oscar/preferences.html:118
msgid "Allow"
msgstr "Toestaan"
#: searx/templates/courgette/preferences.html:72
#: searx/templates/courgette/preferences.html:84
-#: searx/templates/default/preferences.html:73
-#: searx/templates/default/preferences.html:86
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
#: searx/templates/oscar/preferences.html:117
msgid "Block"
msgstr "Blokkeren"
#: searx/templates/courgette/preferences.html:92
-#: searx/templates/default/preferences.html:94
+#: searx/templates/default/preferences.html:92
#: searx/templates/oscar/preferences.html:132
msgid ""
"These settings are stored in your cookies, this allows us not to store "
@@ -148,7 +148,7 @@ msgstr ""
" over jou te bewaren."
#: searx/templates/courgette/preferences.html:94
-#: searx/templates/default/preferences.html:96
+#: searx/templates/default/preferences.html:94
#: searx/templates/oscar/preferences.html:134
msgid ""
"These cookies serve your sole convenience, we don't use these cookies to "
@@ -158,44 +158,44 @@ msgstr ""
"niet om je te volgen."
#: searx/templates/courgette/preferences.html:97
-#: searx/templates/default/preferences.html:99
+#: searx/templates/default/preferences.html:97
#: searx/templates/oscar/preferences.html:137
msgid "save"
msgstr "bewaren"
#: searx/templates/courgette/preferences.html:98
-#: searx/templates/default/preferences.html:100
+#: searx/templates/default/preferences.html:98
#: searx/templates/oscar/preferences.html:138
msgid "back"
msgstr "terug"
#: searx/templates/courgette/results.html:12
#: searx/templates/default/results.html:12
-#: searx/templates/oscar/results.html:78
+#: searx/templates/oscar/results.html:87
msgid "Search URL"
msgstr "Zoek URL"
#: searx/templates/courgette/results.html:16
#: searx/templates/default/results.html:16
-#: searx/templates/oscar/results.html:83
+#: searx/templates/oscar/results.html:92
msgid "Download results"
msgstr "Downloaden zoekresultaten"
#: searx/templates/courgette/results.html:34
#: searx/templates/default/results.html:42
-#: searx/templates/oscar/results.html:58
+#: searx/templates/oscar/results.html:67
msgid "Suggestions"
msgstr "Suggesties"
#: searx/templates/courgette/results.html:62
#: searx/templates/default/results.html:78
-#: searx/templates/oscar/results.html:37
+#: searx/templates/oscar/results.html:41
msgid "previous page"
msgstr "vorige pagina"
#: searx/templates/courgette/results.html:73
#: searx/templates/default/results.html:89
-#: searx/templates/oscar/results.html:45
+#: searx/templates/oscar/results.html:49
msgid "next page"
msgstr "volgende pagina"
@@ -212,61 +212,49 @@ msgstr "Zoekmachinestatistieken"
#: searx/templates/default/categories.html:8
msgid "Click on the magnifier to perform search"
-msgstr ""
-
-#: searx/templates/default/preferences.html:72
-msgid "Localization"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "Yes"
-msgstr ""
-
-#: searx/templates/default/preferences.html:82
-msgid "No"
-msgstr ""
+msgstr "Klik op het vergrootglas om te zoeken"
#: searx/templates/default/results.html:34
msgid "Answers"
-msgstr ""
+msgstr "Antwoorden"
#: searx/templates/oscar/base.html:69
msgid "Powered by"
-msgstr ""
+msgstr "Powered by"
#: searx/templates/oscar/base.html:69
msgid "a privacy-respecting, hackable metasearch engine"
-msgstr ""
+msgstr "een privacy eerbiedigende, aanpasbare metazoekmachine"
#: searx/templates/oscar/navbar.html:6
msgid "Toggle navigation"
-msgstr ""
+msgstr "Omschakelen navigatie"
#: searx/templates/oscar/navbar.html:15
msgid "home"
-msgstr ""
+msgstr "thuis"
#: searx/templates/oscar/preferences.html:11
#: searx/templates/oscar/preferences.html:17
msgid "General"
-msgstr ""
+msgstr "Algemeen"
#: searx/templates/oscar/preferences.html:12
#: searx/templates/oscar/preferences.html:99
msgid "Engines"
-msgstr ""
+msgstr "Zoekmachines"
#: searx/templates/oscar/preferences.html:39
msgid "What language do you prefer for search?"
-msgstr ""
+msgstr "Welke taal wil je gebruiken voor het zoeken?"
#: searx/templates/oscar/preferences.html:50
msgid "Change the language of the layout"
-msgstr ""
+msgstr "Wijzig de taal van de layout"
#: searx/templates/oscar/preferences.html:63
msgid "Find stuff as you type"
-msgstr ""
+msgstr "Zoek tijdens het typen"
#: searx/templates/oscar/preferences.html:73
msgid ""
@@ -274,128 +262,158 @@ msgid ""
"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
" rel=\"external\">learn more about request methods</a>"
msgstr ""
+"Bepaal hoe de formulieren worden ingestuurd, <a "
+"href=\"http://nl.wikipedia.org/wiki/Hypertext_Transfer_Protocol#HTTP-"
+"requests\" rel=\"external\">lees meer over request methodes</a>"
#: searx/templates/oscar/preferences.html:84
msgid "Change searx layout"
-msgstr ""
+msgstr "Wijzig searx layout"
#: searx/templates/oscar/results.html:6
msgid "Search results"
-msgstr ""
+msgstr "Zoekresultaten"
-#: searx/templates/oscar/results.html:73
+#: searx/templates/oscar/results.html:82
msgid "Links"
-msgstr ""
+msgstr "Links"
#: searx/templates/oscar/search.html:6 searx/templates/oscar/search_full.html:7
msgid "Start search"
-msgstr ""
+msgstr "Start zoeken"
#: searx/templates/oscar/search_full.html:11
msgid "Show search filters"
-msgstr ""
+msgstr "Toon zoekfilters"
#: searx/templates/oscar/search_full.html:11
msgid "Hide search filters"
-msgstr ""
+msgstr "Verberg zoekfilters"
#: searx/templates/oscar/stats.html:2
msgid "stats"
-msgstr ""
+msgstr "stats"
#: searx/templates/oscar/messages/first_time.html:4
#: searx/templates/oscar/messages/no_results.html:5
#: searx/templates/oscar/messages/save_settings_successfull.html:5
#: searx/templates/oscar/messages/unknow_error.html:5
msgid "Close"
-msgstr ""
+msgstr "Sluiten"
#: searx/templates/oscar/messages/first_time.html:6
#: searx/templates/oscar/messages/no_data_available.html:3
msgid "Heads up!"
-msgstr ""
+msgstr "Heads up!"
#: searx/templates/oscar/messages/first_time.html:7
msgid "It look like you are using searx first time."
-msgstr ""
+msgstr "Het lijkt erop dat je searx voor de eerste keer gebruikt."
#: searx/templates/oscar/messages/js_disabled.html:2
msgid "Warning!"
-msgstr ""
+msgstr "Waarschuwing!"
#: searx/templates/oscar/messages/js_disabled.html:3
msgid "Please enable JavaScript to use full functionality of this site."
-msgstr ""
+msgstr "Activeer JavaScript om alle functionaliteit van deze site te gebruiken."
#: searx/templates/oscar/messages/no_data_available.html:4
msgid "There is currently no data available. "
-msgstr ""
+msgstr "Er zijn momenteel geen gegevens beschikbaar."
#: searx/templates/oscar/messages/no_results.html:7
msgid "Sorry!"
-msgstr ""
+msgstr "Sorry!"
#: searx/templates/oscar/messages/no_results.html:8
msgid ""
"we didn't find any results. Please use another query or search in more "
"categories."
msgstr ""
+"we kregen geen resultaat. Probeer een andere opvraag of zoek in meer "
+"categorieën."
#: searx/templates/oscar/messages/save_settings_successfull.html:7
msgid "Well done!"
-msgstr ""
+msgstr "Goed gedaan!"
#: searx/templates/oscar/messages/save_settings_successfull.html:8
msgid "Settings saved successfully."
-msgstr ""
+msgstr "Instellingen succesvol opgeslagen."
#: searx/templates/oscar/messages/unknow_error.html:7
msgid "Oh snap!"
-msgstr ""
+msgstr "Verdraaid!"
#: searx/templates/oscar/messages/unknow_error.html:8
msgid "Something went wrong."
-msgstr ""
+msgstr "Er ging iets fout."
#: searx/templates/oscar/result_templates/default.html:6
#: searx/templates/oscar/result_templates/map.html:7
#: searx/templates/oscar/result_templates/torrent.html:6
#: searx/templates/oscar/result_templates/videos.html:6
msgid "cached"
+msgstr "gecached"
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
msgstr ""
#: searx/templates/oscar/result_templates/images.html:21
msgid "Get image"
-msgstr ""
+msgstr "Toon afbeelding"
#: searx/templates/oscar/result_templates/images.html:22
msgid "View source"
-msgstr ""
+msgstr "Bekijk bron"
#: searx/templates/oscar/result_templates/map.html:10
msgid "show map"
-msgstr ""
+msgstr "toon kaart"
#: searx/templates/oscar/result_templates/map.html:10
msgid "hide map"
-msgstr ""
+msgstr "verberg kaart"
#: searx/templates/oscar/result_templates/map.html:14
msgid "show details"
-msgstr ""
+msgstr "toon details"
#: searx/templates/oscar/result_templates/map.html:14
msgid "hide details"
-msgstr ""
+msgstr "verberg details"
#: searx/templates/oscar/result_templates/torrent.html:8
msgid "Seeder"
-msgstr ""
+msgstr "Aanbieder"
#: searx/templates/oscar/result_templates/torrent.html:8
msgid "Leecher"
+msgstr "Ophaler"
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
msgstr ""
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr ""
+
+msgid "Localization"
+msgstr "Vertaling"
+
+msgid "Yes"
+msgstr "Ja"
+
+msgid "No"
+msgstr "Nee"
+
# categories - manually added
# TODO - automatically add
msgid "files"
diff --git a/searx/translations/tr/LC_MESSAGES/messages.mo b/searx/translations/tr/LC_MESSAGES/messages.mo
Binary files differ.
diff --git a/searx/translations/tr/LC_MESSAGES/messages.po b/searx/translations/tr/LC_MESSAGES/messages.po
@@ -0,0 +1,448 @@
+# English translations for .
+# Copyright (C) 2014 ORGANIZATION
+# This file is distributed under the same license as the project.
+#
+# Translators:
+# Caner Başaran <basaran.caner@gmail.com>, 2014
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
+msgid ""
+msgstr ""
+"Project-Id-Version: searx\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-01-05 20:54+0100\n"
+"PO-Revision-Date: 2014-12-28 08:20+0000\n"
+"Last-Translator: Caner Başaran <basaran.caner@gmail.com>\n"
+"Language-Team: Turkish "
+"(http://www.transifex.com/projects/p/searx/language/tr/)\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 1.3\n"
+
+#: searx/webapp.py:263
+msgid "{minutes} minute(s) ago"
+msgstr "{minutes} dakika() önce"
+
+#: searx/webapp.py:265
+msgid "{hours} hour(s), {minutes} minute(s) ago"
+msgstr "{hours} saat(), {minutes} dakika() önce"
+
+#: searx/engines/__init__.py:179
+msgid "Page loads (sec)"
+msgstr "Yüklenen sayfa (sn)"
+
+#: searx/engines/__init__.py:183
+msgid "Number of results"
+msgstr "Sonuç sayısı"
+
+#: searx/engines/__init__.py:187
+msgid "Scores"
+msgstr ""
+
+#: searx/engines/__init__.py:191
+msgid "Scores per result"
+msgstr ""
+
+#: searx/engines/__init__.py:195
+msgid "Errors"
+msgstr "Hatalar"
+
+#: searx/templates/courgette/index.html:8 searx/templates/default/index.html:7
+#: searx/templates/oscar/about.html:3 searx/templates/oscar/navbar.html:16
+msgid "about"
+msgstr "hakkında"
+
+#: searx/templates/courgette/index.html:9 searx/templates/default/index.html:8
+#: searx/templates/oscar/navbar.html:17
+#: searx/templates/oscar/preferences.html:2
+msgid "preferences"
+msgstr "tercihler"
+
+#: searx/templates/courgette/preferences.html:5
+#: searx/templates/default/preferences.html:5
+#: searx/templates/oscar/preferences.html:6
+msgid "Preferences"
+msgstr "Tercihler"
+
+#: searx/templates/courgette/preferences.html:9
+#: searx/templates/default/preferences.html:9
+#: searx/templates/oscar/preferences.html:24
+msgid "Default categories"
+msgstr "Öntanımlı kategoriler"
+
+#: searx/templates/courgette/preferences.html:15
+#: searx/templates/default/preferences.html:15
+#: searx/templates/oscar/preferences.html:30
+msgid "Search language"
+msgstr "Arama dili"
+
+#: searx/templates/courgette/preferences.html:18
+#: searx/templates/default/preferences.html:18
+#: searx/templates/oscar/preferences.html:33
+msgid "Automatic"
+msgstr "Otomatik"
+
+#: searx/templates/courgette/preferences.html:26
+#: searx/templates/default/preferences.html:26
+#: searx/templates/oscar/preferences.html:42
+msgid "Interface language"
+msgstr "Arayüz dili"
+
+#: searx/templates/courgette/preferences.html:36
+#: searx/templates/default/preferences.html:36
+#: searx/templates/oscar/preferences.html:53
+msgid "Autocomplete"
+msgstr "Otomatik tamamlama"
+
+#: searx/templates/courgette/preferences.html:47
+#: searx/templates/default/preferences.html:47
+#: searx/templates/oscar/preferences.html:66
+msgid "Method"
+msgstr "Sorgu gönderim yöntemi"
+
+#: searx/templates/courgette/preferences.html:56
+#: searx/templates/default/preferences.html:56
+#: searx/templates/oscar/preferences.html:76
+msgid "Themes"
+msgstr "Temalar"
+
+#: searx/templates/courgette/preferences.html:66
+#: searx/templates/default/preferences.html:66
+msgid "Currently used search engines"
+msgstr "Şu anda kullanılan arama motorları"
+
+#: searx/templates/courgette/preferences.html:70
+#: searx/templates/default/preferences.html:70
+msgid "Engine name"
+msgstr "Motor adı"
+
+#: searx/templates/courgette/preferences.html:71
+#: searx/templates/default/preferences.html:71
+msgid "Category"
+msgstr "Türü"
+
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:83
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:83
+#: searx/templates/oscar/preferences.html:118
+msgid "Allow"
+msgstr "İzin ver"
+
+#: searx/templates/courgette/preferences.html:72
+#: searx/templates/courgette/preferences.html:84
+#: searx/templates/default/preferences.html:72
+#: searx/templates/default/preferences.html:84
+#: searx/templates/oscar/preferences.html:117
+msgid "Block"
+msgstr "Engelle"
+
+#: searx/templates/courgette/preferences.html:92
+#: searx/templates/default/preferences.html:92
+#: searx/templates/oscar/preferences.html:132
+msgid ""
+"These settings are stored in your cookies, this allows us not to store "
+"this data about you."
+msgstr ""
+"Ayarlar çerezlerinizde saklanır. Verdiğiniz izinler, sizin hakkınızda "
+"veri saklamak için değil."
+
+#: searx/templates/courgette/preferences.html:94
+#: searx/templates/default/preferences.html:94
+#: searx/templates/oscar/preferences.html:134
+msgid ""
+"These cookies serve your sole convenience, we don't use these cookies to "
+"track you."
+msgstr "Bu çerezler size kolaylık sağlar. Sizi takip etmek için kullanılmaz."
+
+#: searx/templates/courgette/preferences.html:97
+#: searx/templates/default/preferences.html:97
+#: searx/templates/oscar/preferences.html:137
+msgid "save"
+msgstr "kaydet"
+
+#: searx/templates/courgette/preferences.html:98
+#: searx/templates/default/preferences.html:98
+#: searx/templates/oscar/preferences.html:138
+msgid "back"
+msgstr "geri"
+
+#: searx/templates/courgette/results.html:12
+#: searx/templates/default/results.html:12
+#: searx/templates/oscar/results.html:87
+msgid "Search URL"
+msgstr "Arama Bağlantısı"
+
+#: searx/templates/courgette/results.html:16
+#: searx/templates/default/results.html:16
+#: searx/templates/oscar/results.html:92
+msgid "Download results"
+msgstr "Arama sonuçlarını indir"
+
+#: searx/templates/courgette/results.html:34
+#: searx/templates/default/results.html:42
+#: searx/templates/oscar/results.html:67
+msgid "Suggestions"
+msgstr "Öneriler"
+
+#: searx/templates/courgette/results.html:62
+#: searx/templates/default/results.html:78
+#: searx/templates/oscar/results.html:41
+msgid "previous page"
+msgstr "önceki sayfa"
+
+#: searx/templates/courgette/results.html:73
+#: searx/templates/default/results.html:89
+#: searx/templates/oscar/results.html:49
+msgid "next page"
+msgstr "sonraki sayfa"
+
+#: searx/templates/courgette/search.html:3
+#: searx/templates/default/search.html:3 searx/templates/oscar/search.html:4
+#: searx/templates/oscar/search_full.html:5
+msgid "Search for..."
+msgstr "Aramak için..."
+
+#: searx/templates/courgette/stats.html:4 searx/templates/default/stats.html:4
+#: searx/templates/oscar/stats.html:5
+msgid "Engine stats"
+msgstr "Arama motoru istatistikleri"
+
+#: searx/templates/default/categories.html:8
+msgid "Click on the magnifier to perform search"
+msgstr "Arama yapmak için büyütece tıklayın"
+
+#: searx/templates/default/results.html:34
+msgid "Answers"
+msgstr ""
+
+#: searx/templates/oscar/base.html:69
+msgid "Powered by"
+msgstr "Gücümün kaynağı"
+
+#: searx/templates/oscar/base.html:69
+msgid "a privacy-respecting, hackable metasearch engine"
+msgstr ""
+"kişisel gizliliğe saygılı ve merak edenlerin kurcalayabildiği bir meta "
+"arama motoru"
+
+#: searx/templates/oscar/navbar.html:6
+msgid "Toggle navigation"
+msgstr ""
+
+#: searx/templates/oscar/navbar.html:15
+msgid "home"
+msgstr "anasayfa"
+
+#: searx/templates/oscar/preferences.html:11
+#: searx/templates/oscar/preferences.html:17
+msgid "General"
+msgstr "Genel"
+
+#: searx/templates/oscar/preferences.html:12
+#: searx/templates/oscar/preferences.html:99
+msgid "Engines"
+msgstr "Motorlar"
+
+#: searx/templates/oscar/preferences.html:39
+msgid "What language do you prefer for search?"
+msgstr "Arama için hangi dili tercih edersiniz?"
+
+#: searx/templates/oscar/preferences.html:50
+msgid "Change the language of the layout"
+msgstr "Yerleşim düzeninin dilini değiştir"
+
+#: searx/templates/oscar/preferences.html:63
+msgid "Find stuff as you type"
+msgstr "Leb demeden leblebiyi anlasın"
+
+#: searx/templates/oscar/preferences.html:73
+msgid ""
+"Change how forms are submited, <a "
+"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
+" rel=\"external\">learn more about request methods</a>"
+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>"
+
+#: searx/templates/oscar/preferences.html:84
+msgid "Change searx layout"
+msgstr "searx yerleşim düzenini değiştir"
+
+#: searx/templates/oscar/results.html:6
+msgid "Search results"
+msgstr "Arama sonuçları"
+
+#: searx/templates/oscar/results.html:82
+msgid "Links"
+msgstr "Bağlantılar"
+
+#: searx/templates/oscar/search.html:6 searx/templates/oscar/search_full.html:7
+msgid "Start search"
+msgstr "Aramayı başlat"
+
+#: searx/templates/oscar/search_full.html:11
+msgid "Show search filters"
+msgstr "Arama filtrelerini göster"
+
+#: searx/templates/oscar/search_full.html:11
+msgid "Hide search filters"
+msgstr "Arama filtrelerini gizle"
+
+#: searx/templates/oscar/stats.html:2
+msgid "stats"
+msgstr "istatistikler"
+
+#: searx/templates/oscar/messages/first_time.html:4
+#: searx/templates/oscar/messages/no_results.html:5
+#: searx/templates/oscar/messages/save_settings_successfull.html:5
+#: searx/templates/oscar/messages/unknow_error.html:5
+msgid "Close"
+msgstr "Kapat"
+
+#: searx/templates/oscar/messages/first_time.html:6
+#: searx/templates/oscar/messages/no_data_available.html:3
+msgid "Heads up!"
+msgstr "Dikkat et!"
+
+#: searx/templates/oscar/messages/first_time.html:7
+msgid "It look like you are using searx first time."
+msgstr "İlk defa searx kullanıyor gibi görünüyorsunuz."
+
+#: searx/templates/oscar/messages/js_disabled.html:2
+msgid "Warning!"
+msgstr "Uyarı!"
+
+#: searx/templates/oscar/messages/js_disabled.html:3
+msgid "Please enable JavaScript to use full functionality of this site."
+msgstr ""
+"Lütfen, bu sitenin tüm işlevlerini kullanmak için JavaScript'i "
+"etkinleştirin."
+
+#: searx/templates/oscar/messages/no_data_available.html:4
+msgid "There is currently no data available. "
+msgstr "Şuan uygun veri yok."
+
+#: searx/templates/oscar/messages/no_results.html:7
+msgid "Sorry!"
+msgstr "Üzgünüz!"
+
+#: searx/templates/oscar/messages/no_results.html:8
+msgid ""
+"we didn't find any results. Please use another query or search in more "
+"categories."
+msgstr ""
+"herhangi bir sonuç bulamadık. Lütfen, başka sorgu kullanın veya daha "
+"fazla kategoride arama yapın."
+
+#: searx/templates/oscar/messages/save_settings_successfull.html:7
+msgid "Well done!"
+msgstr "Aferin!"
+
+#: searx/templates/oscar/messages/save_settings_successfull.html:8
+msgid "Settings saved successfully."
+msgstr "Ayarlar başarıyla kaydedildi."
+
+#: searx/templates/oscar/messages/unknow_error.html:7
+msgid "Oh snap!"
+msgstr "Tüh tüh!"
+
+#: searx/templates/oscar/messages/unknow_error.html:8
+msgid "Something went wrong."
+msgstr "Bazı bazı şeylerde problem olmuş."
+
+#: searx/templates/oscar/result_templates/default.html:6
+#: searx/templates/oscar/result_templates/map.html:7
+#: searx/templates/oscar/result_templates/torrent.html:6
+#: searx/templates/oscar/result_templates/videos.html:6
+msgid "cached"
+msgstr "önbellek"
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "show media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/default.html:9
+msgid "hide media"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/images.html:21
+msgid "Get image"
+msgstr "Görseli indir"
+
+#: searx/templates/oscar/result_templates/images.html:22
+msgid "View source"
+msgstr "Kaynağı göster"
+
+#: searx/templates/oscar/result_templates/map.html:10
+msgid "show map"
+msgstr "haritayı göster"
+
+#: searx/templates/oscar/result_templates/map.html:10
+msgid "hide map"
+msgstr "haritayı gizle"
+
+#: searx/templates/oscar/result_templates/map.html:14
+msgid "show details"
+msgstr "ayrıntıları göster"
+
+#: searx/templates/oscar/result_templates/map.html:14
+msgid "hide details"
+msgstr "ayrıntıları gizle"
+
+#: searx/templates/oscar/result_templates/torrent.html:8
+msgid "Seeder"
+msgstr "Besleyenler"
+
+#: searx/templates/oscar/result_templates/torrent.html:8
+msgid "Leecher"
+msgstr "Sömürenler"
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "show video"
+msgstr ""
+
+#: searx/templates/oscar/result_templates/videos.html:9
+msgid "hide video"
+msgstr ""
+
+msgid "Localization"
+msgstr ""
+
+msgid "Yes"
+msgstr "Evet"
+
+msgid "No"
+msgstr "Hayır"
+
+# categories - manually added
+# TODO - automatically add
+msgid "files"
+msgstr "dosyalar"
+
+msgid "general"
+msgstr "genel"
+
+msgid "music"
+msgstr "müzik"
+
+msgid "social media"
+msgstr "sosyal medya"
+
+msgid "images"
+msgstr "görseller"
+
+msgid "videos"
+msgstr "videolar"
+
+msgid "it"
+msgstr "bilişim"
+
+msgid "news"
+msgstr "haberler"
+
+msgid "map"
+msgstr "harita"
+
diff --git a/searx/utils.py b/searx/utils.py
@@ -23,6 +23,9 @@ ua_os = ('Windows NT 6.3; WOW64',
ua = "Mozilla/5.0 ({os}) Gecko/20100101 Firefox/{version}"
+blocked_tags = ('script',
+ 'style')
+
def gen_useragent():
# TODO
@@ -30,8 +33,9 @@ def gen_useragent():
def searx_useragent():
- return 'searx/{searx_version} {suffix}'.format(searx_version=VERSION_STRING,
- suffix=settings['server'].get('useragent_suffix', ''))
+ return 'searx/{searx_version} {suffix}'.format(
+ searx_version=VERSION_STRING,
+ suffix=settings['server'].get('useragent_suffix', ''))
def highlight_content(content, query):
@@ -66,11 +70,27 @@ class HTMLTextExtractor(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.result = []
+ self.tags = []
+
+ def handle_starttag(self, tag, attrs):
+ self.tags.append(tag)
+
+ def handle_endtag(self, tag):
+ if tag != self.tags[-1]:
+ raise Exception("invalid html")
+ self.tags.pop()
+
+ def is_valid_tag(self):
+ return not self.tags or self.tags[-1] not in blocked_tags
def handle_data(self, d):
+ if not self.is_valid_tag():
+ return
self.result.append(d)
def handle_charref(self, number):
+ if not self.is_valid_tag():
+ return
if number[0] in (u'x', u'X'):
codepoint = int(number[1:], 16)
else:
@@ -78,6 +98,8 @@ class HTMLTextExtractor(HTMLParser):
self.result.append(unichr(codepoint))
def handle_entityref(self, name):
+ if not self.is_valid_tag():
+ return
# codepoint = htmlentitydefs.name2codepoint[name]
# self.result.append(unichr(codepoint))
self.result.append(name)
@@ -132,11 +154,30 @@ def get_themes(root):
"""Returns available themes list."""
static_path = os.path.join(root, 'static')
- static_names = set(os.listdir(static_path))
templates_path = os.path.join(root, 'templates')
- templates_names = set(os.listdir(templates_path))
- themes = []
- for name in static_names.intersection(templates_names):
- themes += [name]
+ themes = os.listdir(os.path.join(static_path, 'themes'))
return static_path, templates_path, themes
+
+
+def get_static_files(base_path):
+ base_path = os.path.join(base_path, 'static')
+ static_files = set()
+ base_path_length = len(base_path) + 1
+ for directory, _, files in os.walk(base_path):
+ for filename in files:
+ f = os.path.join(directory[base_path_length:], filename)
+ static_files.add(f)
+ return static_files
+
+
+def get_result_templates(base_path):
+ base_path = os.path.join(base_path, 'templates')
+ result_templates = set()
+ base_path_length = len(base_path) + 1
+ for directory, _, files in os.walk(base_path):
+ if directory.endswith('result_templates'):
+ for filename in files:
+ f = os.path.join(directory[base_path_length:], filename)
+ result_templates.add(f)
+ return result_templates
diff --git a/searx/version.py b/searx/version.py
@@ -18,7 +18,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
# version of searx
VERSION_MAJOR = 0
-VERSION_MINOR = 5
+VERSION_MINOR = 6
VERSION_BUILD = 0
VERSION_STRING = "{0}.{1}.{2}".format(VERSION_MAJOR,
diff --git a/searx/webapp.py b/searx/webapp.py
@@ -41,7 +41,8 @@ from searx.engines import (
categories, engines, get_engines_stats, engine_shortcuts
)
from searx.utils import (
- UnicodeWriter, highlight_content, html_to_text, get_themes
+ UnicodeWriter, highlight_content, html_to_text, get_themes,
+ get_static_files, get_result_templates
)
from searx.version import VERSION_STRING
from searx.languages import language_codes
@@ -49,8 +50,11 @@ from searx.https_rewrite import https_url_rewrite
from searx.search import Search
from searx.query import Query
from searx.autocomplete import backends as autocomplete_backends
+from searx import logger
+logger = logger.getChild('webapp')
+
static_path, templates_path, themes =\
get_themes(settings['themes_path']
if settings.get('themes_path')
@@ -58,6 +62,10 @@ static_path, templates_path, themes =\
default_theme = settings['server'].get('default_theme', 'default')
+static_files = get_static_files(searx_dir)
+
+result_templates = get_result_templates(searx_dir)
+
app = Flask(
__name__,
static_folder=static_path,
@@ -66,11 +74,16 @@ app = Flask(
app.secret_key = settings['server']['secret_key']
+app.logger.addHandler(logger)
+
babel = Babel(app)
-#TODO configurable via settings.yml
-favicons = ['wikipedia', 'youtube', 'vimeo', 'dailymotion', 'soundcloud',
- 'twitter', 'stackoverflow', 'github', 'deviantart', 'kickass']
+global_favicons = []
+for indice, theme in enumerate(themes):
+ global_favicons.append([])
+ theme_img_path = searx_dir+"/static/themes/"+theme+"/img/icons/"
+ for (dirpath, dirnames, filenames) in os.walk(theme_img_path):
+ global_favicons[indice].extend(filenames)
cookie_max_age = 60 * 60 * 24 * 365 * 23 # 23 years
@@ -170,10 +183,19 @@ def get_current_theme_name(override=None):
return theme_name
+def get_result_template(theme, template_name):
+ themed_path = theme + '/result_templates/' + template_name
+ if themed_path in result_templates:
+ return themed_path
+ return 'result_templates/' + template_name
+
+
def url_for_theme(endpoint, override_theme=None, **values):
- if endpoint == 'static' and values.get('filename', None):
+ if endpoint == 'static' and values.get('filename'):
theme_name = get_current_theme_name(override=override_theme)
- values['filename'] = "{}/{}".format(theme_name, values['filename'])
+ filename_with_theme = "themes/{}/{}".format(theme_name, values['filename'])
+ if filename_with_theme in static_files:
+ values['filename'] = filename_with_theme
return url_for(endpoint, **values)
@@ -223,6 +245,8 @@ def render(template_name, override_theme=None, **kwargs):
# override url_for function in templates
kwargs['url_for'] = url_for_theme
+ kwargs['get_result_template'] = get_result_template
+
kwargs['theme'] = get_current_theme_name(override=override_theme)
kwargs['template_name'] = template_name
@@ -284,10 +308,6 @@ def index():
else:
result['pretty_url'] = result['url']
- for engine in result['engines']:
- if engine in favicons:
- result['favicon'] = engine
-
# TODO, check if timezone is calculated right
if 'publishedDate' in result:
result['pubdate'] = result['publishedDate'].strftime('%Y-%m-%d %H:%M:%S%z')
@@ -340,7 +360,8 @@ def index():
suggestions=search.suggestions,
answers=search.answers,
infoboxes=search.infoboxes,
- theme=get_current_theme_name()
+ theme=get_current_theme_name(),
+ favicons=global_favicons[themes.index(get_current_theme_name())]
)
@@ -541,7 +562,7 @@ def opensearch():
@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path,
- 'static',
+ 'static/themes',
get_current_theme_name(),
'img'),
'favicon.png',
diff --git a/tox.ini b/tox.ini
@@ -0,0 +1,2 @@
+[flake8]
+max-line-length = 120
diff --git a/utils/update-translations.sh b/utils/update-translations.sh
@@ -9,7 +9,7 @@ SEARX_DIR='searx'
pybabel extract -F babel.cfg -o messages.pot $SEARX_DIR
for f in `ls $SEARX_DIR'/translations/'`; do
- pybabel update -i messages.pot -d $SEARX_DIR'/translations/' -l $f
+ pybabel update -N -i messages.pot -d $SEARX_DIR'/translations/' -l $f
# TODO - need to fix category translations
sed -i 's/#~ //' $SEARX_DIR'/translations/'$f'/LC_MESSAGES/messages.po'
done