Skip to content

Commit

Permalink
[#2774] I18n more bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 6, 2012
1 parent 3b2427e commit 87ce7aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/lib/cli.py
Expand Up @@ -1550,9 +1550,9 @@ def po2dict(self, po, lang):
for occurrence in occurrences:
if occurrence[0].endswith('.js'):
js_use = True
break
continue
if not js_use:
break
continue
if entry.msgstr:
result[entry.msgid] = [None, entry.msgstr]
elif entry.msgstr_plural:
Expand All @@ -1577,8 +1577,8 @@ def build_js_translations(self):
data = self.po2dict(po, l)
data = json.dumps(data, sort_keys=True,
ensure_ascii=False, indent=2 * ' ')
out_file = open(os.path.join(out_dir, '%s.js' % f), 'w')
out_file.write(data)
out_file = open(os.path.join(out_dir, '%s.js' % l), 'w')
out_file.write(data.encode('utf-8'))
out_file.close()

print 'Completed generating JavaScript translations'
Expand Down

0 comments on commit 87ce7aa

Please sign in to comment.