Skip to content

Commit

Permalink
feat: New language Ukrainian (uk): add language code constant and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-jones-dev committed Aug 24, 2022
1 parent fc2a189 commit 0988c05
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased]
### Added
* New language available: Ukrainian (`'uk'`). Add language code constant and
tests.

Note: older library versions also support new languages, this update only
adds new code constant.


## [1.3.0] - 2022-08-02
### Added
* Add `Translator.createGlossaryFromCsvAsync()` allowing glossaries downloaded
Expand Down Expand Up @@ -86,6 +95,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Initial release.


[Unreleased]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.3.0..HEAD
[1.3.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.2.1..v1.3.0
[1.2.1]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.2.0..v1.2.1
[1.2.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.1.0..v1.2.0
Expand Down
3 changes: 3 additions & 0 deletions DeepL/LanguageCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public static class LanguageCode {
/// <summary>Turkish language code, may be used as source or target language.</summary>
public const string Turkish = "tr";

/// <summary>Ukrainian language code, may be used as source or target language.</summary>
public const string Ukrainian = "uk";

/// <summary>Chinese language code, may be used as source or target language.</summary>
public const string Chinese = "zh";

Expand Down
7 changes: 5 additions & 2 deletions DeepLTests/BaseDeepLTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ protected static string ExampleText(string language) {
return "protonstråle";
case "tr":
return "proton ışını";
case "uk":
return "протонний пучок";
case "zh":
return "质子束";
default:
Expand All @@ -123,7 +125,7 @@ protected static string[] ExpectedSourceLanguages() =>
LanguageCode.Italian, LanguageCode.Japanese, LanguageCode.Lithuanian, LanguageCode.Latvian,
LanguageCode.Dutch, LanguageCode.Polish, LanguageCode.Portuguese, LanguageCode.Romanian,
LanguageCode.Russian, LanguageCode.Slovak, LanguageCode.Slovenian, LanguageCode.Swedish,
LanguageCode.Turkish, LanguageCode.Chinese
LanguageCode.Turkish, LanguageCode.Ukrainian, LanguageCode.Chinese
};

protected static string[] ExpectedTargetLanguages() =>
Expand All @@ -134,7 +136,8 @@ protected static string[] ExpectedTargetLanguages() =>
LanguageCode.Indonesian, LanguageCode.Italian, LanguageCode.Japanese, LanguageCode.Lithuanian,
LanguageCode.Latvian, LanguageCode.Dutch, LanguageCode.Polish, LanguageCode.PortugueseBrazilian,
LanguageCode.PortugueseEuropean, LanguageCode.Romanian, LanguageCode.Russian, LanguageCode.Slovak,
LanguageCode.Slovenian, LanguageCode.Swedish, LanguageCode.Turkish, LanguageCode.Chinese
LanguageCode.Slovenian, LanguageCode.Swedish, LanguageCode.Turkish, LanguageCode.Ukrainian,
LanguageCode.Chinese
};

private static Dictionary<string, string?> CreateSessionHeaders(string testName, SessionOptions options) {
Expand Down

0 comments on commit 0988c05

Please sign in to comment.