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
5 changes: 3 additions & 2 deletions openapi.json
Original file line number Diff line number Diff line change
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
15 changes: 9 additions & 6 deletions openapi.yaml
Original file line number Diff line number Diff line change
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
44 changes: 42 additions & 2 deletions openapi_gitbook.yaml
Original file line number Diff line number Diff line change
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