117 Fetch languages from Odysee's source code.
121 'https://raw.githubusercontent.com/OdyseeTeam/odysee-frontend/master/ui/constants/supported_browser_languages.js',
126 print(
"ERROR: can't determine languages from Odysee")
129 for line
in resp.text.split(
"\n")[1:-4]:
130 lang_tag = line.strip().split(
": ")[0].replace(
"'",
"")
133 sxng_tag = language_tag(babel.Locale.parse(lang_tag, sep=
"-"))
134 except babel.UnknownLocaleError:
135 print(
"ERROR: %s is unknown by babel" % lang_tag)
138 conflict = engine_traits.languages.get(sxng_tag)
140 if conflict != lang_tag:
141 print(
"CONFLICT: babel %s --> %s, %s" % (sxng_tag, conflict, lang_tag))
144 engine_traits.languages[sxng_tag] = lang_tag