Browse Source

small fixes

marc 8 years ago
parent
commit
92c6e88ad3
5 changed files with 7 additions and 8 deletions
  1. 1 2
      AUTHORS.rst
  2. 1 1
      searx/engines/mediawiki.py
  3. 0 2
      searx/languages.py
  4. 3 3
      tests/robot/test_basic.robot
  5. 2 0
      utils/update_languages.py

+ 1 - 2
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>`_

+ 1 - 1
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']

+ 0 - 2
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"),

+ 3 - 3
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

+ 2 - 0
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'\