small fixes

This commit is contained in:
marc 2016-10-31 23:52:08 -06:00
parent 727c287856
commit 92c6e88ad3
5 changed files with 7 additions and 8 deletions

View File

@ -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>`_

View File

@ -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']

View File

@ -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"),

View File

@ -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

View File

@ -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'\