mirror of
https://github.com/searxng/searxng.git
synced 2024-11-29 06:01:02 +00: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
aa05685cc1
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue