Adds localization support across application views
Implements localization for dashboard, cash register, account, and profile sections Adds localization keys for various UI elements, improving internationalization support Refactors view components to use ILocalizationService for dynamic text rendering Prepares ground for multi-language support with translation-ready markup
This commit is contained in:
parent
1f400dcc6e
commit
ef174af0e1
36 changed files with 821 additions and 263 deletions
|
|
@ -1,8 +1,10 @@
|
|||
@using PlanTempus.Application.Features.Accounts.Models
|
||||
@using PlanTempus.Application.Features.Localization.Services
|
||||
@model IEnumerable<PlanInfo>
|
||||
|
||||
@{
|
||||
var currentPlanKey = (string)ViewBag.CurrentPlanKey;
|
||||
var L = (ILocalizationService)ViewBag.Localization;
|
||||
}
|
||||
|
||||
<swp-plan-grid>
|
||||
|
|
@ -16,14 +18,14 @@
|
|||
};
|
||||
|
||||
var badgeClass = isCurrent ? "current" : plan.BadgeClass;
|
||||
var badgeText = isCurrent ? "Nuværende plan" : plan.BadgeText;
|
||||
var badgeText = isCurrent ? L.Get("account.subscription.currentPlan") : plan.BadgeText;
|
||||
var badgeIcon = isCurrent ? "ph-check" : plan.BadgeIcon;
|
||||
|
||||
var buttonText = isCurrent
|
||||
? "Nuværende plan"
|
||||
? L.Get("account.subscription.currentPlan")
|
||||
: plan.IsContactSales
|
||||
? "Kontakt salg"
|
||||
: $"Skift til {plan.Name}";
|
||||
? L.Get("account.subscription.contactSales")
|
||||
: L.Get("account.subscription.switchTo").Replace("{plan}", plan.Name);
|
||||
|
||||
var buttonClass = isCurrent
|
||||
? "secondary"
|
||||
|
|
@ -42,11 +44,11 @@
|
|||
@if (plan.PricePerMonth.HasValue)
|
||||
{
|
||||
<swp-plan-price-amount>@plan.PriceDisplay</swp-plan-price-amount>
|
||||
<swp-plan-price-period>kr/md</swp-plan-price-period>
|
||||
<swp-plan-price-period localize="account.subscription.pricePerMonth">kr/md</swp-plan-price-period>
|
||||
}
|
||||
else
|
||||
{
|
||||
<swp-plan-price-amount>Kontakt os</swp-plan-price-amount>
|
||||
<swp-plan-price-amount localize="account.subscription.contactUs">Kontakt os</swp-plan-price-amount>
|
||||
}
|
||||
</swp-plan-price>
|
||||
<swp-plan-features>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue