From 5d6babb059be9c1c781ce6e11c657e9eb74bd994 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Tue, 24 Aug 2021 11:46:41 -0700 Subject: [PATCH] improve begin_translation docstring (#20401) --- .../azure/ai/translation/document/_client.py | 11 +++++++---- .../ai/translation/document/aio/_client_async.py | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_client.py b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_client.py index cb706b0373cd..39dfbdbcce64 100644 --- a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_client.py +++ b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_client.py @@ -113,10 +113,13 @@ def begin_translation( self, *args, **kwargs ): # pylint: disable=client-method-missing-type-annotations """Begin translating the document(s) in your source container to your target container - in the given language. To perform a single translation from source to target, pass the `source_url`, - `target_url`, and `target_language_code` parameters including any optional keyword arguments. - To pass multiple inputs for translation, pass the `inputs` parameter as a list of - :class:`~azure.ai.translation.document.DocumentTranslationInput`. + in the given language. There are two ways to call this method: + + 1) To perform translation on documents from a single source container to a single target container, pass the + `source_url`, `target_url`, and `target_language_code` parameters including any optional keyword arguments. + + 2) To pass multiple inputs for translation (multiple sources or targets), pass the `inputs` parameter + as a list of :class:`~azure.ai.translation.document.DocumentTranslationInput`. For supported languages and document formats, see the service documentation: https://docs.microsoft.com/azure/cognitive-services/translator/document-translation/overview diff --git a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_client_async.py b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_client_async.py index c8463bda0272..1ae6622521ac 100644 --- a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_client_async.py +++ b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_client_async.py @@ -122,10 +122,13 @@ async def begin_translation( self, *args, **kwargs ): # pylint: disable=client-method-missing-type-annotations """Begin translating the document(s) in your source container to your target container - in the given language. To perform a single translation from source to target, pass the `source_url`, - `target_url`, and `target_language_code` parameters including any optional keyword arguments. - To pass multiple inputs for translation, pass the `inputs` parameter as a list of - :class:`~azure.ai.translation.document.DocumentTranslationInput`. + in the given language. There are two ways to call this method: + + 1) To perform translation on documents from a single source container to a single target container, pass the + `source_url`, `target_url`, and `target_language_code` parameters including any optional keyword arguments. + + 2) To pass multiple inputs for translation (multiple sources or targets), pass the `inputs` parameter + as a list of :class:`~azure.ai.translation.document.DocumentTranslationInput`. For supported languages and document formats, see the service documentation: https://docs.microsoft.com/azure/cognitive-services/translator/document-translation/overview