Skip to content

Commit

Permalink
Support template for json
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Apr 15, 2015
1 parent bfb13b7 commit 24ad6b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion weblate/trans/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,12 @@ def add_language(filename, code, base):
'''
Adds new language file.
'''
content = '{}\n'
if base:
with open(base, 'r') as handle:
content = handle.read()
with open(filename, 'w') as output:
output.write('{}\n')
output.write(content)

@property
def mimetype(self):
Expand Down

0 comments on commit 24ad6b4

Please sign in to comment.