Commit 702623cc authored by Michal Čihař's avatar Michal Čihař

Implement adding new translation for JSON

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 5c8e8bb4
......@@ -863,6 +863,21 @@ class JSONFormat(FileFormat):
format_id = 'json'
loader = ('jsonl10n', 'JsonFile')
@classmethod
def supports_new_language(cls):
'''
Checks whether we can create new language file.
'''
return True
@staticmethod
def add_language(filename, code, base):
'''
Adds new language file.
'''
with open(filename, 'w') as output:
output.write('{}\n')
FILE_FORMAT_CHOICES = [
(fmt, FILE_FORMATS[fmt].name) for fmt in sorted(FILE_FORMATS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment