Skip to content

Commit

Permalink
mutable translations
Browse files Browse the repository at this point in the history
  • Loading branch information
bdongus committed Apr 19, 2024
1 parent 1f7fcf8 commit 20809c5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
31 changes: 27 additions & 4 deletions idee5.Globalization/Models/Translation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,30 @@
/// <summary>
/// The translation
/// </summary>
/// <param name="Language">Language id according to BCP 47 http://tools.ietf.org/html/bcp47</param>
/// <param name="Value">Value of the resource for the specified culture and parlance</param>
/// <param name="Comment">Additional information. Mostly used to create semantic context to simplify translations</param>
public record Translation(string Language, string Value, string? Comment = null);
public record Translation {
/// <summary>
/// Create a new translation
/// </summary>
/// <param name="language">Language id according to BCP 47 http://tools.ietf.org/html/bcp47</param>
/// <param name="value">Value of the resource for the specified culture and parlance</param>
/// <param name="comment">Additional information. Mostly used to create semantic context to simplify translations</param>
public Translation(string language, string value, string? comment = null) {
Language = language;
Value = value;
Comment = comment;
}
/// <summary>
/// Language id according to BCP 47 http://tools.ietf.org/html/bcp47
/// </summary>
public string Language { get; set; }

/// <summary>
/// Value of the resource for the specified culture and parlance
/// </summary>
public string Value { get; set; }

/// <summary>
/// Additional information. Mostly used to create semantic context to simplify translations
/// </summary>
public string? Comment { get; set; }
}
2 changes: 1 addition & 1 deletion idee5.Globalization/idee5.Globalization.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Description>Globalization extensions. Enables database support for localization resources and parlances for industries and customers..</Description>
<Company>idee5</Company>
<Copyright>© idee5 2016 - 2024</Copyright>
<Version>3.5.5</Version>
<Version>3.5.6</Version>
<PackageTags>idee5, Globalization, Localization</PackageTags>
<PackageReleaseNotes>Improved serialization support</PackageReleaseNotes>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit 20809c5

Please sign in to comment.