logo

searx

My custom branche(s) on searx, a meta-search engine git clone https://hacktivis.me/git/searx.git
commit: 92c6e88ad3e5ba57bd6e2ba64d0c38e8fd72ea09
parent 727c287856629cf7c11b87cecbf1b32bb0ca1831
Author: marc <a01200356@itesm.mx>
Date:   Mon, 31 Oct 2016 23:52:08 -0600

small fixes

Diffstat:

MAUTHORS.rst3+--
Msearx/engines/mediawiki.py2+-
Msearx/languages.py2--
Mtests/robot/test_basic.robot6+++---
Mutils/update_languages.py2++
5 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/AUTHORS.rst b/AUTHORS.rst @@ -43,7 +43,7 @@ generally made searx better: - Kang-min Liu - Kirill Isakov - Guilhem Bonnefille -- Marc Abonce Seguin +- Marc Abonce Seguin @a01200356 - @jibe-b - Christian Pietsch @pietsch - @Maxqia @@ -55,7 +55,6 @@ generally made searx better: - Ammar Najjar @ammarnajjar - @stepshal - François Revol @mmuman -- marc @a01200356 - Harry Wood @harry-wood - Thomas Renard @threnard - Pydo `<https://github.com/pydo>`_ diff --git a/searx/engines/mediawiki.py b/searx/engines/mediawiki.py @@ -15,7 +15,7 @@ from json import loads from string import Formatter from urllib import urlencode, quote -from searx.engines.wikipedia import supported_engines +from searx.engines.wikipedia import supported_languages # engine dependent config categories = ['general'] diff --git a/searx/languages.py b/searx/languages.py @@ -176,9 +176,7 @@ language_codes = ( (u"sh", u"Srpskohrvatski / Српскохрватски", u"", u"Serbo-Croatian"), (u"si", u"සිංහල", u"", u"Sinhalese"), (u"sk-SK", u"Slovenčina", u"Slovenská republika", u"Slovak"), - (u"sl", u"Slovenščina", u"", u"Slovenian"), (u"sl-SI", u"Slovenščina", u"Slovenija", u"Slovenian"), - (u"sl-SL", u"Slovenščina", u"Sierra Leone", u"Slovenian"), (u"sn", u"Chishona", u"", u""), (u"so", u"Soomaali", u"", u""), (u"sq", u"Shqip", u"", u"Albanian"), diff --git a/tests/robot/test_basic.robot b/tests/robot/test_basic.robot @@ -101,11 +101,11 @@ Change search language Page Should Contain about Page Should Contain preferences Go To http://localhost:11111/preferences - List Selection Should Be language Automatic - Select From List language Turkish (Turkey) - tr_TR + List Selection Should Be language Default language + Select From List language Türkçe (Türkiye) - tr-TR Submit Preferences Go To http://localhost:11111/preferences - List Selection Should Be language Turkish (Turkey) - tr_TR + List Selection Should Be language Türkçe (Türkiye) - tr-TR Change autocomplete Page Should Contain about diff --git a/utils/update_languages.py b/utils/update_languages.py @@ -35,7 +35,9 @@ languages = {} # To filter out invalid codes and dialects. def valid_code(lang_code): # filter invalid codes + # sl-SL is technically not invalid, but still a mistake if lang_code[:2] == 'xx'\ + or lang_code == 'sl-SL'\ or lang_code == 'jw'\ or lang_code[-2:] == 'UK'\ or lang_code[-2:] == 'XA'\