mirror of
https://github.com/searxng/searxng.git
synced 2025-07-14 08:49:19 +02:00
[fix] languages: show country name even if there is only one country
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
a25e3767d4
commit
2e4557f3f3
2 changed files with 18 additions and 20 deletions
|
@ -224,9 +224,7 @@ def filter_language_list(all_languages):
|
|||
if len(filtered_countries) > 1:
|
||||
filtered_countries[lang] = _copy_lang_data(lang, None)
|
||||
elif len(filtered_countries) == 1:
|
||||
# if there's only one country per language, it's not necessary to show country name
|
||||
lang_country = next(iter(filtered_countries))
|
||||
filtered_countries[lang_country]['country_name'] = None
|
||||
|
||||
# if no country has enough engines try to get most likely country code from babel
|
||||
if not filtered_countries:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue