Repository navigation
v2.0.0
TL;DR: this release has breaking changes. See Upgrading to 2.0.0 for how to adapt.
Added
- Added the interfaces
ITextTranslator(TranslateTextAsync()),IDocumentTranslator(TranslateDocumentAsync(),
TranslateDocumentUploadAsync(),TranslateDocumentGetStatusAsync(),TranslateDocumentWaitUntilDoneAsync(),
TranslateDocumentDownloadAsync(), all overloads),ILanguageProvider(GetSourceLanguagesAsync(),
GetTargetLanguagesAsync(),GetGlossaryLanguagesAsync()) andIUsageProvider(GetUsageAsync()), implemented
byDeepLClient. They take the place of the removedITranslator, for example for mocking. - Breaking:
IGlossaryManagernow also declares the v2 glossary methodsCreateGlossaryAsync(),CreateGlossaryFromCsvAsync(),
GetGlossaryAsync(),WaitUntilGlossaryReadyAsync(),ListGlossariesAsync(),GetGlossaryEntriesAsync()and
DeleteGlossaryAsync(). Classes implementingIGlossaryManagerthemselves must add them. - Breaking:
IGlossaryManagernow also declares theDeepLClientoverloads that takeCreateMultilingualGlossaryOptions,
ReplaceMultilingualGlossaryDictionaryOptionsorBaseRequestOptions, theMultilingualGlossaryInfooverloads
ofGetMultilingualGlossaryAsync()andUpdateMultilingualGlossaryNameAsync(), and both
UpdateMultilingualGlossaryAsync()overloads. Classes implementingIGlossaryManagerthemselves must add them. - Breaking:
ITranslationMemoryManagernow also declares theDeepLClientoverloads that take
TranslationMemorySegmentsOptions,CreateTranslationMemoryImportOptions,ImportTranslationMemoryOptions, a
timeout or aTranslationMemoryJob. Classes implementingITranslationMemoryManagerthemselves must add them. - Breaking:
IWriternow also declares bothCorrectTextAsync()overloads. Classes implementingIWriterthemselves must
add them. - Breaking:
IStyleRuleManagernow also declares theDeepLClientoverloads that take aStyleRuleInfoor
CustomInstruction, and those that takeCreateStyleRuleOptions,UpdateStyleRuleNameOptions,
UpdateStyleRuleConfiguredRulesOptions,CreateStyleRuleCustomInstructionOptionsor
UpdateStyleRuleCustomInstructionOptions. Classes implementingIStyleRuleManagerthemselves must add them.
Changed
- Breaking: The package now targets
net8.0andnetstandard2.0; thenet5.0target is removed. .NET 5, 6 and 7
applications now use thenetstandard2.0build, which has no separate connect timeout (see
PerRetryConnectionTimeoutin the README) and does not honour cancellation while it copies a translation
memory export to a stream. The library is supported on .NET 8 and later, and on .NET Framework 4.6.2 and later.
Move applications on .NET 5, 6 or 7 to .NET 8 or later. - Breaking: The
System.Text.Jsondependency is now10.0.14and applies to thenetstandard2.0build only;net8.0uses
the framework's ownSystem.Text.Json. Applications onnetstandard2.0platforms that pin an older
System.Text.Jsonmust raise it to at least10.0.14. - Breaking: The
Microsoft.Extensions.Http.Pollydependency is now8.0.33(still Polly 7). Retry and timeout behaviour
are unchanged. Applications that pinMicrosoft.Extensions.HttporMicrosoft.Extensions.Http.Pollybelow 8.0
must raise them. - Breaking: The library is now tested on .NET 8 and .NET 10, instead of .NET 5 and .NET Core 3.1; the
netstandard2.0build
is tested on the .NET 8 runtime. .NET Core 3.1 and .NET 5 to 7 are not supported: theSystem.Text.Json10 and
Microsoft.Extensions.Http8 dependencies do not support them, and applications targeting them get a build
warning that the package "doesn't support" their target framework (an error withTreatWarningsAsErrors). Set
theSuppressTfmSupportBuildWarningsMSBuild property totrueto silence it, at your own risk. - Breaking: Glossary endpoints (v2 and v3 multilingual) now throw
NotFoundExceptionon HTTP 404, like every other endpoint;
they threw its subclassGlossaryNotFoundExceptionbefore. Code catchingNotFoundExceptionis unaffected.
CatchNotFoundExceptioninstead ofGlossaryNotFoundException. - Breaking:
DeepL.Internal.LargeFormUrlEncodedContent,MultilingualGlossaryDictionaryEntriesResultand the
MultilingualGlossaryDictionaryEntriesconstructor taking aMultilingualGlossaryDictionaryEntriesResultare now
internal. ConstructMultilingualGlossaryDictionaryEntriesfrom the language codes and aGlossaryEntries
object instead. - Breaking:
StyleRuleInfo.ConfiguredRulesis now aDictionary<string, Dictionary<string, string>>, the API's
configured_rulesobject as sent (category to rule to value, keyed by the API names), the same shape
CreateStyleRuleAsync()andUpdateStyleRuleConfiguredRulesAsync()take. Categories the removed
ConfiguredRulesclass lacked are no longer dropped. Replacerule.ConfiguredRules?.DatesAndTimeswith
rule.ConfiguredRules?["dates_and_times"](orTryGetValue("dates_and_times", ...)), and likewise for the other
categories. TheIStyleRuleManagermethodsCreateStyleRuleAsync()andUpdateStyleRuleConfiguredRulesAsync()
now take this map too, and so does theStyleRuleInfoconstructor. - Breaking: Text translation, rephrasing and correction, v2 glossary creation, and v3 glossary creation, renaming and
dictionary updates (CreateMultilingualGlossaryAsync(),CreateMultilingualGlossaryFromCsvAsync(),
UpdateMultilingualGlossaryNameAsync(),UpdateMultilingualGlossaryDictionaryAsync()and
UpdateMultilingualGlossaryDictionaryFromCsvAsync()) now send JSON request bodies instead of form-encoded ones.
text, the tag lists,custom_instructionsandglossary_idsare sent as JSON arrays, the v3dictionariesas
an array of objects, and booleans and numbers with their JSON types. Code that intercepts or asserts on request
bodies (proxies, test doubles) sees JSON withContent-Type: application/json. Document upload stays multipart,
withglossary_idscomma-separated as before. Such code must parse the JSON body instead of form fields. - Breaking:
BaseRequestOptions.ExtraBodyParameters(on every options class, including those ofDeepLAdminClient) is now a
Dictionary<string, object?>, so extra parameters can be booleans, numbers, arrays or objects. In JSON bodies each
value is sent with its JSON type, and anullvalue is sent as JSONnull. In the multipart document
upload, strings are sent as given, collections comma-joined, booleans astrue/[secure], numbers in the invariant
culture and other values as their JSON text. The API does not convert types, so a string for a field it types as
boolean, number or array (for example["outline_detection"] = "0") is now rejected: pass the typed value
(["outline_detection"] = [secure]) or use the matching option. Collection initializers with string values compile
unchanged; variables or helpers declared asDictionary<string, string>must be declared as
Dictionary<string, object?>. - Breaking:
TranslateDocumentAsync()(all overloads) now returnsTask<DocumentStatus>, the final status of the
translation (for example withBilledCharacters). Code that awaits it without using a result compiles unchanged;
classes implementingIDocumentTranslatormust change the return type. - Breaking:
TranslateDocumentWaitUntilDoneAsync()(both overloads) now returnsTask<DocumentStatus>, the final status with
status done, instead of discarding it. Classes implementingIDocumentTranslatormust change the return type. - Breaking:
TranslateDocumentAsync()no longer wraps a cancellation requested through itsCancellationTokenin a
DocumentTranslationException: theOperationCanceledException(usually aTaskCanceledException) propagates
as is, as in the step methods. Code catchingDocumentTranslationExceptionto detect cancellation must catch
OperationCanceledExceptioninstead. Timeouts and other failures are still wrapped. - Breaking:
TranslateDocumentAsync(FileInfo, ...)andTranslateDocumentUploadAsync(FileInfo, ...)now throw an
ArgumentExceptionbefore any request when the input file does not exist or is a directory, instead of a
FileNotFoundException,DirectoryNotFoundExceptionorUnauthorizedAccessException. Other local file failures of
TranslateDocumentAsync(FileInfo, ...)(the input cannot be read, the output file already exists or cannot be
created) now throw aDocumentTranslationExceptionwith theIOExceptionorUnauthorizedAccessExceptionas
InnerException, still before any request; an existing output file is still left unchanged. Catch
ArgumentExceptionandDocumentTranslationExceptioninstead of the I/O exceptions. - Breaking:
TranslationMemoryJob.DoneandTranslationMemoryJobResult.Doneare nowtrueonly for
TranslationMemoryJobStatus.Completed; a failed or expired job is no longer done (checkOkfor those). Code that
usedDoneto mean "finished, successfully or not" must checkDone || !Ok.
WaitUntilTranslationMemoryJobDoneAsync()still returns a completed job and throws aDeepLExceptionfor a failed or expired one. - Breaking:
ImportTranslationMemoryFromFilepathAsync()andExportTranslationMemoryToFilepathAsync()now wrap local file
failures in aTranslationMemoryJobException(see below), with the originalIOExceptionor
UnauthorizedAccessExceptionasInnerException: an input file that cannot be read, an output file that already
exists or cannot be created, and errors writing the output. The checks still run before any job is created, and a
missing input file still throws anArgumentException. CatchDeepLExceptionor
TranslationMemoryJobExceptioninstead of the I/O exceptions. - Breaking:
TextResult.BilledCharactersis now alongandDocumentStatus.BilledCharactersalong?, so counts above
int.MaxValueare kept;DocumentStatusread such a count asnullbefore. TheTextResultand
DocumentStatusconstructors takelongandlong?. Code assigning the value to anintmust cast or use
long. - Breaking:
TranslationMemoryJobResult.SkippedSegmentCountis now along?instead of anint?. The
TranslationMemoryJobResultconstructor takes along?. Code assigning it to anint?must cast or uselong?. - Breaking:
TranslationMemoryJob.Productis now a non-nullablestring, andCreationTimeandUpdatedTimeare non-nullable
DateTimes; a job response without one of them throws aDeepLException. TheTranslationMemoryJob
constructor takes them as required parameters afterresults. Remove null checks and.Valueon these
properties. - Breaking:
Usage.AnyLimitReachedis replaced byUsage.AnyCharacterLimitReached:trueif the account's character limit
(Character) or this API key's character limit (ApiKeyCharacter) is reached. The speech minutes have their own
details (SpeechToTextMinutes,SpeechToSpeechMinutes). Code that needs only the account-wide limit must check
Characterdirectly. - Breaking: operations that create a resource are now retried only when the request was not sent: after HTTP 429
and after a transient network failure before any request byte is written, such as a name resolution failure, a
refused, reset or timed-out connection, an unreachable host or network, or a reset or timeout in the TLS handshake
or the proxy tunnel. A TLS or certificate error and an error answer of a proxy are never retried. They are
TranslateDocumentAsync()andTranslateDocumentUploadAsync(),CreateGlossaryAsync(),
CreateGlossaryFromCsvAsync(),CreateMultilingualGlossaryAsync(),CreateMultilingualGlossaryFromCsvAsync(),
CreateStyleRuleAsync(),CreateStyleRuleCustomInstructionAsync(),CreateStyleProfileAsync(),
CreateSpokenTermsAsync(),CreateTranslationMemoryImportAsync()andCreateTranslationMemoryExportAsync(), like
DeepLAdminClient.CreateDeveloperKeyAsync()before. After a 5xx, a timeout or a broken connection they no longer
retry, andDeepLException.ShouldRetryis[secure], because the resource may already exist; check whether it exists
before creating it again.ImportTranslationMemoryFromFilepathAsync()and
ExportTranslationMemoryToFilepathAsync()create their jobs the same way. - Breaking: a response body cut off mid-read (the connection breaks after the status line) is now retried like a
connection reset, by every method except the resource creates above. It was not retried before. - Breaking: a response body cut off mid-read now throws a
ConnectionExceptionwithShouldRetrytruefor the
resource creates above andDeepLAdminClient.CreateDeveloperKeyAsync()too, which do not retry it themselves; it
was[secure]for them before. This also applies to anHttpClientfromClientFactory: the client now reads the
response body after the headers, so a cut-off body is told apart from a failure to send. - Breaking:
UpdateMultilingualGlossaryNameAsync()now throws anArgumentExceptionfor an empty or whitespace
glossary ID (also from aMultilingualGlossaryInfo), likeUpdateMultilingualGlossaryAsync(). An empty ID sent
the request to the glossary collection path before, and a whitespace ID was sent as the ID. - Breaking: creating a
DeepLClientorDeepLAdminClientnow throws anArgumentExceptionif theProxyoption
is not an absolutehttporhttpsURL. A relative URL threw anInvalidOperationExceptionbefore, and another
scheme, for exampleftp://, was accepted and failed only at the first request. - Breaking: Error messages now include the API's message from a nested
error.messagefield of the response body, as the API
sends for some statuses (for example 414, 500 and 503), when there is no top-levelmessage. It was dropped before.
Code that compares the whole message must match its start or checkHttpStatusCodeinstead. - Breaking:
UploadTranslationMemoryFileAsync()now throws anArgumentExceptionif the upload URL is not an
absolutehttporhttpsURL, before reading the stream. It threw aUriFormatExceptionfor an unparsable URL
before, and aConnectionExceptionat the request for a relative path such as/uploador another scheme such as
ftp://. - Breaking:
DownloadTranslationMemoryExportAsync()now throws aDeepLExceptioninstead of an
ArgumentExceptionif the job has no download URL: the job state comes from the API. CatchDeepLException. - Breaking:
ImportTranslationMemoryFromFilepathAsync()andExportTranslationMemoryToFilepathAsync()now wrap
every failure in the newTranslationMemoryJobException(aDeepLException), with the cause asInnerException:
local file errors, argument errors, API errors, a failed or expired job and an expired timeout. Once the job was
created,JobIdis set andJobholds its last retrieved state;HttpStatusCodeandShouldRetryare copied
from aDeepLExceptioncause. A missing input file still throws anArgumentExceptionbefore any request, an
empty input file now throws before any request too, and cancellation through theCancellationTokenis not
wrapped. Code catchingDeepLExceptionstill catches it; code catching a subclass such asNotFoundException
must catchTranslationMemoryJobExceptionand checkInnerException. - Headers from the
Headersoption that .NET classes as content headers (for exampleContent-Languageor
Content-Encoding) are now sent on the content of requests with a body, replacing the client's value, and are not
sent on requests without a body. Every request failed with aConnectionException("Unexpected request failure")
before. - Breaking: creating a
DeepLClientorDeepLAdminClientnow throws anArgumentExceptionif theServerUrl
option is not an absolutehttporhttpsURL. An unparsable URL threw aUriFormatExceptionbefore, and another
scheme, for exampleftp://, was accepted and failed only at the first request. CatchArgumentExceptioninstead
ofUriFormatException. - Breaking: a
nullvalue inExtraBodyParametersis now sent as JSONnullin the bodies that became JSON (text
translation, rephrasing and correction, and v3 glossary creation, renaming and dictionary updates), where 1.x sent
an empty form value; leave the key out to not send it. In a document upload anullvalue now removes the key,
where 1.x threw anArgumentNullException. - Breaking:
UpdateMultilingualGlossaryDictionaryFromCsvAsync()andReplaceMultilingualGlossaryDictionaryFromCsvAsync()now
throw anArgumentExceptionfor empty or whitespace-only CSV content, without sending a request. The request was
sent to the API before. CatchArgumentExceptionfor empty CSV content. - Breaking: the overloads taking a
MultilingualGlossaryInfo,TranslationMemoryInfo,TranslationMemoryJob,
StyleProfileorSpokenTermsnow throw anArgumentNullException(anArgumentException) for anullobject,
without sending a request. They threw aNullReferenceExceptionbefore.ExportTranslationMemoryToFilepathAsync()
throws aTranslationMemoryJobExceptionwith theArgumentNullExceptionas its cause instead. Catch
ArgumentExceptioninstead ofNullReferenceException. - Breaking:
DeepLAdminClient.CreateDeveloperKeyAsync()is now retried after every transient network failure
raised before the request is written: besides name resolution failures, refused connections and connect timeouts
also an unreachable host or network, a reset or timeout while connecting to the server or proxy, in the proxy tunnel
or in the TLS handshake. The same failures after the request was written are not retried. It threw a
ConnectionExceptionwithShouldRetry[secure]after one attempt before;ShouldRetryistruenow. On .NET 8
and later the connect timeout (half ofPerRetryConnectionTimeout) also covers the proxy tunnel and the TLS
handshake. Migration: none needed; code that retriesCreateDeveloperKeyAsync()itself after such an error now sees
the library's retries first. - Breaking: on .NET Framework a failure to resolve the proxy's name
(WebExceptionStatus.ProxyNameResolutionFailure) is retried like a failure to resolve the server's name and has
ShouldRetrytrue; it was not retried before. - Breaking: language codes are checked before any request, by one rule: a required code that is
nullor empty or
whitespace-only throws, and an optional one that is empty or whitespace-only throws (nullleaves it unset). A
nulltarget language ofTranslateTextAsync(),TranslateDocumentUploadAsync()andTranslateDocumentAsync()
throws anArgumentNullException(anArgumentException; forTranslateDocumentAsync()it is theInnerException
of theDocumentTranslationException) instead of aNullReferenceException. A whitespace-only source or target
language of those methods, ofRephraseTextAsync()and ofCorrectTextAsync()throws anArgumentExceptiontoo;
it was sent to the API before. An empty, whitespace-only ornulllanguage of a dictionary in
CreateMultilingualGlossaryAsync()andUpdateMultilingualGlossaryAsync(), of a term list of the spoken terms
creates, updates andReplaceSpokenTermsListAsync(), and thelangofGetSpokenTermsEntriesAsync()and
DeleteSpokenTermsListAsync()throws anArgumentExceptioninstead of being sent to the API. An empty or
whitespace-onlysourceLanguageof a custom instruction inCreateStyleRuleAsync(),
CreateStyleRuleCustomInstructionAsync()andUpdateStyleRuleCustomInstructionAsync()throws an
ArgumentException;nullstill leaves it unset. - Breaking: an empty or whitespace-only
Glossary,StyleRule,StyleProfileorTranslationMemory, and an
empty or whitespace-only entry ofGlossaryIds, inTextTranslateOptionsorDocumentTranslateOptionsnow throw an
ArgumentExceptionwithout sending a request (forTranslateDocumentAsync()it is theInnerExceptionof the
DocumentTranslationException). They were sent to the API before. Leave the option unset (null) instead. - Breaking: the
CustomInstructionparameter of theGetStyleRuleCustomInstructionAsync(),
UpdateStyleRuleCustomInstructionAsync()andDeleteStyleRuleCustomInstructionAsync()overloads is renamed from
instructiontoinstructionId, the name it has in the overloads taking an ID. Calls that pass it by name must use
instructionId:. - Breaking: a
nulltext, texts list or text entry inTranslateTextAsync(),RephraseTextAsync()and
CorrectTextAsync(), anullentry ofGlossaryIds,IgnoreTags,NonSplittingTags,SplittingTagsor
CustomInstructions, and anullargument of theTextTranslateOptionsconstructors now throw an
ArgumentNullException(anArgumentException) naming it before any request. They threw aNullReferenceException,
anArgumentNullExceptionnamingsource(anulllist), or sent the request before. CatchArgumentException
(orArgumentNullException) instead ofNullReferenceException. - Breaking: a
nullinput or output file or stream, or anullinputFileName, in the
TranslateDocumentAsync(),TranslateDocumentUploadAsync()andTranslateDocumentDownloadAsync()overloads, and a
nullargument of theDocumentTranslateOptionsconstructors now throw anArgumentNullException(an
ArgumentException; forTranslateDocumentAsync()it is theInnerExceptionof the
DocumentTranslationException, except for anullinputFileInfo) before any request. They threw a
NullReferenceExceptionor a plainArgumentException, or failed only after the upload, before. Catch
ArgumentException(orArgumentNullException) instead ofNullReferenceException. - Breaking:
nullIDs, names, language codes, entries, CSV streams and dictionaries of the glossary methods, and
nullarguments or terms ofGlossaryEntriesandMultilingualGlossaryDictionaryEntries, now throw an
ArgumentNullException(anArgumentException) naming the parameter before any request. They threw a
NullReferenceException, a plainArgumentExceptionor anArgumentNullExceptionnamingsource(anull
list), or sent a request tov2/glossaries/, before. CatchArgumentException(orArgumentNullException)
instead ofNullReferenceException. - Breaking:
nullIDs, names, languages, labels, prompts,StyleRuleInfoandCustomInstructionobjects and
customInstructionsentries of the style rule methods now throw anArgumentNullException(anArgumentException)
naming the parameter before any request. They threw a plainArgumentExceptionor sent JSONnullbefore.catch (ArgumentException)still catches them; code comparing the exact exception type must expect
ArgumentNullException. - Breaking: a
nullname or style profile ID and anullentry ofGlossaryIds,StyleRuleIdsor
TranslationMemoryIdsof the style profile methods now throw anArgumentNullException(anArgumentException)
before any request. They threw a plainArgumentExceptionor sent the request before.catch (ArgumentException)
still catches them; code comparing the exact exception type must expectArgumentNullException. - Breaking: a
nullname, spoken terms ID, term list, term list entry or term now throws an
ArgumentNullException(anArgumentException) naming the parameter before any request. It threw a
NullReferenceExceptionor a plainArgumentException, or was sent as JSONnull, before. Catch
ArgumentException(orArgumentNullException) instead ofNullReferenceException. - Breaking:
nullIDs, file names, file paths, upload URLs,TranslationMemoryImportandTranslationMemoryJob
objects and streams of the translation memory methods now throw anArgumentNullException(anArgumentException)
naming the parameter before any request (forExportTranslationMemoryToFilepathAsync()it is theInnerException
of theTranslationMemoryJobException). They threw aNullReferenceExceptionor a plainArgumentException
before. AnullcontentTypeofUploadTranslationMemoryFileAsync()now usesapplication/xml; it threw an
ArgumentExceptionbefore. Anullfile path named the framework'sfileNameparameter before. Catch
ArgumentException(orArgumentNullException) instead ofNullReferenceException. - Breaking:
IsFreeAccountAuthKey(null), anullresource orincludeentry of
GetLanguagesForResourceAsync(), and anullkey ID or label of the developer key methods now throw an
ArgumentNullException(anArgumentException) naming the parameter before any request. They threw a
NullReferenceException, a plainArgumentExceptionor anArgumentNullExceptionnamingstringToEscape, or sent
JSONnull, before. CatchArgumentException(orArgumentNullException) instead ofNullReferenceException.
Removed
- Breaking: Removed
Usage.DocumentandUsage.TeamDocument; the API no longer returns document usage.Usage.ToString()no
longer has the "Documents" and "Team documents" lines. Responses that still contain thedocument_*or
team_document_*fields are parsed as before; the fields are ignored. Remove code that reads these properties. - Breaking: Removed the
ConfiguredRulesclass and theDeepLClient.CreateStyleRuleAsync()and
UpdateStyleRuleConfiguredRulesAsync()overloads taking it. Pass the configured rules as a
Dictionary<string, Dictionary<string, string>>keyed by the API names instead, for example
new() { ["dates_and_times"] = new() { ["calendar_era"] = "use_bc_and_ad" } }for
new ConfiguredRules(datesAndTimes: ...). - Breaking: Removed the
Translatorclass, itsITranslatorinterface andTranslatorOptions.DeepLClientno longer
derives fromTranslatorand now holds all of its methods. Replacenew Translator(authKey, new TranslatorOptions { ... })withnew DeepLClient(authKey, new DeepLClientOptions { ... }), and variables or parameters typed
TranslatororITranslatorwithDeepLClientor the interfaces listed under Added.DeepLClientOptionsnow
derives fromBaseClientOptions. - Breaking: Removed
Translator.AuthKeyIsFreeAccount(); useDeepLClient.IsFreeAccountAuthKey()instead. - Breaking: Removed
TranslateDocumentStatusAsync(); useTranslateDocumentGetStatusAsync()instead. - Breaking: Removed
GlossaryNotFoundException; catchNotFoundExceptioninstead. - Breaking: Removed
TranslationMemoryJobStatus.Downloaded; the DeepL API does not define that status. A"downloaded"status
is nowTranslationMemoryJobStatus.Unknown, with"downloaded"inStatusValue, and
WaitUntilTranslationMemoryJobDoneAsync()keeps polling on it instead of returning. CompareStatusValuewith
"downloaded"where you comparedStatuswithTranslationMemoryJobStatus.Downloaded.
Removing it also renumbersTranslationMemoryJobStatus:Failedis now 3 (was 4),Expired4 (was 5) and
Unknown5 (was 6). Code that stores or compares the numeric values must change. - Breaking: Removed document minification:
DocumentTranslateOptions.EnableDocumentMinification,DocumentMinifier,
IDocumentMinifier,DocumentMinificationExceptionandDocumentDeminificationException. Translate the document
as is; the DeepL API accepts larger documents than when minification was added. A missing or unreadable input
file ofTranslateDocumentAsync()no longer throws aDocumentMinificationException; see Changed for the
exceptions it throws now. - Breaking: Removed the language code constants of the
LanguageCodeclass (for exampleLanguageCode.German). Pass the
language code as a string, for example"de", and useGetSourceLanguagesAsync()andGetTargetLanguagesAsync()
to retrieve the supported languages.LanguageCode.RemoveRegionalVariant()remains. - Breaking: Removed
Usage.JsonFieldsStructand theUsage(in Usage.JsonFieldsStruct)constructor;GetUsageAsync()does not
use them, andUsageno longer has a public constructor. ObtainUsagefromGetUsageAsync(). - Breaking: Removed the obsolete
GlossaryId,StyleIdandTranslationMemoryIdproperties ofTextTranslateOptionsand
DocumentTranslateOptions. UseGlossary,StyleRuleandTranslationMemoryinstead; they take the same ID.
Fixed
- The NuGet package now contains the XML documentation file (
DeepL.net.xml) for each target framework, so IDEs
show the API documentation of the library.