From 73bb5c2a0d503fb98616d9e4593ca93cb0ff973d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branislav=20Juh=C3=A1s?= Date: Tue, 18 Jul 2023 14:53:02 +0200 Subject: [PATCH 1/2] Startup Localization 180723 --- .../DN Henkel Vision (Package).wapproj | 12 ++++++------ .../DN Henkel Vision (Package)/Package.appxmanifest | 9 +++++---- DN Henkel Vision/DN Henkel Vision/App.xaml.cs | 5 ++++- DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs | 6 +++--- .../DN Henkel Vision/Interface/Splash.xaml.cs | 6 ++++-- DN Henkel Vision/DN Henkel Vision/Memory/Drive.cs | 11 ++++++++++- 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj b/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj index 9e8d3ff..64b0378 100644 --- a/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj +++ b/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj @@ -44,22 +44,22 @@ ..\DN Henkel Vision\DN Henkel Vision.csproj - sk-SK + en-US - sk-SK + en-US - sk-SK + en-US - sk-SK + en-US - sk-SK + en-US - sk-SK + en-US diff --git a/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest b/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest index 0e18be4..8ef7ca2 100644 --- a/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest +++ b/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest @@ -9,11 +9,11 @@ + Version="2023.1.2.0" /> - DN Henkel Vision (Package) - juhas + DN Henkel Vision Preview + DN Foundation Images\StoreLogo.png @@ -23,7 +23,8 @@ - + + diff --git a/DN Henkel Vision/DN Henkel Vision/App.xaml.cs b/DN Henkel Vision/DN Henkel Vision/App.xaml.cs index 3b080ad..985fca9 100644 --- a/DN Henkel Vision/DN Henkel Vision/App.xaml.cs +++ b/DN Henkel Vision/DN Henkel Vision/App.xaml.cs @@ -1,4 +1,5 @@ -using Microsoft.UI.Xaml; +using DN_Henkel_Vision.Memory; +using Microsoft.UI.Xaml; using System; using System.Threading; @@ -16,6 +17,8 @@ public partial class App /// public App() { + Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = Drive.SafeLanguage(); + this.InitializeComponent(); if (!mutex.WaitOne(TimeSpan.Zero, true)) { diff --git a/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs b/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs index 82f7c78..549663b 100644 --- a/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs +++ b/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs @@ -5,6 +5,6 @@ using System.Reflection; -[assembly: AssemblyVersion("2023.1.2.1390")] -[assembly: AssemblyFileVersion("2023.1.2.1390")] -[assembly: AssemblyInformationalVersion("2023.1.2.1390")] +[assembly: AssemblyVersion("2023.1.2.1407")] +[assembly: AssemblyFileVersion("2023.1.2.1407")] +[assembly: AssemblyInformationalVersion("2023.1.2.1407")] diff --git a/DN Henkel Vision/DN Henkel Vision/Interface/Splash.xaml.cs b/DN Henkel Vision/DN Henkel Vision/Interface/Splash.xaml.cs index e7e822d..f967875 100644 --- a/DN Henkel Vision/DN Henkel Vision/Interface/Splash.xaml.cs +++ b/DN Henkel Vision/DN Henkel Vision/Interface/Splash.xaml.cs @@ -5,6 +5,8 @@ using WinRT.Interop; using DN_Henkel_Vision.Memory; using System.ComponentModel; +using System.Globalization; +using Microsoft.Windows.AppLifecycle; namespace DN_Henkel_Vision.Interface { @@ -24,13 +26,13 @@ public sealed partial class Splash : Window /// Initializes a new instance of the class. /// public Splash() - { + { s_loader = this; IntPtr hWnd = WindowNative.GetWindowHandle(this); DisplayArea area = DisplayArea.GetFromWindowId(Win32Interop.GetWindowIdFromWindow(hWnd), DisplayAreaFallback.Nearest); - + this.InitializeComponent(); OverlappedPresenter presenter = GetAppWindowAndPresenter(); presenter.IsMaximizable = false; diff --git a/DN Henkel Vision/DN Henkel Vision/Memory/Drive.cs b/DN Henkel Vision/DN Henkel Vision/Memory/Drive.cs index 5d06b86..55e78bb 100644 --- a/DN Henkel Vision/DN Henkel Vision/Memory/Drive.cs +++ b/DN Henkel Vision/DN Henkel Vision/Memory/Drive.cs @@ -5,6 +5,7 @@ using Windows.Storage; using DN_Henkel_Vision.Interface; using Microsoft.UI.Xaml; +using System.Globalization; namespace DN_Henkel_Vision.Memory { @@ -24,7 +25,8 @@ internal class Drive internal static readonly string s_orders = $"{Folder}\\Files\\Orders\\"; internal static readonly string s_registry = $"{Folder}\\Files\\Registry\\Registry.dntf"; internal static readonly string s_exports = $"{Folder}\\Files\\Registry\\Exports.dntf"; - internal static readonly string s_trainees = $"{Folder}\\Files\\Trainee\\"; + internal static readonly string s_trainees = $"{Folder}\\Files\\Trainee\\"; + internal static readonly string s_language = $"{Folder}\\Files\\Language.dnlf"; #endregion @@ -451,6 +453,13 @@ public static ElementTheme SafeTheme() } } + public static string SafeLanguage() + { + if (!File.Exists(s_language)) return CultureInfo.CurrentUICulture.Name; + + return Read(s_language); + } + public static void WriteTrainees() { string correct = string.Empty; From 9c08ab5d9416b9d3e53cc321eda562013c60af33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branislav=20Juh=C3=A1s?= Date: Tue, 18 Jul 2023 16:37:18 +0200 Subject: [PATCH 2/2] Release 2023.2.1.1407 --- .../DN Henkel Vision (Package).wapproj | 16 +++++++++++++++- .../Package.appxmanifest | 10 +++++----- .../DN Henkel Vision/AssemblyInfo.cs | 6 +++--- .../DN Henkel Vision/AssemblyInfo.tt | 2 +- .../DN Henkel Vision/DN Henkel Vision.csproj | 1 + .../DN Henkel Vision/Interface/Environment.xaml | 2 +- .../DN Henkel Vision/Interface/Splash.xaml | 11 ++++++----- .../DN Henkel Vision/Interface/Welcome.xaml | 2 +- .../Strings/en-US/Resources.resw | 4 ++++ .../Strings/sk-SK/Resources.resw | 4 ++++ 10 files changed, 41 insertions(+), 17 deletions(-) diff --git a/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj b/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj index 64b0378..94ea11d 100644 --- a/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj +++ b/DN Henkel Vision/DN Henkel Vision (Package)/DN Henkel Vision (Package).wapproj @@ -40,26 +40,39 @@ 10.0.19041.0 net6.0-windows$(TargetPlatformVersion);$(AssetTargetFallback) en-US - false + True ..\DN Henkel Vision\DN Henkel Vision.csproj + False + E70786B55C49D6CE24F614F6B90FFADE4699715B + SHA256 + True + True + x64 + 0 en-US + Always en-US + Always en-US + Always en-US + Always en-US + Always en-US + Always @@ -67,6 +80,7 @@ + diff --git a/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest b/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest index 8ef7ca2..147fdf4 100644 --- a/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest +++ b/DN Henkel Vision/DN Henkel Vision (Package)/Package.appxmanifest @@ -8,11 +8,11 @@ + Publisher="CN=DN Foundation" + Version="2023.2.1.1407" /> - DN Henkel Vision Preview + DN Henkel Vision DN Foundation Images\StoreLogo.png @@ -32,8 +32,8 @@ Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$"> diff --git a/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs b/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs index 549663b..b1630de 100644 --- a/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs +++ b/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.cs @@ -5,6 +5,6 @@ using System.Reflection; -[assembly: AssemblyVersion("2023.1.2.1407")] -[assembly: AssemblyFileVersion("2023.1.2.1407")] -[assembly: AssemblyInformationalVersion("2023.1.2.1407")] +[assembly: AssemblyVersion("2023.2.1.1406")] +[assembly: AssemblyFileVersion("2023.2.1.1406")] +[assembly: AssemblyInformationalVersion("2023.2.1.1406")] diff --git a/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.tt b/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.tt index c86a8eb..bff4677 100644 --- a/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.tt +++ b/DN Henkel Vision/DN Henkel Vision/AssemblyInfo.tt @@ -28,5 +28,5 @@ using System.Reflection; int Patch = 0; int Major = (int)DateTime.Now.Year; - int Minor = 1; + int Minor = 2; #> \ No newline at end of file diff --git a/DN Henkel Vision/DN Henkel Vision/DN Henkel Vision.csproj b/DN Henkel Vision/DN Henkel Vision/DN Henkel Vision.csproj index 6cf28c6..f40b6f4 100644 --- a/DN Henkel Vision/DN Henkel Vision/DN Henkel Vision.csproj +++ b/DN Henkel Vision/DN Henkel Vision/DN Henkel Vision.csproj @@ -19,6 +19,7 @@ false + True False diff --git a/DN Henkel Vision/DN Henkel Vision/Interface/Environment.xaml b/DN Henkel Vision/DN Henkel Vision/Interface/Environment.xaml index 3337438..55a0cf6 100644 --- a/DN Henkel Vision/DN Henkel Vision/Interface/Environment.xaml +++ b/DN Henkel Vision/DN Henkel Vision/Interface/Environment.xaml @@ -81,7 +81,7 @@ Grid.Column="1"/> + x:Name="ApplicationDevState" + Text="" + Margin="3,15,0,0" + FontSize="12" + Foreground="{ThemeResource TextFillColorSecondary}" + Grid.Column="2"/> diff --git a/DN Henkel Vision/DN Henkel Vision/Strings/en-US/Resources.resw b/DN Henkel Vision/DN Henkel Vision/Strings/en-US/Resources.resw index 7607690..8416f43 100644 --- a/DN Henkel Vision/DN Henkel Vision/Strings/en-US/Resources.resw +++ b/DN Henkel Vision/DN Henkel Vision/Strings/en-US/Resources.resw @@ -325,4 +325,8 @@ Settings Header Of The Settings Page + + Welcome + Header Of The Welcome Page + \ No newline at end of file diff --git a/DN Henkel Vision/DN Henkel Vision/Strings/sk-SK/Resources.resw b/DN Henkel Vision/DN Henkel Vision/Strings/sk-SK/Resources.resw index b996715..0d22515 100644 --- a/DN Henkel Vision/DN Henkel Vision/Strings/sk-SK/Resources.resw +++ b/DN Henkel Vision/DN Henkel Vision/Strings/sk-SK/Resources.resw @@ -325,4 +325,8 @@ Nastavenia Header Of The Settings Page + + Vitajte + Header Of The Welcome Page + \ No newline at end of file