Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zh-hant to OpenAPI spec for text translation #22

Merged
merged 9 commits into from
Jul 25, 2024
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ number is used only for corrections to the OpenAPI specification, for example:
typos, schema fixes, or adding examples.


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


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


[Unreleased]: https://github.com/DeepLcom/openapi/compare/v2.15.0...HEAD
[2.16.0]: https://github.com/DeepLcom/openapi/compare/v2.15.0...v2.16.0
[2.15.0]: https://github.com/DeepLcom/openapi/compare/v2.14.1...v2.15.0
[2.14.1]: https://github.com/DeepLcom/openapi/compare/v2.14.0...v2.14.1
[2.14.0]: https://github.com/DeepLcom/openapi/compare/v2.13.0...v2.14.0
Expand Down
7 changes: 4 additions & 3 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "DeepL - Contact us",
"url": "https://www.deepl.com/contact-us"
},
"version": "2.15.0"
"version": "2.16.0"
},
"externalDocs": {
"description": "DeepL Pro - Plans and pricing",
Expand Down Expand Up @@ -2051,7 +2051,7 @@
},
"TargetLanguageText": {
"type": "string",
"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.",
"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.",
"enum": [
"AR",
"BG",
Expand Down Expand Up @@ -2085,7 +2085,8 @@
"TR",
"UK",
"ZH",
"ZH-HANS"
"ZH-HANS",
"ZH-HANT"
],
"example": "DE"
}
Expand Down
17 changes: 10 additions & 7 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
contact:
name: DeepL - Contact us
url: https://www.deepl.com/contact-us
version: 2.15.0
version: 2.16.0
externalDocs:
description: DeepL Pro - Plans and pricing
url: https://www.deepl.com/pro#developer?cta=header-prices/
Expand Down Expand Up @@ -1943,21 +1943,23 @@ components:
* `PL` - Polish
* `PT` - Portuguese (unspecified variant for backward compatibility; please select `PT-BR` or `PT-PT` instead)
* `PT-BR` - Portuguese (Brazilian)
* `PT-PT` - Portuguese (all Portuguese varieties excluding Brazilian Portuguese)
* `PT-PT` - Portuguese (all Portuguese variants excluding Brazilian Portuguese)
* `RO` - Romanian
* `RU` - Russian
* `SK` - Slovak
* `SL` - Slovenian
* `SV` - Swedish
* `TR` - Turkish
* `UK` - Ukrainian
* `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` instead)
* `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` or `ZH-HANT` instead)
* `ZH-HANS` - Chinese (simplified)
* `ZH-HANT` - Chinese (traditional)

[1] Please note that Arabic has not yet been added to the `/languages` endpoint because
it does not yet support document translation; only text translation is supported for Arabic
at this time. When document translation support is added for Arabic, we will a) remove this
note and b) add Arabic to the `/languages` endpoint.
[1] Please note that Arabic and traditional Chinese have not yet been added to the /languages
endpoint because these languages do not yet support document translation; only text translation
is supported for Arabic and traditional Chinese at this time. When document translation support
is added for these languages, we will a) remove this note and b) add the languages to the /languages
endpoint where appropriate.
enum:
- AR
- BG
Expand Down Expand Up @@ -1992,4 +1994,5 @@ components:
- UK
- ZH
- ZH-HANS
- ZH-HANT
example: DE
46 changes: 43 additions & 3 deletions openapi_gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ info:
contact:
name: DeepL - Contact us
url: https://www.deepl.com/contact-us
version: 2.15.0
version: 2.16.0
externalDocs:
description: DeepL Pro - Plans and pricing
url: https://www.deepl.com/pro#developer?cta=header-prices/
Expand Down Expand Up @@ -92,7 +92,7 @@ paths:
source_lang:
$ref: '#/components/schemas/SourceLanguage'
target_lang:
$ref: '#/components/schemas/TargetLanguage'
$ref: '#/components/schemas/TargetLanguageText'
context:
$ref: '#/components/schemas/Context'
split_sentences:
Expand Down Expand Up @@ -147,7 +147,7 @@ paths:
source_lang:
$ref: '#/components/schemas/SourceLanguage'
target_lang:
$ref: '#/components/schemas/TargetLanguage'
daniel-jones-dev marked this conversation as resolved.
Show resolved Hide resolved
$ref: '#/components/schemas/TargetLanguageText'
context:
$ref: '#/components/schemas/Context'
split_sentences:
Expand Down Expand Up @@ -1515,3 +1515,43 @@ components:
- ZH
- ZH-HANS
example: DE
TargetLanguageText:
type: string
description: |-
The language into which the text should be translated.
enum:
- AR
- BG
- CS
- DA
- DE
- EL
- EN-GB
- EN-US
- ES
- ET
- FI
- FR
- HU
- ID
- IT
- JA
- KO
- LT
- LV
- NB
- NL
- PL
- PT-BR
- PT-PT
- RO
- RU
- SK
- SL
- SV
- TR
- UK
- ZH
- ZH-HANS
- ZH-HANT
example: DE