diff --git a/src/BirthList.Web/Components/Pages/RegistryAdmin.razor b/src/BirthList.Web/Components/Pages/RegistryAdmin.razor index e5363e7..84729e2 100644 --- a/src/BirthList.Web/Components/Pages/RegistryAdmin.razor +++ b/src/BirthList.Web/Components/Pages/RegistryAdmin.razor @@ -120,7 +120,7 @@ else
- + diff --git a/src/BirthList.Web/Components/Pages/RegistryAdmin.razor.cs b/src/BirthList.Web/Components/Pages/RegistryAdmin.razor.cs index 25e035b..fa7cea4 100644 --- a/src/BirthList.Web/Components/Pages/RegistryAdmin.razor.cs +++ b/src/BirthList.Web/Components/Pages/RegistryAdmin.razor.cs @@ -26,6 +26,21 @@ public partial class RegistryAdmin : ComponentBase protected RegistrySettingsEditModel SettingsModel { get; } = new(); protected RegistryItemEditModel ItemModel { get; private set; } = new(); + protected string PreferSecondHandString + { + get => ItemModel.PreferSecondHand switch + { + null => "", + true => "true", + false => "false" + }; + set => ItemModel.PreferSecondHand = value switch + { + "true" => true, + "false" => false, + _ => null + }; + } protected IReadOnlyList Items { get; private set; } = []; protected IReadOnlyList ItemCategories { get; private set; } = []; protected string? NewCategoryName { get; set; } diff --git a/src/BirthList.Web/Features/Localization/LocalizationService.cs b/src/BirthList.Web/Features/Localization/LocalizationService.cs index afdf762..09fd3c7 100644 --- a/src/BirthList.Web/Features/Localization/LocalizationService.cs +++ b/src/BirthList.Web/Features/Localization/LocalizationService.cs @@ -8,9 +8,8 @@ internal sealed class LocalizationService(UserManager userManag { private static readonly HashSet SupportedCultureNames = [ - "en", - "nl-NL", "nl-BE", + "en", "fr-FR", "qps-Ploc" ]; diff --git a/src/BirthList.Web/Program.cs b/src/BirthList.Web/Program.cs index d2ec593..0318a25 100644 --- a/src/BirthList.Web/Program.cs +++ b/src/BirthList.Web/Program.cs @@ -149,8 +149,8 @@ builder.Services.AddLocalization(options => var supportedCultures = new List { - new("en"), new("nl-BE"), + new("en"), new("fr-FR") }; @@ -161,7 +161,7 @@ if (builder.Environment.IsDevelopment()) builder.Services.Configure(options => { - options.DefaultRequestCulture = new RequestCulture("en"); + options.DefaultRequestCulture = new RequestCulture("nl-BE"); options.SupportedCultures = supportedCultures; options.SupportedUICultures = supportedCultures; options.RequestCultureProviders =