Skip to content

Commit 9a9730b

Browse files
Merge pull request #227062 from laujan/63571-add-inline-feedback-dt
add inline-feedback-buttons to DT
2 parents 05f89ac + ca4f614 commit 9a9730b

File tree

7 files changed

+99
-41
lines changed

7 files changed

+99
-41
lines changed

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

Lines changed: 19 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

@@ -163,4 +172,4 @@ That's it, congratulations! In this quickstart, you used Document Translation to
163172
Learn more about Document Translation:
164173

165174
> [!div class="nextstepaction"]
166-
>[Document Translation REST API guide](../reference/rest-api-guide.md) [Language support](../../language-support.md)
175+
>[Document Translation REST API guide](../reference/rest-api-guide.md) </br></br>[Language support](../../language-support.md)

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ 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
---
13+
<!-- markdownlint-disable MD051 -->
1314

1415
## Set up your C#/.NET environment
1516

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.
17+
For this quickstart, we use the latest version of [Visual Studio](https://visualstudio.microsoft.com/vs/) IDE to build and run the application.
1718

1819
1. Start Visual Studio.
1920

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

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

37+
> [!div class="nextstepaction"]
38+
> [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)
39+
3640
## Install Newtonsoft.Json
3741

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

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

54+
> [!div class="nextstepaction"]
55+
> [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)
56+
5057
## Translate all documents in a storage container
5158

5259
> [!NOTE]
@@ -71,7 +78,6 @@ For this quickstart, we'll use the latest version of [Visual Studio](https://vis
7178
> [!IMPORTANT]
7279
> 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).
7380
74-
7581
```csharp
7682

7783
using System.Text;
@@ -130,6 +136,9 @@ class Program
130136

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

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

135-
* The translated documents will be listed in your target container.
143+
> [!div class="nextstepaction"]
144+
> [I successfully translated my document.](#next-steps) [I ran into an issue](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: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ 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
---
1313

14+
<!-- markdownlint-disable MD051 -->
15+
1416
## Set up your Go environment
1517

1618
You can use any text editor to write Go applications. We recommend using the latest version of [Visual Studio Code and the Go extension](/azure/developer/go/configure-visual-studio-code).
@@ -29,6 +31,9 @@ You can use any text editor to write Go applications. We recommend using the lat
2931
go version
3032
```
3133

34+
> [!div class="nextstepaction"]
35+
> [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)
36+
3237
## Translate all documents in a storage container
3338

3439
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 +50,7 @@ You can use any text editor to write Go applications. We recommend using the lat
4550

4651
> [!IMPORTANT]
4752
> 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-
53+
4954
```go
5055

5156
package main
@@ -108,8 +113,11 @@ func main() {
108113
go run document-translation.go
109114
```
110115

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

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

115-
* The translated documents will be listed in your target container.
122+
> [!div class="nextstepaction"]
123+
> [I successfully translated my document.](#next-steps) [I ran into an issue.](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: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ 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

14+
<!-- markdownlint-disable MD051 -->
1415

1516
## Set up your Java environment
1617

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

1920
* 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).
2021

@@ -23,12 +24,15 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
2324
> * 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.
2425
> * 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.
2526
26-
* If you aren't using VS Code, make sure you have the following installed in your development environment:
27+
* If you aren't using Visual Studio Code, make sure you have the following installed in your development environment:
2728

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

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

33+
> [!div class="nextstepaction"]
34+
> [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)
35+
3236
## Create a new Gradle project
3337

3438
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 +45,7 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
4145
mkdir document-translation; cd document-translation
4246
```
4347

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.
48+
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.
4549

4650
```console
4751
gradle init --type basic
@@ -73,6 +77,9 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
7377
}
7478
```
7579

80+
> [!div class="nextstepaction"]
81+
> [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)
82+
7683
## Translate all documents in a storage container
7784

7885
1. From the document-translation directory, run the following command:
@@ -81,7 +88,7 @@ For this quickstart, we'll use the Gradle build automation tool to create and ru
8188
mkdir -p src/main/java
8289
```
8390

84-
You'll create the following directory structure:
91+
The command creates the following directory structure:
8592

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

@@ -172,4 +179,7 @@ public class DocumentTranslation {
172179

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

175-
* The translated documents will be listed in your target container.
182+
* The translated documents are listed in your target container.
183+
184+
> [!div class="nextstepaction"]
185+
> [I successfully translated my document.](#next-steps) [I ran into an issue.](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)