diff --git a/GWMS.UI/GWMS.UI.csproj b/GWMS.UI/GWMS.UI.csproj index f34aa67..01aa4ca 100644 --- a/GWMS.UI/GWMS.UI.csproj +++ b/GWMS.UI/GWMS.UI.csproj @@ -2,7 +2,7 @@ net6.0 - 1.2.2603.1217 + 1.2.2603.1218 95c9f021-52d1-4390-a670-5810b7b777b0 true true diff --git a/GWMS.UI/Program.cs b/GWMS.UI/Program.cs index e26ac7c..8425d02 100644 --- a/GWMS.UI/Program.cs +++ b/GWMS.UI/Program.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.UI.Services; -using Microsoft.AspNetCore.Localization; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -22,6 +21,7 @@ using OpenTelemetry.Resources; using OpenTelemetry.Trace; using StackExchange.Redis; using System; +using System.Collections.Generic; using System.Globalization; // ==================================================================== @@ -72,7 +72,8 @@ try .AddService(serviceName: "GWMS", serviceVersion: appVersion)) .AddSource("GWMS.Data") .AddSource("GWMS.UI") - .AddAspNetCoreInstrumentation(options => { + .AddAspNetCoreInstrumentation(options => + { options.Filter = ctx => !ctx.Request.Path.StartsWithSegments("/health"); }) //.AddHttpClientInstrumentation() @@ -217,6 +218,7 @@ try var app = builder.Build(); + // ==================================================================== // 3. CONFIGURAZIONE PIPELINE (ex Configure) // ==================================================================== @@ -234,7 +236,11 @@ try app.UseHsts(); } - // Localization IT + + // ==================================================================== + // Imposta cultura globale + // ==================================================================== +#if false var supportedCultures = new[] { new CultureInfo("it-IT") }; app.UseRequestLocalization(new RequestLocalizationOptions { @@ -242,7 +248,23 @@ try SupportedCultures = supportedCultures, FallBackToParentCultures = false }); - CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT"); + CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT"); +#else + var culture = new CultureInfo("en-US"); + + var localizationOptions = new RequestLocalizationOptions + { + DefaultRequestCulture = new Microsoft.AspNetCore.Localization.RequestCulture(culture), + SupportedCultures = new List { culture }, + SupportedUICultures = new List { culture } + }; + + // ⚠️ IMPORTANTE: questo deve venire PRIMA di MapBlazorHub + app.UseRequestLocalization(localizationOptions); + + CultureInfo.DefaultThreadCurrentCulture = culture; + CultureInfo.DefaultThreadCurrentUICulture = culture; +#endif app.UseForwardedHeaders(new ForwardedHeadersOptions { diff --git a/GWMS.UI/appsettings.json b/GWMS.UI/appsettings.json index f08ece2..486c111 100644 --- a/GWMS.UI/appsettings.json +++ b/GWMS.UI/appsettings.json @@ -36,7 +36,7 @@ "ReloadStatusTimer": 20000, "RuntimeOpt": { "CodApp": "GWMS", - "RoundFact": 100, + "RoundFact": 1000, "NumPar": 4, "BaseUrl": "https://localhost:5003", "BaseAppPath": "/pizzaferri/", diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index f79e686..c46b2be 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ GWMS - Gas Warehouse Management System -

Versione: 1.2.2603.1217

+

Versione: 1.2.2603.1218


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 6e7eb28..7103ceb 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.2.2603.1217 +1.2.2603.1218 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index b6c6b2b..bd56004 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.2.2603.1217 + 1.2.2603.1218 http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html false