// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Infrastructure.Reflection;
using Squidex.Text.Translations;
namespace Squidex.Areas.Api.Controllers.Translations.Models
{
public sealed class TranslationDto
{
///
/// The result of the translation.
///
public TranslationResultCode Result { get; set; }
///
/// The translated text.
///
public string? Text { get; set; }
public static TranslationDto FromTranslation(TranslationResult translation)
{
return SimpleMapper.Map(translation, new TranslationDto());
}
}
}