Added language settings in preferences dialog

This commit is contained in:
2019-04-11 05:25:43 -05:00
parent cde18c8d35
commit 7928131112
6 changed files with 25 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ def getAvailableLanguages():
"""
#Make a list of all the locales found in NVDA's locale dir
l=[x for x in os.listdir(paths.locale_path()) if not x.startswith('.')]
l=[x for x in l if os.path.isfile(paths.locale_path('%s/LC_MESSAGES/%s.po' % (x, application.short_name)))]
l=[x for x in l if os.path.isfile(os.path.join(paths.locale_path(), '%s/LC_MESSAGES/%s.po' % (x, application.short_name)))]
#Make sure that en (english) is in the list as it may not have any locale files, but is default
if 'en' not in l:
l.append('en')