Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions onesky/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ def translation_export(self, project_id, locale,
'export_file_name': export_file_name}
return self.do_http_request(relative_url, params)

def translation_export_multilingual(self, project_id, source_file_name, export_file_name=None,
file_format=None):
relative_url = 'projects/{}/translations/multilingual'.format(project_id)
params = {'source_file_name': source_file_name,
'export_file_name': export_file_name,
'file_format': file_format}
return self.do_http_request(relative_url, params)

def translation_status(self, project_id, file_name, locale):
relative_url = 'projects/{}/translations/status'.format(project_id)
params = {'file_name': file_name, 'locale': locale}
Expand Down
5 changes: 5 additions & 0 deletions onesky/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def do_EOF(self, line):
'translation_export',
['project_id', 'locale', 'source_file_name'],
['export_file_name'])
do_translation_export_multilingual = make_cmd(
'translation_export_multilingual',
['project_id', 'source_file_name'],
['export_file_name', 'file_format']
)
do_translation_status = make_cmd('translation_status',
['project_id', 'file_name', 'locale'])
do_import_task_list = make_cmd('import_task_list',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
],
license='LICENSE.txt',
packages=['onesky'],
url='https://github.com/Jana-Mobile/onesky-python'
url='https://github.com/dubsmash/onesky-python'
)
6 changes: 6 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ def test_translation_export(self):
['project_id', 'locale', 'source_file_name'],
['export_file_name'])

def test_translation_export_multilingual(self):
self.execute('translation_export_multilingual',
'GET', 'projects/{}/translations/multilingual',
['project_id', 'source_file_name'],
['export_file_name', 'file_format'])

def test_translation_status(self):
self.execute('translation_status',
'GET', 'projects/{}/translations/status',
Expand Down