The `PdfPass` interaction type and its associated logic were removed as it is no longer needed. This simplifies the codebase by eliminating redundant entries and ensures clarity in interaction types.
37 lines
1.4 KiB
C#
37 lines
1.4 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.Verify => "Verifizierung",
|
|
InteractionType.Complete => "Fertig",
|
|
InteractionType.StepInBriefing => appSettings.Terms.StepInName ?? "StepIn",
|
|
InteractionType.ReleasedForVerification => "Freigabe zum Freischalten",
|
|
_ => type.ToString()
|
|
};
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |