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

@@ -3,6 +3,7 @@ using BTCPayServer.Configuration;
using BTCPayServer.Controllers;
using BTCPayServer.Data;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Localization;
namespace BTCPayServer.Services.Notifications.Blobs;
@@ -28,15 +29,16 @@ internal class InviteAcceptedNotification : BaseNotification
StoreName = store.StoreName;
}
internal class Handler(LinkGenerator linkGenerator, BTCPayServerOptions options)
internal class Handler(LinkGenerator linkGenerator, BTCPayServerOptions options, IStringLocalizer stringLocalizer)
: NotificationHandler<InviteAcceptedNotification>
{
private IStringLocalizer StringLocalizer { get; } = stringLocalizer;
public override string NotificationType => TYPE;
public override (string identifier, string name)[] Meta
{
get
{
return [(TYPE, "User accepted invitation")];
return [(TYPE, StringLocalizer["User accepted invitation"])];
}
}
@@ -45,7 +47,7 @@ internal class InviteAcceptedNotification : BaseNotification
vm.Identifier = notification.Identifier;
vm.Type = notification.NotificationType;
vm.StoreId = notification.StoreId;
vm.Body = $"User {notification.UserEmail} accepted the invite to {notification.StoreName}.";
vm.Body = StringLocalizer["User {0} accepted the invite to {1}.", notification.UserEmail, notification.StoreName];
vm.ActionLink = linkGenerator.GetPathByAction(nameof(UIStoresController.StoreUsers),
"UIStores",
new { storeId = notification.StoreId }, options.RootPath);