Skip to content

Commit a8c2bc7

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

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Added
99
* Add example maven project using this library.
10+
* New languages available: Korean (`'ko'`) and Norwegian (bokmål) (`'nb'`). Add
11+
language code constants and tests.
12+
13+
Note: older library versions also support the new languages, this update only
14+
adds new code constants.
1015
### Changed
1116
### Deprecated
1217
### Removed

Diff for: deepl-java/src/main/java/com/deepl/api/LanguageCode.java

+6
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,18 @@ public class LanguageCode {
6262
/** Japanese language code, may be used as source or target language. */
6363
public static final String Japanese = "ja";
6464

65+
/** Korean language code, may be used as source or target language. */
66+
public static final String Korean = "ko";
67+
6568
/** Lithuanian language code, may be used as source or target language. */
6669
public static final String Lithuanian = "lt";
6770

6871
/** Latvian language code, may be used as source or target language. */
6972
public static final String Latvian = "lv";
7073

74+
/** Norwegian (bokmål) language code, may be used as source or target language. */
75+
public static final String Norwegian = "nb";
76+
7177
/** Dutch language code, may be used as source or target language. */
7278
public static final String Dutch = "nl";
7379

Diff for: deepl-java/src/test/java/com/deepl/api/GeneralTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void testGetSourceAndTargetLanguages() throws DeepLException, InterruptedExcepti
7070
}
7171
Assertions.assertNull(language.getSupportsFormality());
7272
}
73-
Assertions.assertTrue(sourceLanguages.size() > 20);
73+
Assertions.assertTrue(sourceLanguages.size() >= 29);
7474

7575
for (Language language : targetLanguages) {
7676
Assertions.assertNotNull(language.getSupportsFormality());
@@ -79,7 +79,7 @@ void testGetSourceAndTargetLanguages() throws DeepLException, InterruptedExcepti
7979
Assertions.assertEquals("German", language.getName());
8080
}
8181
}
82-
Assertions.assertTrue(targetLanguages.size() > 20);
82+
Assertions.assertTrue(targetLanguages.size() >= 31);
8383
}
8484

8585
@Test

Diff for: deepl-java/src/test/java/com/deepl/api/TestBase.java

+2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ public class TestBase {
6464
exampleText.put("id", "berkas proton");
6565
exampleText.put("it", "fascio di protoni");
6666
exampleText.put("ja", "陽子ビーム");
67+
exampleText.put("ko", "양성자 빔");
6768
exampleText.put("lt", "protonų spindulys");
6869
exampleText.put("lv", "protonu staru kūlis");
70+
exampleText.put("nb", "protonstråle");
6971
exampleText.put("nl", "protonenbundel");
7072
exampleText.put("pl", "wiązka protonów");
7173
exampleText.put("pt", "feixe de prótons");

0 commit comments

Comments
 (0)