1
0
mirror of https://github.com/searx/searx synced 2024-11-23 02:15:24 +01:00
searx/tests/unit
Marc Abonce Seguin c937a9e85f [fix] get correct locale with country from browser
Some of our interface locales include uppercase country codes,
which are separated by `_` instead of the more common `-`.
Also, a browser's `Accept-Language` header could be in lowercase.

This commit attempts to normalize those cases so a browser's
language+country codes can better match with our locales.

This solution assumes that our UI locales have nothing more than
language and optionally country. If we ever add a script specific
locale like `zh-Hant-TW` this would have to change to accomodate
that, but the idea would be pretty much the same as this fix.
2021-02-04 19:53:59 -07:00
..
engines [mod] remove unused import 2020-11-14 14:11:02 +01:00
settings [fix] settings_loader: don't crash when a key exists only in the user settings 2020-12-03 11:35:12 +01:00
__init__.py [mod] remove buildout/makefile infrastructure 2016-01-10 19:23:10 +01:00
test_answerers.py Drop Python 2 (1/n): remove unicode string and url_utils 2020-09-10 10:39:04 +02:00
test_engines_init.py [enh] Add onions category with Ahmia, Not Evil and Torch 2020-10-25 17:59:05 -07:00
test_plugins.py [mod] pylint: numerous minor code fixes 2020-12-01 15:21:19 +01:00
test_poolrequests.py [enh] Add multiple outgoing proxies 2020-11-20 15:29:21 +01:00
test_preferences.py [mod] pylint: numerous minor code fixes 2020-12-01 15:21:19 +01:00
test_query.py fix empty colon in query from selecting Chinese 2021-01-09 22:11:41 -07:00
test_results.py [mod] remove buildout/makefile infrastructure 2016-01-10 19:23:10 +01:00
test_search.py [mod] searx.search.EngineRef: remove from_bang parameter 2020-12-18 12:29:48 +01:00
test_settings_loader.py [enh] settings.yml: add use_default_settings option (2nd version) 2020-11-27 19:40:04 +01:00
test_standalone_searx.py [mod] searx.search.EngineRef: remove from_bang parameter 2020-12-18 12:29:48 +01:00
test_utils.py [enh] record details exception per engine 2020-12-03 10:22:48 +01:00
test_webadapter.py [mod] split searx.search into different processors 2020-12-17 11:39:36 +01:00
test_webapp.py [fix] get correct locale with country from browser 2021-02-04 19:53:59 -07:00
test_webutils.py [mod] add searx/webutils.py 2020-09-22 11:57:06 +02:00