More Translations (#6318)

* Store selector

* Footer

* Notifications

* Checkout Appearance

* Users list

* Forms

* Emails

* Pay Button

* Edit Dictionary

* Remove newlines, fix typos

* Forms

* Pull payments and payouts

* Various pages

* Use local docs link

* Fix

* Even more translations

* Fixes #6325

* Account pages

* Notifications

* Placeholders

* Various pages and components

* Add more
This commit is contained in:
d11n
2024-10-25 15:48:53 +02:00
committed by GitHub
parent e5611f9165
commit a962e60de9
173 changed files with 1227 additions and 919 deletions

View File

@@ -5,6 +5,7 @@ using BTCPayServer.Configuration;
using BTCPayServer.Controllers;
using ExchangeSharp;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Localization;
namespace BTCPayServer.Services.Notifications.Blobs
{
@@ -16,11 +17,13 @@ namespace BTCPayServer.Services.Notifications.Blobs
{
private readonly LinkGenerator _linkGenerator;
private readonly BTCPayServerOptions _options;
private IStringLocalizer StringLocalizer { get; }
public Handler(LinkGenerator linkGenerator, BTCPayServerOptions options)
public Handler(LinkGenerator linkGenerator, BTCPayServerOptions options, IStringLocalizer stringLocalizer)
{
_linkGenerator = linkGenerator;
_options = options;
StringLocalizer = stringLocalizer;
}
public override string NotificationType => TYPE;
@@ -28,7 +31,7 @@ namespace BTCPayServer.Services.Notifications.Blobs
{
get
{
return new (string identifier, string name)[] { (TYPE, "Payouts") };
return [(TYPE, StringLocalizer["Payouts"])];
}
}
@@ -39,8 +42,8 @@ namespace BTCPayServer.Services.Notifications.Blobs
vm.StoreId = notification.StoreId;
vm.Body = (notification.Status ?? PayoutState.AwaitingApproval) switch
{
PayoutState.AwaitingApproval => "A new payout is awaiting for approval",
PayoutState.AwaitingPayment => "A new payout is approved and awaiting payment",
PayoutState.AwaitingApproval => StringLocalizer["A new payout is awaiting for approval"],
PayoutState.AwaitingPayment => StringLocalizer["A new payout is approved and awaiting payment"],
_ => throw new ArgumentOutOfRangeException()
};
vm.ActionLink = _linkGenerator.GetPathByAction(nameof(UIStorePullPaymentsController.Payouts),