Skip to content

Commit

Permalink
[#3229] Fix literals
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Sep 9, 2016
1 parent 05d164f commit e4a3d1d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ckan/views/api.py
Expand Up @@ -659,13 +659,13 @@ def util_organization_autocomplete():


def util_i18n_js_translations(lang):
ckan_path = os.path.join(os.path.dirname(__file__), '..')
source = os.path.abspath(os.path.join(ckan_path, 'public',
'base', 'i18n', '{0}.js'.format(lang)))
headers = {'Content-Type': CONTENT_TYPES['json']}
ckan_path = os.path.join(os.path.dirname(__file__), u'..')
source = os.path.abspath(os.path.join(ckan_path, u'public',
u'base', u'i18n', u'{0}.js'.format(lang)))
headers = {u'Content-Type': CONTENT_TYPES[u'json']}
if not os.path.exists(source):
return '{}'
translations = open(source, 'r').read()
return u'{}'
translations = open(source, u'r').read()
return make_response((translations, 200, headers))


Expand Down

0 comments on commit e4a3d1d

Please sign in to comment.