diff --git a/translate/cloud-client/quickstart.py b/translate/cloud-client/quickstart.py index 6aeebe2974f7..5bb4a5085bb9 100644 --- a/translate/cloud-client/quickstart.py +++ b/translate/cloud-client/quickstart.py @@ -24,7 +24,7 @@ def run_quickstart(): api_key = 'YOUR_API_KEY' # Instantiates a client - translate_client = translate.Client(api_key) + translate_client = translate.Client(api_key=api_key) # The text to translate text = u'Hello, world!' diff --git a/translate/cloud-client/snippets.py b/translate/cloud-client/snippets.py index bd8ab407136b..8a2201b8100a 100644 --- a/translate/cloud-client/snippets.py +++ b/translate/cloud-client/snippets.py @@ -73,9 +73,10 @@ def translate_text(api_key, target, text, model='base'): # Text can also be a sequence of strings, in which case this method # will return a sequence of results for each text. - result = translate_client.translate(text, - target_language=target, - model=model) + result = translate_client.translate( + text, + target_language=target, + model=model) print(u'Text: {}'.format(result['input'])) print(u'Translation: {}'.format(result['translatedText']))