summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/.yandex.py.swpbin0 -> 12288 bytes
-rw-r--r--searx/engines/duckduckgo.py6
-rw-r--r--searx/engines/subtitleseeker.py2
-rw-r--r--searx/preferences.py2
4 files changed, 6 insertions, 4 deletions
diff --git a/searx/engines/.yandex.py.swp b/searx/engines/.yandex.py.swp
new file mode 100644
index 000000000..ff2a8f648
--- /dev/null
+++ b/searx/engines/.yandex.py.swp
Binary files differ
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py
index d37d2778b..9cf5fb339 100644
--- a/searx/engines/duckduckgo.py
+++ b/searx/engines/duckduckgo.py
@@ -53,14 +53,16 @@ def request(query, params):
locale = None
elif params['language'][:2] == 'ja':
locale = 'jp-jp'
+ elif params['language'][:2] == 'sl':
+ locale = 'sl-sl'
elif params['language'] == 'zh-TW':
locale = 'tw-tzh'
elif params['language'] == 'zh-HK':
locale = 'hk-tzh'
elif params['language'][-2:] == 'SA':
- locale = 'xa' + params['language'].split('-')[0]
+ locale = 'xa-' + params['language'].split('-')[0]
elif params['language'][-2:] == 'GB':
- locale = 'uk' + params['language'].split('-')[0]
+ locale = 'uk-' + params['language'].split('-')[0]
else:
locale = params['language'].split('-')
if len(locale) == 2:
diff --git a/searx/engines/subtitleseeker.py b/searx/engines/subtitleseeker.py
index f979d0141..77b010c3f 100644
--- a/searx/engines/subtitleseeker.py
+++ b/searx/engines/subtitleseeker.py
@@ -46,7 +46,7 @@ def response(resp):
# dirty fix for languages named differenly in their site
if resp.search_params['language'][:2] == 'fa':
search_lang = 'Farsi'
- elif resp.search_params['language'] == 'pt_BR':
+ elif resp.search_params['language'] == 'pt-BR':
search_lang = 'Brazilian'
elif resp.search_params['language'] != 'all':
search_lang = [lc[3]
diff --git a/searx/preferences.py b/searx/preferences.py
index 7dc0e3172..3aeb87e9f 100644
--- a/searx/preferences.py
+++ b/searx/preferences.py
@@ -110,7 +110,7 @@ class SearchLanguageSetting(EnumStringSetting):
elif data == 'ar-XA':
data = 'ar-SA'
else:
- data = 'all'
+ data = self.value
self.value = data