//
// TranslatableString.cs
//
// Copyright (c) František Boháček. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics.CodeAnalysis;
namespace NosSmooth.Data.Abstractions.Language;
///
/// Represents a string that may be translated.
///
/// The root key of the translations.
/// The key of the string translation.
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1313:Parameter names should begin with lower-case letter", Justification = "Standard.")]
public record struct TranslatableString(TranslationRoot Root, string Key)
{
///
/// Gets the translated string, if available.
/// If not available, the key will be returned.
///
public string Translated { get; private set; } = Key;
///
/// Fill this translatable string with a translation.
///
/// The translation to fill.
public void Fill(string translation)
{
Translated = translation;
}
}