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

Fix missing ZH codes #21

Merged
merged 5 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ number is used only for corrections to the OpenAPI specification, for example:
typos, schema fixes, or adding examples.


## [Unreleased]
### 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.


## [2.15.0] - 2024-07-03
### Added
* Add supported glossary language: Romanian (`ro`).
Expand Down Expand Up @@ -141,6 +151,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.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: 6 additions & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
{
"name": "ManageGlossaries",
"description": "The *glossary* functions allow you to create, inspect, and delete glossaries.\nGlossaries created with the glossary function can be used in translate requests by specifying the\n`glossary_id` parameter.\nIf you encounter issues, please let us know at [email protected].\n\nThe DeepL API supports glossaries in any combination of two languages from the following list, enabling a total of\n120 possible glossary language pairs:\n\n- DA (Danish)\n- DE (German)\n- EN (English)\n- ES (Spanish)\n- FR (French)\n- IT (Italian)\n- JA (Japanese)\n- KO (Korean)\n- NB (Norwegian (bokm\u00e5l))\n- NL (Dutch)\n- PL (Polish)\n- PT (Portuguese)\n- RO (Romanian)\n- RU (Russian)\n- SV (Swedish)\n- ZH (Chinese)\n\nThe maximum size limit for a glossary is 10 MiB = 10485760 bytes and each source/target text,\nas well as the name of the glossary, is limited to 1024 UTF-8 bytes.\nA total of 1000 glossaries are allowed per account.\n\nWhen creating a glossary with target language `EN`, `PT`, or `ZH`, it's not necessary to specify a variant\n(e.g. `EN-US`, `EN-GB`, `PT-PT`, `PT-BR`, or `ZH-HANT`).\nGlossaries with target language `EN` can be used in translations with either English variant.\nSimilarly `PT`, and `ZH` glossaries can be used in translations with their corresponding variants.\n\n\nGlossaries created via the DeepL API are distinct from glossaries created via the DeepL website and DeepL apps.\nThis means API glossaries cannot be used on the website and vice versa.\n\n\n\nNote that glossaries are immutable: once created, the glossary entries for a given glossary ID cannot be modified.\n\nAs a workaround for effectively editable glossaries, we suggest to identify glossaries by name instead of ID in your application\nand then use the following procedure for modifications:\n- [download](https://www.deepl.com/docs-api/glossaries/get-glossary-entries) and store the current glossary's entries,\n- locally modify the glossary entries,\n- [delete](https://www.deepl.com/docs-api/glossaries/delete-glossary) the existing glossary,\n- [create a new glossary](https://www.deepl.com/docs-api/glossaries/create-glossary) with the same name."
"description": "The *glossary* functions allow you to create, inspect, and delete glossaries.\nGlossaries created with the glossary function can be used in translate requests by specifying the\n`glossary_id` parameter.\nIf you encounter issues, please let us know at [email protected].\n\nThe DeepL API supports glossaries in any combination of two languages from the following list, enabling a total of\n120 possible glossary language pairs:\n\n- DA (Danish)\n- DE (German)\n- EN (English)\n- ES (Spanish)\n- FR (French)\n- IT (Italian)\n- JA (Japanese)\n- KO (Korean)\n- NB (Norwegian (bokm\u00e5l))\n- NL (Dutch)\n- PL (Polish)\n- PT (Portuguese)\n- RO (Romanian)\n- RU (Russian)\n- SV (Swedish)\n- ZH (Chinese)\n\nThe maximum size limit for a glossary is 10 MiB = 10485760 bytes and each source/target text,\nas well as the name of the glossary, is limited to 1024 UTF-8 bytes.\nA total of 1000 glossaries are allowed per account.\n\nWhen creating a glossary with target language `EN`, `PT`, or `ZH`, it's not necessary to specify a variant\n(e.g. `EN-US`, `EN-GB`, `PT-PT`, `PT-BR`, or `ZH-HANS`).\nGlossaries with target language `EN` can be used in translations with either English variant.\nSimilarly `PT`, and `ZH` glossaries can be used in translations with their corresponding variants.\n\n\nGlossaries created via the DeepL API are distinct from glossaries created via the DeepL website and DeepL apps.\nThis means API glossaries cannot be used on the website and vice versa.\n\n\n\nNote that glossaries are immutable: once created, the glossary entries for a given glossary ID cannot be modified.\n\nAs a workaround for effectively editable glossaries, we suggest to identify glossaries by name instead of ID in your application\nand then use the following procedure for modifications:\n- [download](https://www.deepl.com/docs-api/glossaries/get-glossary-entries) and store the current glossary's entries,\n- locally modify the glossary entries,\n- [delete](https://www.deepl.com/docs-api/glossaries/delete-glossary) the existing glossary,\n- [create a new glossary](https://www.deepl.com/docs-api/glossaries/create-glossary) with the same name."
},
{
"name": "MetaInformation",
Expand Down Expand Up @@ -1467,6 +1467,11 @@
"name": "Ukrainian",
"supports_formality": false
},
{
"language": "ZH",
"name": "Chinese (simplified)",
"supports_formality": false
},
{
"language": "ZH-HANS",
"name": "Chinese (simplified)",
Expand Down
5 changes: 4 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ tags:
A total of 1000 glossaries are allowed per account.

When creating a glossary with target language `EN`, `PT`, or `ZH`, it's not necessary to specify a variant
(e.g. `EN-US`, `EN-GB`, `PT-PT`, `PT-BR`, or `ZH-HANT`).
(e.g. `EN-US`, `EN-GB`, `PT-PT`, `PT-BR`, or `ZH-HANS`).
Glossaries with target language `EN` can be used in translations with either English variant.
Similarly `PT`, and `ZH` glossaries can be used in translations with their corresponding variants.

Expand Down Expand Up @@ -1134,6 +1134,9 @@ paths:
- language: UK
name: Ukrainian
supports_formality: false
- language: ZH
name: Chinese (simplified)
supports_formality: false
- language: ZH-HANS
name: Chinese (simplified)
supports_formality: false
Expand Down
4 changes: 4 additions & 0 deletions openapi_gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,9 @@ paths:
- language: UK
name: Ukrainian
supports_formality: false
- language: ZH
name: Chinese (simplified)
supports_formality: false
- language: ZH-HANS
name: Chinese (simplified)
supports_formality: false
Expand Down Expand Up @@ -1509,5 +1512,6 @@ components:
- SV
- TR
- UK
- ZH
- ZH-HANS
example: DE