Locale path fix

This commit is contained in:
Vinicius Moreira
2019-06-17 16:03:28 -03:00
parent f467da2fbf
commit 1daf3eb5e2
2 changed files with 3 additions and 6 deletions

View File

@@ -8,9 +8,6 @@ app_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def get_path(resource_path): def get_path(resource_path):
if os.path.exists(local_resource_path): if os.path.exists(local_resource_path):
final_path = local_resource_path + '/' + resource_path return local_resource_path + '/' + resource_path
else: else:
final_path = app_dir + '/resources/' + resource_path return app_dir + '/resources/' + resource_path
print(final_path)
return final_path

View File

@@ -12,7 +12,7 @@ def get_locale_keys():
if current_locale: if current_locale:
current_locale = current_locale[0] current_locale = current_locale[0]
locale_dir = resource.get_path('/locale') locale_dir = resource.get_path('locale')
for locale_file in glob.glob(locale_dir + '/*'): for locale_file in glob.glob(locale_dir + '/*'):
name = locale_file.split('/')[-1] name = locale_file.split('/')[-1]