diff --git a/samples/AndreGoepel.AppFoundation.Sample/Components/App.razor b/samples/AndreGoepel.AppFoundation.Sample/Components/App.razor index e5d9fbb..7ca5990 100644 --- a/samples/AndreGoepel.AppFoundation.Sample/Components/App.razor +++ b/samples/AndreGoepel.AppFoundation.Sample/Components/App.razor @@ -1,5 +1,6 @@ +@using System.Globalization - + diff --git a/samples/AndreGoepel.AppFoundation.Sample/Components/Pages/Home.razor b/samples/AndreGoepel.AppFoundation.Sample/Components/Pages/Home.razor index 4f61fae..398c6f9 100644 --- a/samples/AndreGoepel.AppFoundation.Sample/Components/Pages/Home.razor +++ b/samples/AndreGoepel.AppFoundation.Sample/Components/Pages/Home.razor @@ -6,32 +6,32 @@ @inject IQuerySession QuerySession @inject NavigationManager NavigationManager +@inject IStringLocalizer L - +
- AppFoundation Sample + @L["Home.Heading"] - A minimal host that wires the AppFoundation packages. Use it to exercise the setup, - sign-in, and administration flows against a real PostgreSQL started by .NET Aspire. + @L["Home.Description"] @if (setupComplete) { - - } else { - } diff --git a/samples/AndreGoepel.AppFoundation.Sample/Components/_Imports.razor b/samples/AndreGoepel.AppFoundation.Sample/Components/_Imports.razor index 6f3ef60..4d0fabe 100644 --- a/samples/AndreGoepel.AppFoundation.Sample/Components/_Imports.razor +++ b/samples/AndreGoepel.AppFoundation.Sample/Components/_Imports.razor @@ -6,6 +6,7 @@ @using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop +@using Microsoft.Extensions.Localization @using AndreGoepel.AppFoundation @using AndreGoepel.AppFoundation.Components.Layout @using AndreGoepel.AppFoundation.Components.Shared @@ -14,5 +15,6 @@ @using AndreGoepel.Marten.Identity.Blazor.Components.Account.Shared @using AndreGoepel.AppFoundation.Sample @using AndreGoepel.AppFoundation.Sample.Components +@using AndreGoepel.AppFoundation.Sample.Resources @using Radzen @using Radzen.Blazor diff --git a/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.cs b/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.cs new file mode 100644 index 0000000..41847dd --- /dev/null +++ b/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.cs @@ -0,0 +1,9 @@ +namespace AndreGoepel.AppFoundation.Sample.Resources; + +/// +/// Marker type for the sample app's own UI strings — the generic argument of +/// IStringLocalizer<Strings>. Kept separate from the RCL's +/// AppFoundationStrings: the host translates its own content independently of +/// the identity/foundation UI it consumes. +/// +public sealed class Strings; diff --git a/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.de.resx b/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.de.resx new file mode 100644 index 0000000..f84efd2 --- /dev/null +++ b/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.de.resx @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + + + + + + diff --git a/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.resx b/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.resx new file mode 100644 index 0000000..0c11d56 --- /dev/null +++ b/samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.resx @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + + + + + +