loading translations from extension

This commit is contained in:
Vinicius Moreira
2019-07-29 18:51:39 -03:00
parent dff34ebb5f
commit 5918f0c3ad
17 changed files with 29 additions and 703 deletions

View File

@@ -7,7 +7,7 @@ import re
HTML_RE = re.compile(r'<[^>]+>')
def get_locale_keys(key: str = None):
def get_locale_keys(key: str = None, locale_dir: str = resource.get_path('locale')):
locale_path = None
@@ -19,8 +19,6 @@ def get_locale_keys(key: str = None):
if current_locale:
current_locale = current_locale[0]
locale_dir = resource.get_path('locale')
for locale_file in glob.glob(locale_dir + '/*'):
name = locale_file.split('/')[-1]