Skip to content

Commit 4fe826f

Browse files
feat: New language Arabic (ar): add language code type and test
1 parent 22cb1bc commit 4fe826f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77

8+
## [Unreleased]
9+
### Added
10+
* New language available: Arabic (`'ar'`). Add language code constants and tests.
11+
Arabic is currently supported only for text translation; document translation
12+
support for Arabic is coming soon.
13+
14+
Note: older library versions also support the new language, this update only adds new code constants.
15+
16+
817
## [1.11.1] - 2024-01-26
918
### Fixed
1019
* Dependencies: Update `follow-redirects` due to security vulnerability
@@ -217,6 +226,7 @@ client library took over this package name. Thanks to
217226
ownership.
218227

219228

229+
[Unreleased]: https://github.com/DeepLcom/deepl-node/compare/v1.11.1...HEAD
220230
[1.11.1]: https://github.com/DeepLcom/deepl-node/compare/v1.11.0...v1.11.1
221231
[1.11.0]: https://github.com/DeepLcom/deepl-node/compare/v1.10.2...v1.11.0
222232
[1.10.2]: https://github.com/DeepLcom/deepl-node/compare/v1.9.0...v1.10.2

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export interface DocumentTranslateOptions {
166166
* API accept case-insensitive language codes.
167167
*/
168168
type CommonLanguageCode =
169+
| 'ar'
169170
| 'bg'
170171
| 'cs'
171172
| 'da'

tests/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { v4 as randomUUID } from 'uuid';
1111

1212
// Note: this constant cannot be exported immediately, because exports are locally undefined
1313
const internalExampleText: Record<string, string> = {
14+
ar: 'شعاع البروتون',
1415
bg: 'протонен лъч',
1516
cs: 'protonový paprsek',
1617
da: 'protonstråle',

0 commit comments

Comments
 (0)