From 0988c05b7f3432bf641557f048c59fc1a1d81c14 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 24 Aug 2022 09:03:13 +0200 Subject: [PATCH] feat: New language Ukrainian (uk): add language code constant and tests --- CHANGELOG.md | 10 ++++++++++ DeepL/LanguageCode.cs | 3 +++ DeepLTests/BaseDeepLTest.cs | 7 +++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c6e0a..865e43d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/DeepL/LanguageCode.cs b/DeepL/LanguageCode.cs index c467410..bd36d24 100644 --- a/DeepL/LanguageCode.cs +++ b/DeepL/LanguageCode.cs @@ -96,6 +96,9 @@ public static class LanguageCode { /// Turkish language code, may be used as source or target language. public const string Turkish = "tr"; + /// Ukrainian language code, may be used as source or target language. + public const string Ukrainian = "uk"; + /// Chinese language code, may be used as source or target language. public const string Chinese = "zh"; diff --git a/DeepLTests/BaseDeepLTest.cs b/DeepLTests/BaseDeepLTest.cs index 6517c82..6e5b432 100644 --- a/DeepLTests/BaseDeepLTest.cs +++ b/DeepLTests/BaseDeepLTest.cs @@ -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: @@ -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() => @@ -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 CreateSessionHeaders(string testName, SessionOptions options) {