diff options
author | marc <a01200356@itesm.mx> | 2016-08-05 23:34:56 -0500 |
---|---|---|
committer | marc <a01200356@itesm.mx> | 2016-12-13 19:32:00 -0600 |
commit | 149802c56926bf48520c98932c4c36b8152b3d2d (patch) | |
tree | f450a584a785c31a1c118be29b3039f779a0cb70 /searx/engines/archlinux.py | |
parent | e58949b76fac7aa93341523ff0e2f35e0a03e057 (diff) | |
download | searxng-149802c56926bf48520c98932c4c36b8152b3d2d.tar.gz searxng-149802c56926bf48520c98932c4c36b8152b3d2d.zip |
[enh] add supported_languages on engines and auto-generate languages.py
Diffstat (limited to 'searx/engines/archlinux.py')
-rw-r--r-- | searx/engines/archlinux.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/engines/archlinux.py b/searx/engines/archlinux.py index 5ba512766..dca825790 100644 --- a/searx/engines/archlinux.py +++ b/searx/engines/archlinux.py @@ -29,8 +29,8 @@ xpath_link = './/div[@class="mw-search-result-heading"]/a' # cut 'en' from 'en_US', 'de' from 'de_CH', and so on def locale_to_lang_code(locale): - if locale.find('_') >= 0: - locale = locale.split('_')[0] + if locale.find('-') >= 0: + locale = locale.split('-')[0] return locale @@ -95,6 +95,7 @@ main_langs = { 'uk': 'Українська', 'zh': '简体中文' } +supported_languages = dict(lang_urls, **main_langs) # do search-request |