Skip to content

Commit aa89025

Browse files
BriannaDelgadoJanEbbing
authored andcommitted
feat: add document minification
1 parent a72cdf6 commit aa89025

14 files changed

+737
-39
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.12.0] - 2025-01-09
8+
### Added
9+
* Added document minification as a feature before document translation, to
10+
allow translation of large docx or pptx files. For more info check the README.
711

812
## [1.11.0] - 2024-11-15
913
### Added
@@ -169,7 +173,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
169173
## [0.1.0] - 2021-11-05
170174
Initial release.
171175

172-
176+
[1.12.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.11.0...v1.12.0
173177
[1.11.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.10.0...v1.11.0
174178
[1.10.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.9.0...v1.10.0
175179
[1.9.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.8.0...v1.9.0

DeepL/DeepL.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<PropertyGroup>
44
<Description>DeepL.net is the official DeepL .NET client library.</Description>
55
<AssemblyTitle>DeepL.net</AssemblyTitle>
6-
<Version>1.11.0</Version>
7-
<PackageVersion>1.11.0</PackageVersion>
8-
<FileVersion>1.11.0.0</FileVersion>
6+
<Version>1.12.0</Version>
7+
<PackageVersion>1.12.0</PackageVersion>
8+
<FileVersion>1.12.0.0</FileVersion>
99
<AssemblyVersion>1.0.0.0</AssemblyVersion>
1010
<TargetFrameworks>net5.0;netstandard2.0</TargetFrameworks>
1111
<LangVersion>8</LangVersion>
@@ -32,14 +32,14 @@
3232
</PropertyGroup>
3333

3434
<ItemGroup>
35-
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="5.0.1" />
36-
<PackageReference Include="System.Text.Json" Version="5.0.2" />
35+
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="5.0.1"/>
36+
<PackageReference Include="System.Text.Json" Version="5.0.2"/>
3737
</ItemGroup>
3838

3939

4040
<ItemGroup>
41-
<None Include="..\README.md" Pack="true" PackagePath="" />
42-
<None Include="..\icon.png" Pack="true" PackagePath="" />
41+
<None Include="..\README.md" Pack="true" PackagePath=""/>
42+
<None Include="..\icon.png" Pack="true" PackagePath=""/>
4343
</ItemGroup>
4444

4545
</Project>

DeepL/DeepLException.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,30 @@ public DocumentTranslationException(string message, Exception innerException, Do
103103
/// The handle can be used to later retrieve the document or to contact DeepL support.
104104
public DocumentHandle? DocumentHandle { get; }
105105
}
106+
107+
/// <summary>
108+
/// Exception thrown if an error occurs during the minification phase of document minification.
109+
/// See <see cref="DocumentMinifier.MinifyDocument"/>
110+
/// </summary>
111+
public sealed class DocumentMinificationException : DeepLException {
112+
/// <summary>Initializes a new instance of the <see cref="DocumentMinificationException" /> class.</summary>
113+
/// <param name="message">The message that describes the error.</param>
114+
/// <param name="innerException">The exception representing the connection error.</param>
115+
public DocumentMinificationException(string message, Exception innerException) :
116+
base(message, innerException) {
117+
}
118+
}
119+
120+
/// <summary>
121+
/// Exception thrown if an error occurs during the minification phase of document deminification.
122+
/// See <see cref="DocumentMinifier.DeminifyDocument"/>
123+
/// </summary>
124+
public sealed class DocumentDeminificationException : DeepLException {
125+
/// <summary>Initializes a new instance of the <see cref="DocumentDeminificationException" /> class.</summary>
126+
/// <param name="message">The message that describes the error.</param>
127+
/// <param name="innerException">The exception representing the connection error.</param>
128+
public DocumentDeminificationException(string message, Exception innerException) :
129+
base(message, innerException) {
130+
}
131+
}
106132
}

0 commit comments

Comments
 (0)