diff --git a/EnvelopeGenerator.Application/Resources/Resource.cs b/EnvelopeGenerator.Application/Resources/Resource.cs index 56b087c3..53c11359 100644 --- a/EnvelopeGenerator.Application/Resources/Resource.cs +++ b/EnvelopeGenerator.Application/Resources/Resource.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.Localization; -using System.Runtime.CompilerServices; namespace EnvelopeGenerator.Application.Resources; @@ -328,39 +327,39 @@ public static class Extensions /// /// /// - /// + /// /// - public static string LockedTitle(this IStringLocalizer localizer, object? arg0) => string.Format(localizer[nameof(Privacy)].Value, arg0); + public static string LockedTitle(this IStringLocalizer localizer, string suffix) => localizer[nameof(LockedTitle) + suffix].Value; /// /// /// /// - /// + /// /// - public static string LockedBody(this IStringLocalizer localizer, object? arg0) => string.Format(localizer[nameof(LockedBody)].Value, arg0); + public static string LockedBody(this IStringLocalizer localizer, string suffix) => localizer[nameof(LockedBody) + suffix].Value; /// /// /// /// - /// + /// /// - public static string LockedCodeLabel(this IStringLocalizer localizer, object? arg0) => string.Format(localizer[nameof(LockedCodeLabel)].Value, arg0); + public static string LockedCodeLabel(this IStringLocalizer localizer, string suffix) => localizer[nameof(LockedCodeLabel) + suffix].Value; /// /// /// /// - /// + /// /// - public static string LockedFooterTitle(this IStringLocalizer localizer, object? arg0) => string.Format(localizer[nameof(LockedFooterTitle)].Value, arg0); + public static string LockedFooterTitle(this IStringLocalizer localizer, string suffix) => localizer[nameof(LockedFooterTitle) + suffix].Value; /// /// /// /// - /// + /// /// - public static string LockedFooterBody(this IStringLocalizer localizer, object? arg0) => string.Format(localizer[nameof(LockedFooterBody)].Value, arg0); + public static string LockedFooterBody(this IStringLocalizer localizer, string suffix) => localizer[nameof(LockedFooterBody) + suffix].Value; } \ No newline at end of file diff --git a/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml b/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml index 32ed7f40..7d6815d8 100644 --- a/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml +++ b/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml @@ -6,9 +6,9 @@ //TODO: Create view model var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string; var cImg = _cImgOpt.Value; - ViewData["Title"] = _localizer.DocProtected(); string codeType = ViewData["CodeType"] is string _codeType ? _codeType : "accessCode"; string codeKeyName = (char.ToUpper(codeType[0]) + codeType.Substring(1)).Replace("Code", ""); + ViewData["Title"] = _localizer.LockedTitle(codeKeyName); bool viaSms = codeType == "smsCode"; bool viaAuthenticator = codeType == "authenticatorCode"; bool viaTFA = viaSms || viaAuthenticator;