From 2d14f04c40446da96b9b61e0b91da9f32b82b3b8 Mon Sep 17 00:00:00 2001 From: ke46138 <122108788+ke46138@users.noreply.github.com> Date: Fri, 29 Nov 2024 23:19:13 +0300 Subject: [PATCH] Feature: Add Russian translation to Rebound Run (#111) Co-authored-by: Lamparter <71598437+Lamparter@users.noreply.github.com> --- Helpers/Display.cs | 2 +- Helpers/SettingsHelper.cs | 2 +- Helpers/TitleBarService.cs | 2 +- Rebound/Package.appxmanifest | 2 +- Run/Languages/StringTable.cs | 126 ++++++++++++++++++++++++++++------- Run/MainWindow.xaml | 31 ++++----- Run/MainWindow.xaml.cs | 10 +-- 7 files changed, 126 insertions(+), 49 deletions(-) diff --git a/Helpers/Display.cs b/Helpers/Display.cs index 5b73fc0..eaa8bcb 100644 --- a/Helpers/Display.cs +++ b/Helpers/Display.cs @@ -1,4 +1,4 @@ -using WinUIEx; +using WinUIEx; namespace Rebound.Helpers; diff --git a/Helpers/SettingsHelper.cs b/Helpers/SettingsHelper.cs index f881934..216463f 100644 --- a/Helpers/SettingsHelper.cs +++ b/Helpers/SettingsHelper.cs @@ -1,4 +1,4 @@ -namespace Rebound.Helpers; +namespace Rebound.Helpers; public static class SettingsHelper { diff --git a/Helpers/TitleBarService.cs b/Helpers/TitleBarService.cs index 960e992..2754115 100644 --- a/Helpers/TitleBarService.cs +++ b/Helpers/TitleBarService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using Microsoft.UI; using Microsoft.UI.Windowing; diff --git a/Rebound/Package.appxmanifest b/Rebound/Package.appxmanifest index 16a5a12..c4dce23 100644 --- a/Rebound/Package.appxmanifest +++ b/Rebound/Package.appxmanifest @@ -1,4 +1,4 @@ - + @@ -371,7 +372,7 @@ + Text="{x:Bind StringTable:StringTable.Open}" /> + Text="{x:Bind StringTable:StringTable.Arguments}" /> - + @@ -433,8 +434,8 @@ + Text="{x:Bind StringTable:StringTable.RunAsAdmin}" + ToolTipService.ToolTip="{x:Bind StringTable:StringTable.RunAsAdminTooltip}"> @@ -447,8 +448,8 @@ + Text="{x:Bind StringTable:StringTable.RunAsAdminLegacy}" + ToolTipService.ToolTip="{x:Bind StringTable:StringTable.RunAsAdminLegacyTooltip}"> @@ -458,8 +459,8 @@ + Text="{x:Bind StringTable:StringTable.Run}" + ToolTipService.ToolTip="{x:Bind StringTable:StringTable.RunTooltip}"> @@ -469,8 +470,8 @@ + Text="{x:Bind StringTable:StringTable.RunLegacy}" + ToolTipService.ToolTip="{x:Bind StringTable:StringTable.RunLegacyTooltip}"> @@ -487,7 +488,7 @@ HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Click="Button_Click" - Content="Cancel"> + Content="{x:Bind StringTable:StringTable.Cancel}"> @@ -498,7 +499,7 @@ HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Click="Button_Click_1" - Content="Browse" /> + Content="{x:Bind StringTable:StringTable.Browse}" /> diff --git a/Run/MainWindow.xaml.cs b/Run/MainWindow.xaml.cs index 59047fa..eb01b16 100644 --- a/Run/MainWindow.xaml.cs +++ b/Run/MainWindow.xaml.cs @@ -267,7 +267,7 @@ public async Task Run(bool runLegacy = false, bool admin = false) } catch (Exception) { - await ShowMessageDialogAsync($"The system cannot find the file specified."); + await ShowMessageDialogAsync(StringTable.ErrorMessage2); } } else @@ -296,19 +296,19 @@ public async Task Run(bool runLegacy = false, bool admin = false) try { - await ShowMessageDialogAsync($"You will have to open this app again to bring back the Windows + R invoke command for Rebound Run.", "Important"); + await ShowMessageDialogAsync(StringTable.WarningMessage, StringTable.Warning); var res = Process.Start(startInfo); Close(); Process.GetCurrentProcess().Kill(); } catch (Exception) { - await ShowMessageDialogAsync($"The system cannot find the file specified."); + await ShowMessageDialogAsync(StringTable.ErrorMessage2); } } else { - await ShowMessageDialogAsync($"The WinUI 3 run box is already opened.", "Error"); + await ShowMessageDialogAsync(StringTable.Win3UIBoxAlreadyOpened, StringTable.Error); return; } Close(); @@ -515,7 +515,7 @@ private async void Button_Click_1(object sender, RoutedEventArgs e) // Set options for your file picker openPicker.ViewMode = PickerViewMode.Thumbnail; openPicker.SuggestedStartLocation = PickerLocationId.Desktop; - openPicker.CommitButtonText = "Select file to run"; + openPicker.CommitButtonText = StringTable.SelectFileToRun; openPicker.FileTypeFilter.Add(".exe"); openPicker.FileTypeFilter.Add(".pif"); openPicker.FileTypeFilter.Add(".com");