diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2022-03-19 12:14:07 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-03-19 15:09:13 +0100 |
commit | a25e3767d44d512d14de471d28023333482dbc22 (patch) | |
tree | 6d562389e9cbd17f634d7a4d9dc4193eb3bdc3d8 /searxng_extra | |
parent | 2841abaf5571328fd4b4d433f9854aa6908b58cd (diff) | |
download | searxng-a25e3767d44d512d14de471d28023333482dbc22.tar.gz searxng-a25e3767d44d512d14de471d28023333482dbc22.zip |
[fix] don't show flags for languages without region identifier
SearXNG shows two different things:
region:
"de-CH" is the equivalent of "Schweiz (de)" in DDG.
languages:
"en" doesn't say anything about the location. It is up the engines to do their
best to select English results without a region.
Suggested-by: @dalf https://github.com/searxng/searxng/pull/967#issuecomment-1072979693
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searxng_extra')
-rwxr-xr-x | searxng_extra/update/update_languages.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/searxng_extra/update/update_languages.py b/searxng_extra/update/update_languages.py index ebe9c884d..631f197e4 100755 --- a/searxng_extra/update/update_languages.py +++ b/searxng_extra/update/update_languages.py @@ -68,7 +68,6 @@ lang2emoji = { 'jp': '\U0001F1EF\U0001F1F5', # Japanese 'ua': '\U0001F1FA\U0001F1E6', # Ukrainian 'he': '\U0001F1EE\U0001F1F7', # Hebrew - 'zh': '\U0001F1E8\U0001F1F3', # China (zh) } @@ -80,11 +79,7 @@ def get_unicode_flag(lang_code): return emoji if len(lang_code) == 2: - l_code = lang_code.lower() - c_code = lang_code.upper() - if c_code == 'EN': - c_code = 'GB' - lang_code = "%s-%s" % (l_code, c_code) + return '\U0001F310' language = territory = script = variant = '' try: |