Commit 35a8112c authored by Gernot Pansy's avatar Gernot Pansy

allow adding language on resx and osx strings (utf-8 only) file formats

parent d9e24ab8
......@@ -814,6 +814,21 @@ class StringsUtf8Format(FileFormat):
format_id = 'strings-utf8'
loader = ('properties', 'stringsutf8file')
@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')
@register_fileformat
class PropertiesUtf8Format(FileFormat):
......@@ -869,6 +884,21 @@ class RESXFormat(FileFormat):
monolingual = True
unit_class = RESXUnit
@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('''<?xml version='1.0' encoding='utf-8'?>
<root></root>''')
@register_fileformat
class AndroidFormat(FileFormat):
......
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