Skip to content

Commit 2923a5a

Browse files
committed
add inline-feedback-buttons to DT
1 parent 4e426c4 commit 2923a5a

File tree

7 files changed

+92
-39
lines changed

7 files changed

+92
-39
lines changed

articles/cognitive-services/Translator/document-translation/quickstarts/get-started-with-rest-api.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: cognitive-services
88
ms.subservice: translator-text
99
ms.topic: quickstart
10-
ms.date: 12/17/2022
10+
ms.date: 02/10/2023
1111
ms.author: lajanuar
1212
recommendations: false
1313
ms.devlang: csharp, golang, java, javascript, python
@@ -17,7 +17,7 @@ zone_pivot_groups: programming-languages-set-translator
1717

1818
# Get started with Document Translation
1919

20-
Document Translation is a cloud-based feature of the [Azure Translator](../../translator-overview.md) service that asynchronously translates whole documents in [supported languages](../../language-support.md) and various [file formats](../overview.md#supported-document-formats). In this quickstart, you'll learn to use Document Translation with a programming language of your choice to translate a source document into a target language while preserving structure and text formatting.
20+
Document Translation is a cloud-based feature of the [Azure Translator](../../translator-overview.md) service that asynchronously translates whole documents in [supported languages](../../language-support.md) and various [file formats](../overview.md#supported-document-formats). In this quickstart, learn to use Document Translation with a programming language of your choice to translate a source document into a target language while preserving structure and text formatting.
2121

2222
## Prerequisites
2323

@@ -28,11 +28,11 @@ zone_pivot_groups: programming-languages-set-translator
2828
> * Document Translation is **only** supported in the S1 Standard Service Plan (Pay-as-you-go) or in the D3 Volume Discount Plan. *See* [Cognitive Services pricing—Translator](https://azure.microsoft.com/pricing/details/cognitive-services/translator/).
2929
>
3030
31-
To get started, you'll need:
31+
To get started, you need:
3232

3333
* An active [**Azure account**](https://azure.microsoft.com/free/cognitive-services/). If you don't have one, you can [**create a free account**](https://azure.microsoft.com/free/).
3434

35-
* An [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM). You'll create containers to store and organize your blob data within your storage account.
35+
* An [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM). You also need to create containers to store and organize your blob data within your storage account.
3636

3737
* A [**single-service Translator resource**](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) (**not** a multi-service Cognitive Services resource):
3838

@@ -66,6 +66,9 @@ The custom domain endpoint is a URL formatted with your resource name, hostname,
6666
> * **All API requests to the Document Translation service require a custom domain endpoint**.
6767
> * Don't use the Text Translation endpoint found on your Azure portal resource *Keys and Endpoint* page nor the global translator endpoint—`api.cognitive.microsofttranslator.com`—to make HTTP requests to Document Translation.
6868
69+
> [!div class="nextstepaction"]
70+
> [I ran into an issue with the prerequisites.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?Pillar=Language&Product=Document-translation&Page=quickstart&Section=Prerequisites)
71+
6972
### Retrieve your key and endpoint
7073

7174
Requests to the Translator service require a read-only key and custom endpoint to authenticate access.
@@ -76,16 +79,19 @@ Requests to the Translator service require a read-only key and custom endpoint t
7679

7780
1. Copy and paste your **`key`** and **`document translation endpoint`** in a convenient location, such as *Microsoft Notepad*. Only one key is necessary to make an API call.
7881

79-
1. You'll paste it into the code sample to authenticate your request to the Document Translation service.
82+
1. You **`key`** and **`document translation endpoint`** into the code samples to authenticate your request to the Document Translation service.
8083

8184
:::image type="content" source="../media/document-translation-key-endpoint.png" alt-text="Screenshot showing the get your key field in Azure portal.":::
8285

86+
> [!div class="nextstepaction"]
87+
> [I ran into an issue retrieving my key and endpoint.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?Pillar=Language&Product=Document-translation&Page=quickstart&Section=Retrieve-your-keys-and-endpoint)
88+
8389
## Create Azure blob storage containers
8490

85-
You'll need to [**create containers**](../../../../storage/blobs/storage-quickstart-blobs-portal.md#create-a-container) in your [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM) for source and target files.
91+
You need to [**create containers**](../../../../storage/blobs/storage-quickstart-blobs-portal.md#create-a-container) in your [**Azure blob storage account**](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM) for source and target files.
8692

8793
* **Source container**. This container is where you upload your files for translation (required).
88-
* **Target container**. This container is where your translated files will be stored (required).
94+
* **Target container**. This container is where your translated files are stored (required).
8995

9096
### **Required authentication**
9197

@@ -101,13 +107,16 @@ The `sourceUrl` , `targetUrl` , and optional `glossaryUrl` must include a Share
101107
> * If you're translating a **single** file (blob) in an operation, **delegate SAS access at the blob level**.
102108
> * As an alternative to SAS tokens, you can use a [**system-assigned managed identity**](../how-to-guides/create-use-managed-identities.md) for authentication.
103109
110+
> [!div class="nextstepaction"]
111+
> [I ran into an issue creating blob storage containers with authentication.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?Pillar=Language&Product=Document-translation&Page=quickstart&Section=Create-blob-storage-containers)
112+
104113
### Sample document
105114

106-
For this project, you'll need a **source document** uploaded to your **source container**. You can download our [document translation sample document](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/Translator/document-translation-sample.docx) for this quickstart.
115+
For this project, you need a **source document** uploaded to your **source container**. You can download our [document translation sample document](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/Translator/document-translation-sample.docx) for this quickstart.
107116

108117
## HTTP request
109118

110-
A batch Document Translation request is submitted to your Translator service endpoint via a POST request. If successful, the POST method returns a `202 Accepted` response code and the batch request is created by the service. The translated documents will be listed in your target container.
119+
A batch Document Translation request is submitted to your Translator service endpoint via a POST request. If successful, the POST method returns a `202 Accepted` response code and the batch request is created by the service. The translated documents are listed in your target container.
111120

112121
### Headers
113122

@@ -156,10 +165,13 @@ The following headers are included with each Document Translation API request:
156165
[!INCLUDE [REST API](includes/rest-api.md)]
157166
::: zone-end
158167

159-
That's it, congratulations! In this quickstart, you used Document Translation to translate a document while preserving it's original structure and data format.
168+
> [!div class="nextstepaction"]
169+
> [My REST API call was successful](#next-steps) [I ran into an issue](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?Product=Document-translation&Page=quickstart-translator&Section=run-your-appliation)
160170
161171
## Next steps
162172

173+
That's it, congratulations! In this quickstart, you used Document Translation to translate a document while preserving it's original structure and data format.
174+
163175
Learn more about Document Translation:
164176

165177
> [!div class="nextstepaction"]

articles/cognitive-services/Translator/document-translation/quickstarts/includes/csharp.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ manager: nitinme
66
ms.service: cognitive-services
77
ms.subservice: translator-text
88
ms.topic: include
9-
ms.date: 12/08/2022
9+
ms.date: 02/10/2023
1010
ms.author: lajanuar
1111
recommendations: false
1212
---
1313

1414
## Set up your C#/.NET environment
1515

16-
For this quickstart, we'll use the latest version of [Visual Studio](https://visualstudio.microsoft.com/vs/) IDE to build and run the application.
16+
For this quickstart, we use the latest version of [Visual Studio](https://visualstudio.microsoft.com/vs/) IDE to build and run the application.
1717

1818
1. Start Visual Studio.
1919

@@ -33,6 +33,9 @@ For this quickstart, we'll use the latest version of [Visual Studio](https://vis
3333

3434
:::image type="content" source="../../media/visual-studio/additional-information.png" alt-text="Screenshot of Visual Studio 2022 additional information set-up window.":::
3535

36+
> [!div class="nextstepaction"]
37+
> [I ran into an issue setting up my environment.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Set-up-the-environment)
38+
3639
## Install Newtonsoft.Json
3740

3841
1. Right-click on your **document-translation-qs** project and select **Manage NuGet Packages...** .
@@ -47,6 +50,9 @@ For this quickstart, we'll use the latest version of [Visual Studio](https://vis
4750

4851
:::image type="content" source="../../media/visual-studio/install-nuget-package.png" alt-text="Screenshot of install selected NuGet package window.":::
4952

53+
> [!div class="nextstepaction"]
54+
> [I ran into an issue installing the NuGet package.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Install-package)
55+
5056
## Translate all documents in a storage container
5157

5258
> [!NOTE]
@@ -71,7 +77,6 @@ For this quickstart, we'll use the latest version of [Visual Studio](https://vis
7177
> [!IMPORTANT]
7278
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../../key-vault/general/overview.md). For more information, *see* Cognitive Services [security](../../../../../cognitive-services/security-features.md).
7379
74-
7580
```csharp
7681

7782
using System.Text;
@@ -130,6 +135,9 @@ class Program
130135

131136
* The successful POST method returns a `202 Accepted` response code indicating that the batch request was created by the service.
132137

133-
* The POST request also returns response headers including `Operation-Location` that provides a value used in subsequent GET requests.
138+
* The POST request also returns response headers including `Operation-Location` that provides a value used in subsequent GET requests.
139+
140+
* The translated documents are listed in your target container.
134141

135-
* The translated documents will be listed in your target container.
142+
> [!div class="nextstepaction"]
143+
> [I ran into an issue translating documents.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Translate-documents)

articles/cognitive-services/Translator/document-translation/quickstarts/includes/go.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ manager: nitinme
66
ms.service: cognitive-services
77
ms.subservice: translator-text
88
ms.topic: include
9-
ms.date: 12/16/2022
9+
ms.date: 02/10/2023
1010
ms.author: lajanuar
1111
recommendations: false
1212
---
@@ -29,6 +29,9 @@ You can use any text editor to write Go applications. We recommend using the lat
2929
go version
3030
```
3131

32+
> [!div class="nextstepaction"]
33+
> [I ran into an issue setting up my environment.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=GO&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Set-up-the-environment)
34+
3235
## Translate all documents in a storage container
3336

3437
1. In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app called **document-translation-qs**, and navigate to it.
@@ -45,7 +48,7 @@ You can use any text editor to write Go applications. We recommend using the lat
4548

4649
> [!IMPORTANT]
4750
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](../../../../../key-vault/general/overview.md). For more information, *see* Cognitive Services [security](../../../../../cognitive-services/security-features.md).
48-
51+
4952
```go
5053

5154
package main
@@ -108,8 +111,11 @@ func main() {
108111
go run document-translation.go
109112
```
110113

111-
* The successful POST method returns a `202 Accepted` response code indicating that the batch request was created by the service.
114+
* The successful POST method returns a `202 Accepted` response code indicating that the batch request was created by the service.
115+
116+
* The POST request also returns response headers including `Operation-Location` that provides a value used in subsequent GET requests.
112117

113-
* The POST request also returns response headers including `Operation-Location` that provides a value used in subsequent GET requests.
118+
* The translated documents are listed in your target container.
114119

115-
* The translated documents will be listed in your target container.
120+
> [!div class="nextstepaction"]
121+
> [I ran into an issue translating documents.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=GO&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Translate-documents)

articles/cognitive-services/Translator/document-translation/quickstarts/includes/java.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ manager: nitinme
66
ms.service: cognitive-services
77
ms.subservice: translator-text
88
ms.topic: include
9-
ms.date: 12/17/2022
9+
ms.date: 02/10/2023
1010
ms.author: lajanuar
1111
recommendations: false
1212
---
1313

1414

1515
## Set up your Java environment
1616

17-
For this quickstart, we'll use the Gradle build automation tool to create and run the application.
17+
For this quickstart, we use the Gradle build automation tool to create and run the application.
1818

1919
* You should have the latest version of [Visual Studio Code](https://code.visualstudio.com/) or your preferred IDE. _See_ [Java in Visual Studio Code](https://code.visualstudio.com/docs/languages/java).
2020

@@ -23,12 +23,15 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
2323
> * Visual Studio Code offers a **Coding Pack for Java** for Windows and macOS.The coding pack is a bundle of VS Code, the Java Development Kit (JDK), and a collection of suggested extensions by Microsoft. The Coding Pack can also be used to fix an existing development environment.
2424
> * If you are using VS Code and the Coding Pack For Java, install the [**Gradle for Java**](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle) extension.
2525
26-
* If you aren't using VS Code, make sure you have the following installed in your development environment:
26+
* If you aren't using Visual Studio Code, make sure you have the following installed in your development environment:
2727

2828
* A [**Java Development Kit** (OpenJDK)](/java/openjdk/download#openjdk-17) version 8 or later.
2929

3030
* [**Gradle**](https://docs.gradle.org/current/userguide/installation.html), version 6.8 or later.
3131

32+
> [!div class="nextstepaction"]
33+
> [I ran into an issue setting up my environment.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVA&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Translate-documents)
34+
3235
## Create a new Gradle project
3336

3437
1. In console window (such as cmd, PowerShell, or Bash), create a new directory for your app called **document-translation**, and navigate to it.
@@ -41,7 +44,7 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
4144
mkdir document-translation; cd document-translation
4245
```
4346

44-
1. Run the `gradle init` command from the document-translation directory. This command will create essential build files for Gradle, including _build.gradle.kts_, which is used at runtime to create and configure your application.
47+
1. Run the `gradle init` command from the document-translation directory. This command creates essential build files for Gradle, including _build.gradle.kts_, which is used at runtime to create and configure your application.
4548

4649
```console
4750
gradle init --type basic
@@ -73,6 +76,9 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
7376
}
7477
```
7578

79+
> [!div class="nextstepaction"]
80+
> [I ran into creating a Gradle project.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVA&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Create-gradle-project)
81+
7682
## Translate all documents in a storage container
7783

7884
1. From the document-translation directory, run the following command:
@@ -81,7 +87,7 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
8187
mkdir -p src/main/java
8288
```
8389

84-
You'll create the following directory structure:
90+
The command creates the following directory structure:
8591

8692
:::image type="content" source="../../media/java-directories.png" alt-text="Screenshot: Java directory structure.":::
8793

@@ -172,4 +178,7 @@ public class DocumentTranslation {
172178

173179
* The POST request also returns response headers including `Operation-Location` that provides a value used in subsequent GET requests.
174180

175-
* The translated documents will be listed in your target container.
181+
* The translated documents are listed in your target container.
182+
183+
> [!div class="nextstepaction"]
184+
> [I ran into an issue translating documents.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVA&Pillar=Language&Product=Document-translation&Page=quickstart&Section=Translate-documents)

0 commit comments

Comments
 (0)