Skip to content

Commit 21b7d55

Browse files
feat: New language Arabic (ar): add language code type and test
1 parent 2b43827 commit 21b7d55

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ 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+
12+
Note: older library versions also support the new language, this update only adds new code constants.
13+
14+
815
## [1.17.0] - 2024-02-06
916
### Added
1017
* Added `output_format` parameter for document upload function, that indicates
@@ -284,6 +291,7 @@ Version increased to avoid conflicts with old packages on PyPI.
284291
Initial version.
285292

286293

294+
[Unreleased]: https://github.com/DeepLcom/deepl-python/compare/v1.17.0...HEAD
287295
[1.17.0]: https://github.com/DeepLcom/deepl-python/compare/v1.16.1...v1.17.0
288296
[1.16.1]: https://github.com/DeepLcom/deepl-python/compare/v1.16.0...v1.16.1
289297
[1.16.0]: https://github.com/DeepLcom/deepl-python/compare/v1.15.0...v1.16.0

deepl/api_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def remove_regional_variant(language: Union[str, "Language"]) -> str:
314314
"""Removes the regional variant from a language, e.g. EN-US gives EN"""
315315
return str(language).upper()[0:2]
316316

317+
ARABIC = "ar"
317318
BULGARIAN = "bg"
318319
CZECH = "cs"
319320
DANISH = "da"

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ def output_document_path(output_dir_path):
377377

378378

379379
example_text = {
380+
"AR": "شعاع البروتون",
380381
"BG": "протонен лъч",
381382
"CS": "protonový paprsek",
382383
"DA": "protonstråle",

0 commit comments

Comments
 (0)