Merge pull request #544 from xuezhixin/master

os.environ does not have LANGUAGE in Centos8.
This commit is contained in:
Matt Rose 2021-12-01 19:18:29 -05:00 committed by GitHub
commit 00ea7e458f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -105,7 +105,12 @@ def manual_lookup():
if language in available_languages: if language in available_languages:
target = language target = language
break break
elif 'LANG' in os.environ:
language = os.environ['LANG'].split('.')[0]
for i in range(len(available_languages)):
if language == available_languages[i]:
target = language
break
return base_url % target return base_url % target
def path_lookup(command): def path_lookup(command):