Skip to content

Commit fed2755

Browse files
Add zh-hant to OpenAPI spec for text translation (#22)
* Add zh-hant to OpenAPI spec for text translation * Update wording for traditional Chinese * Increase minor version number and update changelog --------- Co-authored-by: mike-winters-deepl <mike-winters-deepl@users.noreply.github.com> Co-authored-by: Daniel Jones <daniel.jones@deepl.com>
1 parent 694aa5c commit fed2755

File tree

4 files changed

+65
-16
lines changed

4 files changed

+65
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ number is used only for corrections to the OpenAPI specification, for example:
1010
typos, schema fixes, or adding examples.
1111

1212

13-
## [Unreleased]
13+
## [2.16.0] - 2024-07-25
14+
### Added
15+
* Add supported target language variant for text translation: Chinese
16+
(traditional) (`ZH-HANT`). Traditional Chinese is currently supported only for
17+
text translation; document translation support is coming soon.
1418
### Changed
1519
* The Chinese language codes returned in the `/languages` response for target
1620
languages were changed. While previously only `ZH` "Chinese (simplified)" was
1721
included, `ZH-HANS` "Chinese (simplified)" is now listed too.
1822
Both language codes are supported for text and document translation.
1923
### Deprecated
20-
* The target language code `ZH` is deprecated; instead `ZH-HANS` should be used.
24+
* The target language code `ZH` is deprecated; instead `ZH-HANS` or `ZH-HANT`
25+
should be used.
2126

2227

2328
## [2.15.0] - 2024-07-03
@@ -151,7 +156,7 @@ typos, schema fixes, or adding examples.
151156
Initial release of the OpenAPI specification.
152157

153158

154-
[Unreleased]: https://github.com/DeepLcom/openapi/compare/v2.15.0...HEAD
159+
[2.16.0]: https://github.com/DeepLcom/openapi/compare/v2.15.0...v2.16.0
155160
[2.15.0]: https://github.com/DeepLcom/openapi/compare/v2.14.1...v2.15.0
156161
[2.14.1]: https://github.com/DeepLcom/openapi/compare/v2.14.0...v2.14.1
157162
[2.14.0]: https://github.com/DeepLcom/openapi/compare/v2.13.0...v2.14.0

openapi.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "DeepL - Contact us",
99
"url": "https://www.deepl.com/contact-us"
1010
},
11-
"version": "2.15.0"
11+
"version": "2.16.0"
1212
},
1313
"externalDocs": {
1414
"description": "DeepL Pro - Plans and pricing",
@@ -2051,7 +2051,7 @@
20512051
},
20522052
"TargetLanguageText": {
20532053
"type": "string",
2054-
"description": "The language into which the text should be translated. Options currently available:\n * `AR` - Arabic [1]\n * `BG` - Bulgarian\n * `CS` - Czech\n * `DA` - Danish\n * `DE` - German\n * `EL` - Greek\n * `EN` - English (unspecified variant for backward compatibility; please select `EN-GB` or `EN-US` instead)\n * `EN-GB` - English (British)\n * `EN-US` - English (American)\n * `ES` - Spanish\n * `ET` - Estonian\n * `FI` - Finnish\n * `FR` - French\n * `HU` - Hungarian\n * `ID` - Indonesian\n * `IT` - Italian\n * `JA` - Japanese\n * `KO` - Korean\n * `LT` - Lithuanian\n * `LV` - Latvian\n * `NB` - Norwegian (Bokm\u00e5l)\n * `NL` - Dutch\n * `PL` - Polish\n * `PT` - Portuguese (unspecified variant for backward compatibility; please select `PT-BR` or `PT-PT` instead)\n * `PT-BR` - Portuguese (Brazilian)\n * `PT-PT` - Portuguese (all Portuguese varieties excluding Brazilian Portuguese)\n * `RO` - Romanian\n * `RU` - Russian\n * `SK` - Slovak\n * `SL` - Slovenian\n * `SV` - Swedish\n * `TR` - Turkish\n * `UK` - Ukrainian\n * `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` instead)\n * `ZH-HANS` - Chinese (simplified)\n\n [1] Please note that Arabic has not yet been added to the `/languages` endpoint because \n it does not yet support document translation; only text translation is supported for Arabic \n at this time. When document translation support is added for Arabic, we will a) remove this \n note and b) add Arabic to the `/languages` endpoint.",
2054+
"description": "The language into which the text should be translated. Options currently available:\n * `AR` - Arabic [1]\n * `BG` - Bulgarian\n * `CS` - Czech\n * `DA` - Danish\n * `DE` - German\n * `EL` - Greek\n * `EN` - English (unspecified variant for backward compatibility; please select `EN-GB` or `EN-US` instead)\n * `EN-GB` - English (British)\n * `EN-US` - English (American)\n * `ES` - Spanish\n * `ET` - Estonian\n * `FI` - Finnish\n * `FR` - French\n * `HU` - Hungarian\n * `ID` - Indonesian\n * `IT` - Italian\n * `JA` - Japanese\n * `KO` - Korean\n * `LT` - Lithuanian\n * `LV` - Latvian\n * `NB` - Norwegian (Bokm\u00e5l)\n * `NL` - Dutch\n * `PL` - Polish\n * `PT` - Portuguese (unspecified variant for backward compatibility; please select `PT-BR` or `PT-PT` instead)\n * `PT-BR` - Portuguese (Brazilian)\n * `PT-PT` - Portuguese (all Portuguese variants excluding Brazilian Portuguese)\n * `RO` - Romanian\n * `RU` - Russian\n * `SK` - Slovak\n * `SL` - Slovenian\n * `SV` - Swedish\n * `TR` - Turkish\n * `UK` - Ukrainian\n * `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` or `ZH-HANT` instead)\n * `ZH-HANS` - Chinese (simplified)\n * `ZH-HANT` - Chinese (traditional)\n\n [1] Please note that Arabic and traditional Chinese have not yet been added to the /languages \n endpoint because these languages do not yet support document translation; only text translation \n is supported for Arabic and traditional Chinese at this time. When document translation support \n is added for these languages, we will a) remove this note and b) add the languages to the /languages \n endpoint where appropriate.",
20552055
"enum": [
20562056
"AR",
20572057
"BG",
@@ -2085,7 +2085,8 @@
20852085
"TR",
20862086
"UK",
20872087
"ZH",
2088-
"ZH-HANS"
2088+
"ZH-HANS",
2089+
"ZH-HANT"
20892090
],
20902091
"example": "DE"
20912092
}

