Files
btcpayserver/BTCPayServer/Views/UIUserStores/ListStores.cshtml
Dennis Reimann a9fbba5825 UI: Fix and unify localizer usage for page titles
Issue was caused by duplicate translation through a combination of `StringLocalizer` and `text-translate="true"` usage. Fixes #6622.
2025-03-11 10:54:17 +01:00

40 lines
1.3 KiB
Plaintext

@using BTCPayServer.Client
@model BTCPayServer.Models.StoreViewModels.ListStoresViewModel
@{
ViewData.SetActivePage(StoreNavPages.Index, Model.Archived ? StringLocalizer["Archived Stores"] : StringLocalizer["Stores"]);
}
<h2 class="mb-2 mb-lg-3">@ViewData["Title"]</h2>
<partial name="_StatusMessage" />
@if (Model.Stores.Any())
{
<table class="table table-hover">
<thead>
<tr>
<th text-translate="true">Store Name</th>
</tr>
</thead>
<tbody>
@foreach (var store in Model.Stores)
{
<tr>
<td>
<a asp-action="Index" asp-controller="UIStores" asp-route-storeId="@store.StoreId" id="Store-@store.StoreId">@store.StoreName</a>
@if (store.Archived)
{
<span class="badge bg-info ms-2" text-translate="true">archived</span>
}
</td>
</tr>
}
</tbody>
</table>
}
else
{
<p class="text-secondary mt-3">
<span text-translate="true">There are no stores yet.</span>
<span permission="@Policies.CanModifyStoreSettingsUnscoped"><a asp-action="CreateStore" text-translate="true">Create a store</a>.</span>
</p>
}