29 lines
840 B
C#
29 lines
840 B
C#
using DataModel.Database.Common;
|
|
|
|
namespace DataModel.Database;
|
|
|
|
public sealed class Translation
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
public Guid UniqueId { get; set; }
|
|
|
|
public TextElement TextElement { get; set; }
|
|
|
|
public string Culture { get; set; } = "en-US";
|
|
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
public bool TranslateManual { get; set; } = false;
|
|
|
|
internal DataContext.JsonUniqueId JsonUniqueId => new($"{this.TextElement.Code}::{this.Culture}", this.UniqueId, "Trans");
|
|
|
|
internal DataContext.JsonTranslation ToJsonTranslation() => new()
|
|
{
|
|
UniqueId = this.JsonUniqueId,
|
|
Culture = this.Culture,
|
|
TranslateManual = this.TranslateManual,
|
|
TextElementUniqueId = this.TextElement.JsonUniqueId,
|
|
Text = this.Text,
|
|
};
|
|
} |