You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
searxng/searx
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>
2 years ago
..
answerers [fix] issue reported by pylint 22.1.0 2 years ago
data Merge pull request #1266 from searxng/update_data_update_firefox_version.py 2 years ago
engines [fix] prepare for pylint 2.14.0 2 years ago
infopage [fix] prepare for pylint 2.14.0 2 years ago
metrics [fix] prepare for pylint 2.14.0 2 years ago
network [fix] prepare for pylint 2.14.0 2 years ago
plugins Merge pull request #1047 from return42/redis-lib 2 years ago
search [fix] prepare for pylint 2.14.0 2 years ago
shared [pyright:strict] searx.search.checker.background 2 years ago
static [build] /static 2 years ago
templates/simple Revert "Theme: add a preference to center the results (Oscar)" 2 years ago
translations [translations] update from Weblate 2 years ago
__init__.py [format.python] initial formatting of the python code 2 years ago
autocomplete.py [format.python] based on bugfix in 9ed626130 2 years ago
babel_extract.py [mod] move category and names of constants to searx/searxng.msg 2 years ago
compat.py [fix] add module for backward compatibility 2 years ago
exceptions.py [pyright:strict] searx.search.checker.background 2 years ago
external_bang.py [fix] external bangs: don't overwrite Bangs in data trie 2 years ago
external_urls.py [format.python] initial formatting of the python code 2 years ago
flaskfix.py [format.python] initial formatting of the python code 2 years ago
languages.py [fix] add back missing languages & regions (followup of PR #1071) 2 years ago
locales.py [fix] move locale code from webapp.py to locales.py and fix #1303 2 years ago
preferences.py Revert "Theme: add a preference to center the results (Oscar)" 2 years ago
query.py [mod] add flags to the languages filter 2 years ago
redislib.py [mod] redislib - optimize LUA script registration. 2 years ago
results.py [simple theme] replace Image_layout.js with flexbox CS impl. 2 years ago
searxng.msg [mod] move category and names of constants to searx/searxng.msg 2 years ago
settings.yml Fixed typo in settings.yml 2 years ago
settings_defaults.py Revert "Theme: add a preference to center the results (Oscar)" 2 years ago
settings_loader.py [format.python] initial formatting of the python code 2 years ago
unixthreadname.py [format.python] initial formatting of the python code 2 years ago
utils.py [fix] prepare for pylint 2.14.0 2 years ago
version.py [fix] version.py: git format '%cs' is not downward compatible 2 years ago
webadapter.py [fix] disabling all engines in a category makes the bang search in general 2 years ago
webapp.py [fix] move locale code from webapp.py to locales.py and fix #1303 2 years ago
webutils.py theme: remove __common__ 2 years ago