Skip to content

Commit

Permalink
feat: add document minification
Browse files Browse the repository at this point in the history
  • Loading branch information
BriannaDelgado authored and JanEbbing committed Jan 9, 2025
1 parent a72cdf6 commit aa89025
Show file tree
Hide file tree
Showing 14 changed files with 737 additions and 39 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
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).

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

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


[1.12.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.11.0...v1.12.0
[1.11.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.10.0...v1.11.0
[1.10.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.9.0...v1.10.0
[1.9.0]: https://github.com/DeepLcom/deepl-dotnet/compare/v1.8.0...v1.9.0
Expand Down
14 changes: 7 additions & 7 deletions DeepL/DeepL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<Description>DeepL.net is the official DeepL .NET client library.</Description>
<AssemblyTitle>DeepL.net</AssemblyTitle>
<Version>1.11.0</Version>
<PackageVersion>1.11.0</PackageVersion>
<FileVersion>1.11.0.0</FileVersion>
<Version>1.12.0</Version>
<PackageVersion>1.12.0</PackageVersion>
<FileVersion>1.12.0.0</FileVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<TargetFrameworks>net5.0;netstandard2.0</TargetFrameworks>
<LangVersion>8</LangVersion>
Expand All @@ -32,14 +32,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="5.0.1" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="5.0.1"/>
<PackageReference Include="System.Text.Json" Version="5.0.2"/>
</ItemGroup>


<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="" />
<None Include="..\icon.png" Pack="true" PackagePath="" />
<None Include="..\README.md" Pack="true" PackagePath=""/>
<None Include="..\icon.png" Pack="true" PackagePath=""/>
</ItemGroup>

</Project>
26 changes: 26 additions & 0 deletions DeepL/DeepLException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,30 @@ public DocumentTranslationException(string message, Exception innerException, Do
/// The handle can be used to later retrieve the document or to contact DeepL support.
public DocumentHandle? DocumentHandle { get; }
}

/// <summary>
/// Exception thrown if an error occurs during the minification phase of document minification.
/// See <see cref="DocumentMinifier.MinifyDocument"/>
/// </summary>
public sealed class DocumentMinificationException : DeepLException {
/// <summary>Initializes a new instance of the <see cref="DocumentMinificationException" /> class.</summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="innerException">The exception representing the connection error.</param>
public DocumentMinificationException(string message, Exception innerException) :
base(message, innerException) {
}
}

/// <summary>
/// Exception thrown if an error occurs during the minification phase of document deminification.
/// See <see cref="DocumentMinifier.DeminifyDocument"/>
/// </summary>
public sealed class DocumentDeminificationException : DeepLException {
/// <summary>Initializes a new instance of the <see cref="DocumentDeminificationException" /> class.</summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="innerException">The exception representing the connection error.</param>
public DocumentDeminificationException(string message, Exception innerException) :
base(message, innerException) {
}
}
}
Loading

0 comments on commit aa89025

Please sign in to comment.