Skip to content

Commit

Permalink
Keeping to naming convention of T.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Jan 29, 2024
1 parent 56e356f commit 0f841b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Lombiq.VueJs.Samples/Controllers/VueSfcController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace Lombiq.VueJs.Samples.Controllers;
// However, you could use any other ways of doing it such as injecting as a shape or using widgets.
public class VueSfcController(IClock clock, IStringLocalizer<VueSfcController> stringLocalizer) : Controller
{
private readonly IStringLocalizer T = stringLocalizer;

[HttpGet]
// Open this from under /Lombiq.VueJs.Samples/VueSfc/Index
public ActionResult Index() => View();
Expand Down Expand Up @@ -47,8 +49,8 @@ public ActionResult EnhancedList(int page = 1) => View(new EnhancedListViewModel
.Select(index => new EnhancedListViewModel.EnhancedListViewModelData
{
Number = index + 1,
Date = stringLocalizer["{0:d}", today.AddDays(index)],
Day = stringLocalizer["{0:dddd}", today.AddDays(index)].Value,
Date = T["{0:d}", today.AddDays(index)],
Day = T["{0:dddd}", today.AddDays(index)].Value,
Random = new Random(index).Next(10) + 1, // Not actually random, more like deterministic noise.
});
}
Expand Down

0 comments on commit 0f841b2

Please sign in to comment.