fix: lang/ path not found

This commit is contained in:
Terry Geng 2020-12-31 11:01:22 +08:00
parent 1af21a66f8
commit f96c9f7f89
No known key found for this signature in database
GPG Key ID: F982F8EA1DF720E7

View File

@ -432,7 +432,8 @@ def verify_password(password, salted_hash, salt):
def get_supported_language():
lang_files = os.listdir('lang')
root_dir = os.path.dirname(__file__)
lang_files = os.listdir(os.path.join(root_dir, 'lang'))
lang_list = []
for lang_file in lang_files:
match = re.search("([a-z]{2}_[A-Z]{2})\.json", lang_file)