openapi.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ info:
77
contact:
88
name: DeepL - Contact us
99
url: https://www.deepl.com/contact-us
10-
version: 2.15.0
10+
version: 2.16.0
1111
externalDocs:
1212
description: DeepL Pro - Plans and pricing
1313
url: https://www.deepl.com/pro#developer?cta=header-prices/
@@ -1943,21 +1943,23 @@ components:
19431943
* `PL` - Polish
19441944
* `PT` - Portuguese (unspecified variant for backward compatibility; please select `PT-BR` or `PT-PT` instead)
19451945
* `PT-BR` - Portuguese (Brazilian)
1946-
* `PT-PT` - Portuguese (all Portuguese varieties excluding Brazilian Portuguese)
1946+
* `PT-PT` - Portuguese (all Portuguese variants excluding Brazilian Portuguese)
19471947
* `RO` - Romanian
19481948
* `RU` - Russian
19491949
* `SK` - Slovak
19501950
* `SL` - Slovenian
19511951
* `SV` - Swedish
19521952
* `TR` - Turkish
19531953
* `UK` - Ukrainian
1954-
* `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` instead)
1954+
* `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` or `ZH-HANT` instead)
19551955
* `ZH-HANS` - Chinese (simplified)
1956+
* `ZH-HANT` - Chinese (traditional)
19561957
1957-
[1] Please note that Arabic has not yet been added to the `/languages` endpoint because
1958-
it does not yet support document translation; only text translation is supported for Arabic
1959-
at this time. When document translation support is added for Arabic, we will a) remove this
1960-
note and b) add Arabic to the `/languages` endpoint.
1958+
[1] Please note that Arabic and traditional Chinese have not yet been added to the /languages
1959+
endpoint because these languages do not yet support document translation; only text translation
1960+
is supported for Arabic and traditional Chinese at this time. When document translation support
1961+
is added for these languages, we will a) remove this note and b) add the languages to the /languages
1962+
endpoint where appropriate.
19611963
enum:
19621964
- AR
19631965
- BG
@@ -1992,4 +1994,5 @@ components:
19921994
- UK
19931995
- ZH
19941996
- ZH-HANS
1997+
- ZH-HANT
19951998
example: DE

openapi_gitbook.yaml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ info:
99
contact:
1010
name: DeepL - Contact us
1111
url: https://www.deepl.com/contact-us
12-
version: 2.15.0
12+
version: 2.16.0
1313
externalDocs:
1414
description: DeepL Pro - Plans and pricing
1515
url: https://www.deepl.com/pro#developer?cta=header-prices/
@@ -92,7 +92,7 @@ paths:
9292
source_lang:
9393
$ref: '#/components/schemas/SourceLanguage'
9494
target_lang:
95-
$ref: '#/components/schemas/TargetLanguage'
95+
$ref: '#/components/schemas/TargetLanguageText'
9696
context:
9797
$ref: '#/components/schemas/Context'
9898
split_sentences:
@@ -147,7 +147,7 @@ paths:
147147
source_lang:
148148
$ref: '#/components/schemas/SourceLanguage'
149149
target_lang:
150-
$ref: '#/components/schemas/TargetLanguage'
150+
$ref: '#/components/schemas/TargetLanguageText'
151151
context:
152152
$ref: '#/components/schemas/Context'
153153
split_sentences:
@@ -1515,3 +1515,43 @@ components:
15151515
- ZH
15161516
- ZH-HANS
15171517
example: DE
1518+
TargetLanguageText:
1519+
type: string
1520+
description: |-
1521+
The language into which the text should be translated.
1522+
enum:
1523+
- AR
1524+
- BG
1525+
- CS
1526+
- DA
1527+
- DE
1528+
- EL
1529+
- EN-GB
1530+
- EN-US
1531+
- ES
1532+
- ET
1533+
- FI
1534+
- FR
1535+
- HU
1536+
- ID
1537+
- IT
1538+
- JA
1539+
- KO
1540+
- LT
1541+
- LV
1542+
- NB
1543+
- NL
1544+
- PL
1545+
- PT-BR
1546+
- PT-PT
1547+
- RO
1548+
- RU
1549+
- SK
1550+
- SL
1551+
- SV
1552+
- TR
1553+
- UK
1554+
- ZH
1555+
- ZH-HANS
1556+
- ZH-HANT
1557+
example: DE

0 commit comments

Comments
 (0)