searxngRebrandZaclys/tests
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
..
robot [theme] peel out oscar from SearXNG development 2022-04-30 13:20:27 +02:00
unit [fix] move locale code from webapp.py to locales.py and fix #1303 2022-06-12 10:52:26 +02:00
__init__.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00