Browse Source

Merge branch 'blotzy-master'

pull/23/head
chriskiehl 10 years ago
parent
commit
d654e06df7
3 changed files with 4 additions and 4 deletions
  1. 4
      gooey/i18n.py
  2. 2
      setup.py
  3. 2
      test.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 ',

2
setup.py

@ -22,7 +22,7 @@ setup(
author='Chris Kiehl',
author_email='audionautic@gmail.com',
package_data={
'': ['*.txt', '*.png', '*.jpg', '*.json']
'': ['*.txt', '*.png', '*.jpg', '*.json', '*.ico']
},
packages=find_packages(),
url='http://pypi.python.org/pypi/Gooey/',

2
test.py

@ -4,7 +4,7 @@ Created on Feb 9, 2014
@author: Chris
'''
from gooey import gooey
from gooey import Gooey
if __name__ == '__main__':
pass
Loading…
Cancel
Save