Switched to using ASP.Net Core localization.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@page
|
||||
@using Props.Services.Content
|
||||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
@model IndexModel
|
||||
@inject ITextualManager<IndexModel> ContentManager
|
||||
@inject IViewLocalizer Localizer
|
||||
@{
|
||||
ViewData["Title"] = "Home page";
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="text-center px-3 my-2 concise">
|
||||
<h1 class="my-2 display-1">Props</h1>
|
||||
<p>
|
||||
@ContentManager.Json.description
|
||||
@Localizer["description"]
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -22,7 +22,7 @@
|
||||
<section class="jumbotron sub">
|
||||
<div class="container d-flex flex-column align-items-center py-2 concise">
|
||||
<i class="bi bi-search" style="font-size: 5rem;"></i>
|
||||
<h2 class="mb-3 mt-4">@ContentManager.Json.help.title</h2>
|
||||
<h2 class="mb-3 mt-4">@Localizer["help.title"]</h2>
|
||||
<form class="concise my-4">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="What are you looking for?" aria-label="Search"
|
||||
@@ -31,10 +31,10 @@
|
||||
</div>
|
||||
</form>
|
||||
<p class="text-center">
|
||||
@ContentManager.Json.help.searchIntroduction
|
||||
@Localizer["help.searchIntroduction"]
|
||||
</p>
|
||||
<p class="text-center">
|
||||
@ContentManager.Json.help.additionalInfo
|
||||
@Localizer["help.additionalInfo"]
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -42,7 +42,7 @@
|
||||
<section class="container d-flex flex-column align-items-center my-3 less-concise">
|
||||
<h2 class="mb-3 mt-4">Our Mission</h2>
|
||||
<p class="text-center">
|
||||
@ContentManager.Json.mission
|
||||
@Localizer["mission"]
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -52,25 +52,55 @@
|
||||
<div class="less-concise d-flex flex-column align-items-center">
|
||||
<h2 class="mb-3 mt-4">Features</h2>
|
||||
<p class="center">
|
||||
@ContentManager.Json.features.description
|
||||
@Localizer["features.description"]
|
||||
</p>
|
||||
</div>
|
||||
<div style="width: 100%;" data-simplebar>
|
||||
<div class="row px-2 py-3 flex-nowrap">
|
||||
@foreach (dynamic feature in ContentManager.Json.features.list)
|
||||
{
|
||||
<div class="card mx-2" style="width: 32rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">@feature.title</h5>
|
||||
<h6 class="card-subtitle mb-3 text-muted">
|
||||
<slot name="subtitle">@feature.subtitle</slot>
|
||||
</h6>
|
||||
<p class="card-text">
|
||||
@feature.text
|
||||
</p>
|
||||
</div>
|
||||
<div class="card mx-2" style="width: 32rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">@Localizer["feature.shoppingList.title"]</h5>
|
||||
<h6 class="card-subtitle mb-3 text-muted">
|
||||
<slot name="subtitle">@Localizer["feature.shoppingList.subtitle"]</slot>
|
||||
</h6>
|
||||
<p class="card-text">
|
||||
@Localizer["feature.shoppingList.text"]
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card mx-2" style="width: 32rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">@Localizer["feature.productComparison.title"]</h5>
|
||||
<h6 class="card-subtitle mb-3 text-muted">
|
||||
<slot name="subtitle">@Localizer["feature.productComparison.subtitle"]</slot>
|
||||
</h6>
|
||||
<p class="card-text">
|
||||
@Localizer["feature.productComparison.text"]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mx-2" style="width: 32rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">@Localizer["feature.autoSearch.title"]</h5>
|
||||
<h6 class="card-subtitle mb-3 text-muted">
|
||||
<slot name="subtitle">@Localizer["feature.autoSearch.subtitle"]</slot>
|
||||
</h6>
|
||||
<p class="card-text">
|
||||
@Localizer["feature.autoSearch.text"]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mx-2" style="width: 32rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">@Localizer["feature.sharing.title"]</h5>
|
||||
<h6 class="card-subtitle mb-3 text-muted">
|
||||
<slot name="subtitle">@Localizer["feature.sharing.subtitle"]</slot>
|
||||
</h6>
|
||||
<p class="card-text">
|
||||
@Localizer["feature.sharing.text"]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@@ -1,7 +1,7 @@
|
||||
@page
|
||||
@using Props.Services.Content
|
||||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
@model SearchModel
|
||||
@inject ITextualManager<SearchModel> ContentManager
|
||||
@inject IViewLocalizer Localizer
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Search";
|
||||
@@ -236,10 +236,10 @@
|
||||
<div class="multipage-title">
|
||||
<h1 class="display-2"><i class="bi bi-stopwatch"></i> Quick Picks</h1>
|
||||
<template x-if="hasResults()">
|
||||
<p>@ContentManager.Json.quickPicks.searched</p>
|
||||
<p>@Localizer["quickPicks.searched"]</p>
|
||||
</template>
|
||||
<template x-if="!hasResults()">
|
||||
<p>@ContentManager.Json.quickPicks.prompt</p>
|
||||
<p>@Localizer["quickPicks.prompt"]</p>
|
||||
</template>
|
||||
<hr class="less-concise">
|
||||
</div>
|
||||
@@ -257,7 +257,7 @@
|
||||
<template x-if="!hasResults()">
|
||||
<div
|
||||
class="text-center less-concise text-muted flex-grow-1 justify-content-center d-flex flex-column">
|
||||
<h2>@ContentManager.Json.notSearched</h2>
|
||||
<h2>@Localizer["notSearched"]</h2>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -266,10 +266,10 @@
|
||||
<div class="multipage-title">
|
||||
<h2><i class="bi bi-view-list"></i> Results</h2>
|
||||
<template x-if="hasResults()">
|
||||
<p>@ContentManager.Json.results.searched</p>
|
||||
<p>@Localizer["results.searched"]</p>
|
||||
</template>
|
||||
<template x-if="!hasResults()">
|
||||
<p>@ContentManager.Json.results.prompt</p>
|
||||
<p>@Localizer["results.prompt"]</p>
|
||||
</template>
|
||||
<hr class="less-concise">
|
||||
</div>
|
||||
@@ -280,7 +280,7 @@
|
||||
<template x-if="!hasResults()">
|
||||
<div
|
||||
class="text-center less-concise text-muted flex-grow-1 justify-content-center d-flex flex-column">
|
||||
<h2>@ContentManager.Json.notSearched</h2>
|
||||
<h2>@Localizer["notSearched"]</h2>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -290,10 +290,9 @@
|
||||
<div class="less-concise text-muted flex-grow-1 justify-content-center d-flex flex-column">
|
||||
<h1 class="display-3"><i class="bi bi-info-circle"></i> Get Started!</h1>
|
||||
<ol>
|
||||
@foreach (string instruction in ContentManager.Json.instructions)
|
||||
{
|
||||
<li>@instruction</li>
|
||||
}
|
||||
<li>@Localizer["instructions.type"]</li>
|
||||
<li>@Localizer["instructions.configure"]</li>
|
||||
<li>@Localizer["instructions.search"]</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user