1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-19 19:00:10 +01:00
searxng/tests/unit
Markus Heiser ad964562ce [fix] move locale code from webapp.py to locales.py and fix #1303
To improve modularization this patch:

- moves *locale* related implementation from the webapp.py application to the
  locale.py module.

- The initialization of the locales is now done in the application (webapp) and
  is no longer done while importing searx.locales.

In the searx.locales module a new dictionary named `LOCALE_BEST_MATCH` has been
added.  In this dictionary we can map languages without a translation to
languages we have a translation for.

To fix #1303 zh-HK has been mapped to zh-Hant-TW (we do not need additional
translations of traditional Chinese)

Closes: https://github.com/searxng/searxng/issues/1303
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-06-12 10:52:26 +02:00
..
engines [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
network [mod] upgrade httpx 0.21.2 2022-01-05 18:46:00 +01:00
settings [fix] changeover of the unit tests to the simple theme 2022-02-20 18:51:12 +01:00
__init__.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_answerers.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_engines_init.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_external_bangs.py [fix] external bangs: don't overwrite Bangs in data trie 2022-01-12 19:37:13 +01:00
test_plugins.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_preferences.py [fix] move locale code from webapp.py to locales.py and fix #1303 2022-06-12 10:52:26 +02:00
test_query.py [fix] dailymotion engine: filter by language & country 2022-04-16 09:27:34 +02:00
test_results.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_search.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_settings_loader.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_standalone_searx.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
test_utils.py [mod] add documentation about searx.utils 2022-01-29 22:49:42 +01:00
test_webadapter.py [fix] changeover of the unit tests to the simple theme 2022-02-20 18:51:12 +01:00
test_webapp.py theme: remove __common__ 2022-05-07 19:40:48 +02:00
test_webutils.py [mod] webutils.py: remove dead code 2021-12-28 10:14:38 +01:00