Browse Source

the language import would break on linux if the path had any capitalization in the path

pull/13/head
Richard Acosta 10 years ago
parent
commit
7a21af70d2
1 changed files with 2 additions and 2 deletions
  1. 4
      gooey/i18n.py

4
gooey/i18n.py

@ -18,7 +18,7 @@ _DEFAULT_DIR = os.path.join(os.path.dirname(__file__), 'languages')
def get_path(language):
''' Returns the full path to the language file '''
filename = language + '.json'
filename = language.lower() + '.json'
lang_file_path = os.path.join(_DEFAULT_DIR, filename)
if not os.path.exists(lang_file_path):
raise IOError('Could not find {} language file'.format(language))
@ -28,7 +28,7 @@ def get_path(language):
def load(filepath):
''' Open and return the supplied json file '''
try:
with open(filepath.lower(), 'rb') as f:
with open(filepath, 'rb') as f:
return json.load(f)
except IOError:
raise IOError('Language file not found. Make sure that your ',

Loading…
Cancel
Save