mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-20 23:44:21 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user