Adjusted the header text in ProspectContainer to include the prospect's name for better context. Refined translation terms for interaction types in TermHelper to improve clarity and consistency.
38 lines
1.5 KiB
C#
38 lines
1.5 KiB
C#
#nullable enable
|
|
|
|
using FoodsharingSiegen.Contracts.Entity;
|
|
using FoodsharingSiegen.Contracts.Model;
|
|
|
|
namespace FoodsharingSiegen.Shared.Helper
|
|
{
|
|
public static class TermHelper
|
|
{
|
|
#region Public Method Translate
|
|
|
|
/// <summary>
|
|
/// Translates an <see cref="InteractionType" /> instance into a corresponding string representation,
|
|
/// using the provided application settings if necessary.
|
|
/// </summary>
|
|
/// <param name="type">The interaction type to translate.</param>
|
|
/// <param name="appSettings">The application settings used for custom translations.</param>
|
|
/// <returns>A string representation of the specified interaction type.</returns>
|
|
public static string Translate(this InteractionType type, AppSettings appSettings)
|
|
{
|
|
return type switch
|
|
{
|
|
InteractionType.EinAb => "Einführung",
|
|
InteractionType.Welcome => "Begrüßung",
|
|
InteractionType.IdCheck => "Perso-Check",
|
|
InteractionType.PrintPass => "FS-Ausweis",
|
|
InteractionType.PdfPass => "FS-Ausweis (PDF)",
|
|
InteractionType.Verify => "Verifizierung",
|
|
InteractionType.Complete => "Fertig",
|
|
InteractionType.StepInBriefing => appSettings.Terms.StepInName ?? "StepIn",
|
|
InteractionType.ReleasedForVerification => "Freigabe zum Freischalten",
|
|
_ => type.ToString()
|
|
};
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |