Add more translations (#6302)

* Newlines

* Dashboard

* Add more translations

* Moar

* Remove   from translated texts

* Dictionary controller translations

* Batch 1 of controller updates

* Batch 2 of controller updates

* Component translations

* Batch 3 of controller updates

* Fixes
This commit is contained in:
d11n
2024-10-17 15:51:40 +02:00
committed by GitHub
parent 7e1712c8cd
commit 77fba4aee3
204 changed files with 2639 additions and 1556 deletions

View File

@@ -11,6 +11,7 @@ using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
using StoreData = BTCPayServer.Data.StoreData;
namespace BTCPayServer.Plugins.PayButton.Controllers
@@ -25,18 +26,21 @@ namespace BTCPayServer.Plugins.PayButton.Controllers
StoreRepository repo,
UIStoresController storesController,
UserManager<ApplicationUser> userManager,
IStringLocalizer stringLocalizer,
AppService appService)
{
_repo = repo;
_userManager = userManager;
_appService = appService;
_storesController = storesController;
StringLocalizer = stringLocalizer;
}
readonly StoreRepository _repo;
readonly UserManager<ApplicationUser> _userManager;
private readonly AppService _appService;
private readonly UIStoresController _storesController;
public IStringLocalizer StringLocalizer { get; }
[HttpPost("{storeId}/disable-anyone-can-pay")]
public async Task<IActionResult> DisableAnyoneCanCreateInvoice(string storeId)
@@ -44,7 +48,7 @@ namespace BTCPayServer.Plugins.PayButton.Controllers
var blob = GetCurrentStore.GetStoreBlob();
blob.AnyoneCanInvoice = false;
GetCurrentStore.SetStoreBlob(blob);
TempData[WellKnownTempData.SuccessMessage] = "Feature disabled";
TempData[WellKnownTempData.SuccessMessage] = StringLocalizer["Feature disabled"].Value;
await _repo.UpdateStore(GetCurrentStore);
return RedirectToAction(nameof(PayButton), new { storeId });
}
@@ -93,7 +97,7 @@ namespace BTCPayServer.Plugins.PayButton.Controllers
if (GetCurrentStore.SetStoreBlob(blob))
{
await _repo.UpdateStore(GetCurrentStore);
TempData[WellKnownTempData.SuccessMessage] = "Store successfully updated";
TempData[WellKnownTempData.SuccessMessage] = StringLocalizer["Store successfully updated"].Value;
}
return RedirectToAction(nameof(PayButton), new