Fix detaction of pt-br system language

This commit is contained in:
shortcutme 2018-10-04 15:42:45 +02:00
parent 00cf1badfc
commit b089355b5a
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,9 @@ class Config(object):
try:
language, enc = locale.getdefaultlocale()
language = language.split("_")[0]
language = language.lower().replace("_", "-")
if language not in ["pt-br"]:
language = language.split("-")[0]
except Exception:
language = "en"