mirror of
https://github.com/searxng/searxng.git
synced 2024-11-15 01:00:12 +01:00
[fix] brave fetch_traits: Brave added Chinese (zh-hant) to UI
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
3196e7e86b
commit
edfd0e2fe5
@ -430,10 +430,10 @@ def fetch_traits(engine_traits: EngineTraits):
|
||||
|
||||
ui_lang = option.get('value')
|
||||
try:
|
||||
if '-' in ui_lang:
|
||||
if '-' in ui_lang and not ui_lang.startswith("zh-"):
|
||||
sxng_tag = region_tag(babel.Locale.parse(ui_lang, sep='-'))
|
||||
else:
|
||||
sxng_tag = language_tag(babel.Locale.parse(ui_lang))
|
||||
sxng_tag = language_tag(babel.Locale.parse(ui_lang, sep='-'))
|
||||
|
||||
except babel.UnknownLocaleError:
|
||||
print("ERROR: can't determine babel locale of Brave's (UI) language %s" % ui_lang)
|
||||
|
Loading…
Reference in New Issue
Block a user