Skip to content

Commit bbb93cb

Browse files
Added DOCX word document support to TranslateDocument API
1 parent b65c8dd commit bbb93cb

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

generator/ServiceModels/translate/translate-2017-07-01.docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"ContentType": {
6464
"base": null,
6565
"refs": {
66-
"Document$ContentType": "<p>Describes the format of the document. You can specify one of the following:</p> <ul> <li> <p>text/html - The input data consists of HTML content. Amazon Translate translates only the text in the HTML element.</p> </li> <li> <p>text/plain - The input data consists of unformatted text. Amazon Translate translates every character in the content. </p> </li> </ul>",
66+
"Document$ContentType": "<p>Describes the format of the document. You can specify one of the following:</p> <ul> <li> <p> <code>text/html</code> - The input data consists of HTML content. Amazon Translate translates only the text in the HTML element.</p> </li> <li> <p> <code>text/plain</code> - The input data consists of unformatted text. Amazon Translate translates every character in the content. </p> </li> <li> <p> <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code> - The input data consists of a Word document (.docx).</p> </li> </ul>",
6767
"InputDataConfig$ContentType": "<p>Describes the format of the data that you submit to Amazon Translate as input. You can specify one of the following multipurpose internet mail extension (MIME) types:</p> <ul> <li> <p> <code>text/html</code>: The input data consists of one or more HTML files. Amazon Translate translates only the text that resides in the <code>html</code> element in each file.</p> </li> <li> <p> <code>text/plain</code>: The input data consists of one or more unformatted text files. Amazon Translate translates every character in this type of input.</p> </li> <li> <p> <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>: The input data consists of one or more Word documents (.docx).</p> </li> <li> <p> <code>application/vnd.openxmlformats-officedocument.presentationml.presentation</code>: The input data consists of one or more PowerPoint Presentation files (.pptx).</p> </li> <li> <p> <code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code>: The input data consists of one or more Excel Workbook files (.xlsx).</p> </li> <li> <p> <code>application/x-xliff+xml</code>: The input data consists of one or more XML Localization Interchange File Format (XLIFF) files (.xlf). Amazon Translate supports only XLIFF version 1.2.</p> </li> </ul> <important> <p>If you structure your input data as HTML, ensure that you set this parameter to <code>text/html</code>. By doing so, you cut costs by limiting the translation to the contents of the <code>html</code> element in each file. Otherwise, if you set this parameter to <code>text/plain</code>, your costs will cover the translation of every character.</p> </important>"
6868
}
6969
},

generator/ServiceModels/translate/translate-2017-07-01.normal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533
},
534534
"ContentType":{
535535
"shape":"ContentType",
536-
"documentation":"<p>Describes the format of the document. You can specify one of the following:</p> <ul> <li> <p>text/html - The input data consists of HTML content. Amazon Translate translates only the text in the HTML element.</p> </li> <li> <p>text/plain - The input data consists of unformatted text. Amazon Translate translates every character in the content. </p> </li> </ul>"
536+
"documentation":"<p>Describes the format of the document. You can specify one of the following:</p> <ul> <li> <p> <code>text/html</code> - The input data consists of HTML content. Amazon Translate translates only the text in the HTML element.</p> </li> <li> <p> <code>text/plain</code> - The input data consists of unformatted text. Amazon Translate translates every character in the content. </p> </li> <li> <p> <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code> - The input data consists of a Word document (.docx).</p> </li> </ul>"
537537
}
538538
},
539539
"documentation":"<p>The content and content type of a document.</p>"

sdk/src/Services/Translate/Generated/Model/Document.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,18 @@ internal bool IsSetContent()
6565
/// </para>
6666
/// <ul> <li>
6767
/// <para>
68-
/// text/html - The input data consists of HTML content. Amazon Translate translates only
69-
/// the text in the HTML element.
68+
/// <code>text/html</code> - The input data consists of HTML content. Amazon Translate
69+
/// translates only the text in the HTML element.
7070
/// </para>
7171
/// </li> <li>
7272
/// <para>
73-
/// text/plain - The input data consists of unformatted text. Amazon Translate translates
74-
/// every character in the content.
73+
/// <code>text/plain</code> - The input data consists of unformatted text. Amazon Translate
74+
/// translates every character in the content.
75+
/// </para>
76+
/// </li> <li>
77+
/// <para>
78+
/// <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
79+
/// - The input data consists of a Word document (.docx).
7580
/// </para>
7681
/// </li> </ul>
7782
/// </summary>

0 commit comments

Comments
 (0)