Skip to content

Commit 451b88f

Browse files
feat: New languages Korean (ko) and Norwegian (bokmål) (nb): add language code constants and tests
1 parent c7ebe1e commit 451b88f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
* Add [example script](examples/mustache) to translate Mustache templates.
1111
* Add support for storing your API Key in a keyring via the `keyring` module.
1212
* Added a CI check for copyright headers.
13+
* New languages available: Korean (`'ko'`) and Norwegian (bokmål) (`'nb'`). Add language code constants and tests.
14+
15+
Note: older library versions also support the new languages, this update only adds new code constants.
1316
### Changed
1417
### Deprecated
1518
### Removed

deepl/translator.py

+2
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,10 @@ def remove_regional_variant(language: Union[str]) -> str:
356356
INDONESIAN = "id"
357357
ITALIAN = "it"
358358
JAPANESE = "ja"
359+
KOREAN = "ko"
359360
LITHUANIAN = "lt"
360361
LATVIAN = "lv"
362+
NORWEGIAN = "nb"
361363
DUTCH = "nl"
362364
POLISH = "pl"
363365
PORTUGUESE = "pt" # Only usable as a source language

tests/conftest.py

+2
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,10 @@ def output_document_path(tmpdir):
382382
"ID": "berkas proton",
383383
"IT": "fascio di protoni",
384384
"JA": "陽子ビーム",
385+
"KO": "양성자 빔",
385386
"LT": "protonų spindulys",
386387
"LV": "protonu staru kūlis",
388+
"NB": "protonstråle",
387389
"NL": "protonenbundel",
388390
"PL": "wiązka protonów",
389391
"PT": "feixe de prótons",

0 commit comments

Comments
 (0)