From c4918322fd82b33cd654a04d718288a1b17b8f01 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Tue, 8 Oct 2024 10:02:36 +0100 Subject: [PATCH] Fix installer nav buttons not being translated --- Bloxstrap/Resources/Strings.Designer.cs | 9 +++++++++ Bloxstrap/Resources/Strings.resx | 4 ++++ Bloxstrap/UI/Elements/Installer/MainWindow.xaml | 2 ++ .../UI/Elements/Installer/Pages/CompletionPage.xaml.cs | 2 +- .../UI/Elements/Installer/Pages/InstallPage.xaml.cs | 2 +- .../UI/Elements/Installer/Pages/WelcomePage.xaml.cs | 2 +- 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index 4a79047..3fa78d8 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -483,6 +483,15 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Install. + /// + public static string Common_Navigation_Install { + get { + return ResourceManager.GetString("Common.Navigation.Install", resourceCulture); + } + } + /// /// Looks up a localized string similar to Next. /// diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index 9786578..3964de5 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -1221,4 +1221,8 @@ Would you like to enable test mode? All of Bloxstrap's translations are crowdsourced through [Crowdin]({0}). Everyone listed here are people who generously volunteered their time and effort to help localise Bloxstrap. A massive thank you to everyone here! + + Install + The word "Install" is being used as a verb in this instance, like the other navigation button texts of "Next" and "Back" + \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Installer/MainWindow.xaml b/Bloxstrap/UI/Elements/Installer/MainWindow.xaml index 2ceab03..58171f2 100644 --- a/Bloxstrap/UI/Elements/Installer/MainWindow.xaml +++ b/Bloxstrap/UI/Elements/Installer/MainWindow.xaml @@ -7,8 +7,10 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base" xmlns:resources="clr-namespace:Bloxstrap.Resources" + xmlns:dmodels="clr-namespace:Bloxstrap.UI.ViewModels.Installer" xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Installer" mc:Ignorable="d" + d:DataContext="{d:DesignInstance dmodels:MainWindowViewModel, IsDesignTimeCreatable=True}" Title="{x:Static resources:Strings.Installer_Title}" Height="540" Width="840" MinWidth="840" Background="{ui:ThemeResource ApplicationBackgroundBrush}" diff --git a/Bloxstrap/UI/Elements/Installer/Pages/CompletionPage.xaml.cs b/Bloxstrap/UI/Elements/Installer/Pages/CompletionPage.xaml.cs index 96cbde7..031d111 100644 --- a/Bloxstrap/UI/Elements/Installer/Pages/CompletionPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Installer/Pages/CompletionPage.xaml.cs @@ -28,7 +28,7 @@ namespace Bloxstrap.UI.Elements.Installer.Pages { if (Window.GetWindow(this) is MainWindow window) { - window.SetNextButtonText("Next"); + window.SetNextButtonText(Strings.Common_Navigation_Next); window.SetButtonEnabled("back", false); } } diff --git a/Bloxstrap/UI/Elements/Installer/Pages/InstallPage.xaml.cs b/Bloxstrap/UI/Elements/Installer/Pages/InstallPage.xaml.cs index 43ec5b6..fbdab7f 100644 --- a/Bloxstrap/UI/Elements/Installer/Pages/InstallPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Installer/Pages/InstallPage.xaml.cs @@ -29,7 +29,7 @@ namespace Bloxstrap.UI.Elements.Installer.Pages { if (Window.GetWindow(this) is MainWindow window) { - window.SetNextButtonText("Install"); + window.SetNextButtonText(Strings.Common_Navigation_Install); window.NextPageCallback += NextPageCallback; } } diff --git a/Bloxstrap/UI/Elements/Installer/Pages/WelcomePage.xaml.cs b/Bloxstrap/UI/Elements/Installer/Pages/WelcomePage.xaml.cs index 1ccc0c8..ca2abfd 100644 --- a/Bloxstrap/UI/Elements/Installer/Pages/WelcomePage.xaml.cs +++ b/Bloxstrap/UI/Elements/Installer/Pages/WelcomePage.xaml.cs @@ -25,7 +25,7 @@ namespace Bloxstrap.UI.Elements.Installer.Pages private void UiPage_Loaded(object sender, RoutedEventArgs e) { if (Window.GetWindow(this) is MainWindow window) - window.SetNextButtonText("Next"); + window.SetNextButtonText(Strings.Common_Navigation_Next); _viewModel.DoChecks(); }