From 650a862168907f04f9185686e60e7b6525eb5e71 Mon Sep 17 00:00:00 2001 From: qe201020335 Date: Mon, 15 Apr 2024 03:52:31 -0400 Subject: [PATCH] Replace strings from code with localizable resource --- QuestPatcher/App.axaml.cs | 22 +- QuestPatcher/BrowseImportManager.cs | 58 +- QuestPatcher/DialogBuilder.cs | 4 +- QuestPatcher/Resources/Strings.Designer.cs | 1116 +++++++++++++++-- QuestPatcher/Resources/Strings.resx | 296 ++++- QuestPatcher/Resources/Strings.zh-hans.resx | 298 ++++- .../Services/QuestPatcherUiService.cs | 21 +- QuestPatcher/UIPrompter.cs | 65 +- QuestPatcher/ViewModels/LoadedViewModel.cs | 5 +- .../ViewModels/Modding/ManageModsViewModel.cs | 5 +- .../ViewModels/Modding/ModViewModel.cs | 25 +- .../ViewModels/OtherItemsViewModel.cs | 30 +- QuestPatcher/ViewModels/PatchingViewModel.cs | 35 +- QuestPatcher/ViewModels/ToolsViewModel.cs | 29 +- QuestPatcher/Views/LoadedView.axaml | 2 +- QuestPatcher/Views/LoadingView.axaml | 4 +- QuestPatcher/Views/Modding/ModView.axaml | 6 +- 17 files changed, 1742 insertions(+), 279 deletions(-) diff --git a/QuestPatcher/App.axaml.cs b/QuestPatcher/App.axaml.cs index cfa3256a..acf96b10 100644 --- a/QuestPatcher/App.axaml.cs +++ b/QuestPatcher/App.axaml.cs @@ -7,6 +7,7 @@ using Avalonia.Markup.Xaml; using QuestPatcher.Core; using QuestPatcher.Models; +using QuestPatcher.Resources; using QuestPatcher.Services; using Serilog; @@ -95,10 +96,25 @@ public override void OnFrameworkInitializationCompleted() Theme.LoadEmbeddedTheme("Styles/Themes/QuestPatcherDark.axaml", "Dark").ThemeStying); } - DialogBuilder dialog = new() + string title; + string text; + try { - Title = "Critical Error", - Text = "QuestPatcher encountered a critical error during early startup, which was unrecoverable.", + title = Strings.Loading_CriticalError_Title; + text = Strings.Loading_CriticalError_Text; + } + catch (Exception e) + { + // In case the resources failed to load + title = "Critical Error"; + text = "QuestPatcher encountered a critical error during early startup, which was unrecoverable."; + Log.Error(e, "Failed to load critical error message from resource, using default"); + } + + var dialog = new DialogBuilder + { + Title = title, + Text = text, HideCancelButton = true }; dialog.WithException(ex); diff --git a/QuestPatcher/BrowseImportManager.cs b/QuestPatcher/BrowseImportManager.cs index fe5be7d1..7342851a 100644 --- a/QuestPatcher/BrowseImportManager.cs +++ b/QuestPatcher/BrowseImportManager.cs @@ -11,6 +11,7 @@ using QuestPatcher.Core; using QuestPatcher.Core.Modding; using QuestPatcher.Models; +using QuestPatcher.Resources; using QuestPatcher.Services; using Serilog; @@ -169,8 +170,8 @@ public async Task AttemptImportUri(Uri uri) { var builder = new DialogBuilder { - Title = "Failed to download file", - Text = $"Downloading the file from {uri} failed, and thus the file could not be imported.", + Title = Strings.BrowseImport_DownloadFailed_Title, + Text = String.Format(Strings.BrowseImport_DownloadFailed_Text, uri), HideCancelButton = true }; await builder.OpenDialogue(_mainWindow); @@ -191,8 +192,8 @@ public async Task AttemptImportUri(Uri uri) { var builder = new DialogBuilder { - Title = "Failed to import file from URL", - Text = $"The server at {uri} did not provide a valid file extension, and so QuestPatcher doesn't know how the import the file.", + Title = Strings.BrowseImport_BadUrl_Title, + Text = String.Format(Strings.BrowseImport_BadUrl_Text, uri), HideCancelButton = true }; await builder.OpenDialogue(_mainWindow); @@ -259,16 +260,16 @@ private async Task ProcessImportQueue() bool multiple = failedFiles.Count > 1; - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Import Failed", + Title = Strings.BrowseImport_ImportFailed_Title, HideCancelButton = true }; if (multiple) { // Show the exceptions for multiple files in the logs to avoid a giagantic dialog - builder.Text = "Multiple files failed to install. Check logs for details about each"; + builder.Text = Strings.BrowseImport_ImportFailed_Multiple_Text; foreach (var pair in failedFiles) { Log.Error("Failed to install {FileName}: {Error}", Path.GetFileName(pair.Key), pair.Value.Message); @@ -279,20 +280,20 @@ private async Task ProcessImportQueue() { // Display single files with more detail for the user string filePath = failedFiles.Keys.First(); - var exception = failedFiles.Values.First(); - + var ex = failedFiles.Values.First(); + string fileName = Path.GetFileName(filePath); // Don't display the full stack trace for InstallationExceptions, since these are thrown by QP and are not bugs/issues - if (exception is InstallationException) + if (ex is InstallationException) { - builder.Text = $"{Path.GetFileName(filePath)} failed to install: {exception.Message}"; + builder.Text = String.Format(Strings.BrowseImport_ImportFailed_Single_Exception_Text, fileName, ex.Message); } else { - builder.Text = $"The file {Path.GetFileName(filePath)} failed to install"; - builder.WithException(exception); + builder.Text = String.Format(Strings.BrowseImport_ImportFailed_Single_Text, fileName); + builder.WithException(ex); } - Log.Error("Failed to install {FileName}: {Error}", Path.GetFileName(filePath), exception.Message); - Log.Debug(exception, "Full Error"); + Log.Error("Failed to install {FileName}: {Error}", fileName, ex.Message); + Log.Debug(ex, "Full Error"); } await builder.OpenDialogue(_mainWindow); @@ -423,10 +424,10 @@ private async Task ImportUnknownFile(FileImportInfo importInfo) { FileCopyType? selectedType = null; - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Multiple Import Options", - Text = $"{Path.GetFileName(path)} can be imported as multiple types of file. Please select what you would like it to be installed as.", + Title = Strings.BrowseImport_MultipleImport_Title, + Text = String.Format(Strings.BrowseImport_MultipleImport_Text, Path.GetFileName(path)), HideOkButton = true, HideCancelButton = true }; @@ -468,14 +469,13 @@ private async Task TryImportMod(FileImportInfo importInfo) if (mod.ModLoader != _installManager.InstalledApp?.ModLoader) { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Wrong Mod Loader", - Text = $"The mod you are trying to install needs the modloader {mod.ModLoader}, however your app has the modloader {_installManager.InstalledApp?.ModLoader} installed." - + "\nWould you like to repatch your app with the required modloader?" + Title = Strings.Mod_WrongModLoader_Title, + Text = String.Format(Strings.Mod_WrongModLoader_Text, mod.ModLoader, _installManager.InstalledApp?.ModLoader) }; - builder.OkButton.Text = "Repatch"; - builder.CancelButton.Text = "Not now"; + builder.OkButton.Text = Strings.Mod_WrongModLoader_Repatch; + builder.CancelButton.Text = Strings.Generic_NotNow; if (await builder.OpenDialogue(_mainWindow)) { _uiService.OpenRepatchMenu(mod.ModLoader); @@ -489,13 +489,13 @@ private async Task TryImportMod(FileImportInfo importInfo) // Prompt the user for outdated mods instead of enabling them automatically if (mod.PackageVersion != null && mod.PackageVersion != _installManager.InstalledApp.Version) { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Outdated Mod", - Text = $"The mod just installed is for version {mod.PackageVersion} of your app, however you have {_installManager.InstalledApp.Version}. Enabling the mod may crash the game, or not work." + Title = Strings.Mod_OutdatedMod_Title, + Text = String.Format(Strings.Mod_OutdatedMod_Text, mod.PackageVersion, _installManager.InstalledApp.Version), }; - builder.OkButton.Text = "Enable Now"; - builder.CancelButton.Text = "Cancel"; + builder.OkButton.Text = Strings.Mod_OutdatedMod_EnableNow; + builder.CancelButton.Text = Strings.Generic_Cancel; if (!await builder.OpenDialogue(_mainWindow)) { diff --git a/QuestPatcher/DialogBuilder.cs b/QuestPatcher/DialogBuilder.cs index 4b11ffc3..2f5e5f06 100644 --- a/QuestPatcher/DialogBuilder.cs +++ b/QuestPatcher/DialogBuilder.cs @@ -59,7 +59,7 @@ public class DialogBuilder /// public ButtonInfo OkButton { get; set; } = new() { - Text = "OK", + Text = Resources.Strings.Generic_OK, ReturnValue = true, CloseDialogue = true }; @@ -71,7 +71,7 @@ public class DialogBuilder /// public ButtonInfo CancelButton { get; set; } = new() { - Text = "Cancel", + Text = Resources.Strings.Generic_Cancel, ReturnValue = false, CloseDialogue = true }; diff --git a/QuestPatcher/Resources/Strings.Designer.cs b/QuestPatcher/Resources/Strings.Designer.cs index 5e10d7af..64e1db09 100644 --- a/QuestPatcher/Resources/Strings.Designer.cs +++ b/QuestPatcher/Resources/Strings.Designer.cs @@ -59,392 +59,1149 @@ internal Strings() { } } + /// + /// Looks up a localized string similar to The server at {0} did not provide a valid file extension, and so QuestPatcher doesn't know how the import the file.. + /// + public static string BrowseImport_BadUrl_Text { + get { + return ResourceManager.GetString("BrowseImport_BadUrl_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to import file from URL. + /// + public static string BrowseImport_BadUrl_Title { + get { + return ResourceManager.GetString("BrowseImport_BadUrl_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Downloading the file from {0} failed, and thus the file could not be imported.. + /// + public static string BrowseImport_DownloadFailed_Text { + get { + return ResourceManager.GetString("BrowseImport_DownloadFailed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to download file. + /// + public static string BrowseImport_DownloadFailed_Title { + get { + return ResourceManager.GetString("BrowseImport_DownloadFailed_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple files failed to install. Check logs for details about each. + /// + public static string BrowseImport_ImportFailed_Multiple_Text { + get { + return ResourceManager.GetString("BrowseImport_ImportFailed_Multiple_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} failed to install: {1}. + /// + public static string BrowseImport_ImportFailed_Single_Exception_Text { + get { + return ResourceManager.GetString("BrowseImport_ImportFailed_Single_Exception_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The file {0} failed to install. + /// + public static string BrowseImport_ImportFailed_Single_Text { + get { + return ResourceManager.GetString("BrowseImport_ImportFailed_Single_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Import Failed. + /// + public static string BrowseImport_ImportFailed_Title { + get { + return ResourceManager.GetString("BrowseImport_ImportFailed_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} can be imported as multiple types of file. Please select what you would like it to be installed as.. + /// + public static string BrowseImport_MultipleImport_Text { + get { + return ResourceManager.GetString("BrowseImport_MultipleImport_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Import Options. + /// + public static string BrowseImport_MultipleImport_Title { + get { + return ResourceManager.GetString("BrowseImport_MultipleImport_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Browse. + /// + public static string Generic_Browse { + get { + return ResourceManager.GetString("Generic_Browse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancel. + /// + public static string Generic_Cancel { + get { + return ResourceManager.GetString("Generic_Cancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close. + /// + public static string Generic_Close { + get { + return ResourceManager.GetString("Generic_Close", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close Anyway. + /// + public static string Generic_CloseAnyway { + get { + return ResourceManager.GetString("Generic_CloseAnyway", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Continue. + /// + public static string Generic_Continue { + get { + return ResourceManager.GetString("Generic_Continue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Continue Anyway. + /// + public static string Generic_ContinueAnyway { + get { + return ResourceManager.GetString("Generic_ContinueAnyway", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Generic_Delete { + get { + return ResourceManager.GetString("Generic_Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disable. + /// + public static string Generic_Disable { + get { + return ResourceManager.GetString("Generic_Disable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disabled. + /// + public static string Generic_Disabled { + get { + return ResourceManager.GetString("Generic_Disabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable. + /// + public static string Generic_Enable { + get { + return ResourceManager.GetString("Generic_Enable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enabled. + /// + public static string Generic_Enabled { + get { + return ResourceManager.GetString("Generic_Enabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string Generic_No { + get { + return ResourceManager.GetString("Generic_No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not now. + /// + public static string Generic_NotNow { + get { + return ResourceManager.GetString("Generic_NotNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Off. + /// + public static string Generic_Off { + get { + return ResourceManager.GetString("Generic_Off", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OK. + /// + public static string Generic_OK { + get { + return ResourceManager.GetString("Generic_OK", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On. + /// + public static string Generic_On { + get { + return ResourceManager.GetString("Generic_On", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Try Again. + /// + public static string Generic_Retry { + get { + return ResourceManager.GetString("Generic_Retry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select. + /// + public static string Generic_Select { + get { + return ResourceManager.GetString("Generic_Select", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Generic_Yes { + get { + return ResourceManager.GetString("Generic_Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Modding {0}. + /// + public static string Global_CurrentModding { + get { + return ResourceManager.GetString("Global_CurrentModding", resourceCulture); + } + } + /// /// Looks up a localized string similar to Display Logs. /// - public static string DisplayLogs { + public static string Global_DisplayLogs { + get { + return ResourceManager.GetString("Global_DisplayLogs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Welcome to {0} 2. + /// + public static string Global_WelcomeMessage { + get { + return ResourceManager.GetString("Global_WelcomeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to APK is 32 bit. + /// + public static string LoadedAPKStatus_32bit { + get { + return ResourceManager.GetString("LoadedAPKStatus_32bit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to APK is 64 bit. + /// + public static string LoadedAPKStatus_64bit { + get { + return ResourceManager.GetString("LoadedAPKStatus_64bit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to APK is modded. + /// + public static string LoadedAPKStatus_Modded { + get { + return ResourceManager.GetString("LoadedAPKStatus_Modded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to APK is not modded. + /// + public static string LoadedAPKStatus_NotModded { + get { + return ResourceManager.GetString("LoadedAPKStatus_NotModded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to APK Version: {0}. + /// + public static string LoadedAPKStatus_Version { + get { + return ResourceManager.GetString("LoadedAPKStatus_Version", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to QP Version: {0}. + /// + public static string LoadedQPVersion { + get { + return ResourceManager.GetString("LoadedQPVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to QuestPatcher encountered a critical error during early startup, which was unrecoverable.. + /// + public static string Loading_CriticalError_Text { + get { + return ResourceManager.GetString("Loading_CriticalError_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Critical Error. + /// + public static string Loading_CriticalError_Title { + get { + return ResourceManager.GetString("Loading_CriticalError_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to QuestPatcher loading . . .. + /// + public static string Loading_QPLoading { + get { + return ResourceManager.GetString("Loading_QPLoading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change App. + /// + public static string Loading_UnhandledError_ChangeApp { + get { + return ResourceManager.GetString("Loading_UnhandledError_ChangeApp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occured while loading. + /// + public static string Loading_UnhandledError_Text { + get { + return ResourceManager.GetString("Loading_UnhandledError_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unhandled Load Error. + /// + public static string Loading_UnhandledError_Title { + get { + return ResourceManager.GetString("Loading_UnhandledError_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Modding Log. + /// + public static string LoggingDock_Title { + get { + return ResourceManager.GetString("LoggingDock_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (By {0}). + /// + public static string Mod_Author { + get { + return ResourceManager.GetString("Mod_Author", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (By {0} - ported by {1}). + /// + public static string Mod_AuthorWithPorter { + get { + return ResourceManager.GetString("Mod_AuthorWithPorter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to delete mod. + /// + public static string Mod_DeleteFailed { + get { + return ResourceManager.GetString("Mod_DeleteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to install mod. + /// + public static string Mod_InstallFailed { + get { + return ResourceManager.GetString("Mod_InstallFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable Now. + /// + public static string Mod_OutdatedMod_EnableNow { + get { + return ResourceManager.GetString("Mod_OutdatedMod_EnableNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The mod just installed is for version {0} of your app. However, you have {1}. Enabling the mod may crash the game, or not work.. + /// + public static string Mod_OutdatedMod_Text { + get { + return ResourceManager.GetString("Mod_OutdatedMod_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Outdated Mod. + /// + public static string Mod_OutdatedMod_Title { + get { + return ResourceManager.GetString("Mod_OutdatedMod_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Libraries. + /// + public static string Mod_Section_Libraries { + get { + return ResourceManager.GetString("Mod_Section_Libraries", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mods. + /// + public static string Mod_Section_Mods { + get { + return ResourceManager.GetString("Mod_Section_Mods", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to uninstall mod. + /// + public static string Mod_UninstallFailed { + get { + return ResourceManager.GetString("Mod_UninstallFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repatch. + /// + public static string Mod_WrongModLoader_Repatch { + get { + return ResourceManager.GetString("Mod_WrongModLoader_Repatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The mod you are trying to install needs the mod loader {0}. However, your app has the mod loader {1} installed. + ///Would you like to repatch your app with the required modloader?. + /// + public static string Mod_WrongModLoader_Text { + get { + return ResourceManager.GetString("Mod_WrongModLoader_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wrong Mod Loader. + /// + public static string Mod_WrongModLoader_Title { + get { + return ResourceManager.GetString("Mod_WrongModLoader_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to QuestLoader. + /// + public static string ModLoader_QuestLoader { + get { + return ResourceManager.GetString("ModLoader_QuestLoader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scotland2. + /// + public static string ModLoader_Scotland2 { + get { + return ResourceManager.GetString("ModLoader_Scotland2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose a file type to manage:. + /// + public static string OtherItems_ChooseType { + get { + return ResourceManager.GetString("OtherItems_ChooseType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure that you want to delete all ({0}) {1}?. + /// + public static string OtherItems_DeleteAll_Text { + get { + return ResourceManager.GetString("OtherItems_DeleteAll_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting all files. + /// + public static string OtherItems_DeleteAll_Title { + get { + return ResourceManager.GetString("OtherItems_DeleteAll_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The file {0} failed to delete. + /// + public static string OtherItems_DeleteFailed_Text { + get { + return ResourceManager.GetString("OtherItems_DeleteFailed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} out of {1} files failed to delete. Check the log for details about each. + /// + public static string OtherItems_DeleteFailed_Text_Multiple { + get { + return ResourceManager.GetString("OtherItems_DeleteFailed_Text_Multiple", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File Failed to Delete. + /// + public static string OtherItems_DeleteFailed_Title { + get { + return ResourceManager.GetString("OtherItems_DeleteFailed_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Files Failed to Delete. + /// + public static string OtherItems_DeleteFailed_Title_Multiple { + get { + return ResourceManager.GetString("OtherItems_DeleteFailed_Title_Multiple", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to load files. + /// + public static string OtherItems_FailToLoad { + get { + return ResourceManager.GetString("OtherItems_FailToLoad", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to load the list of files in the folder {0}. + /// + public static string OtherItems_LoadFailed_Text { + get { + return ResourceManager.GetString("OtherItems_LoadFailed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to load files. + /// + public static string OtherItems_LoadFailed_Title { + get { + return ResourceManager.GetString("OtherItems_LoadFailed_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait . . . . + /// + public static string OtherItems_Loading { + get { + return ResourceManager.GetString("OtherItems_Loading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No file types available for this app. + /// + public static string OtherItems_NotAvailable { + get { + return ResourceManager.GetString("OtherItems_NotAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove All. + /// + public static string OtherItems_RemoveAll { + get { + return ResourceManager.GetString("OtherItems_RemoveAll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Selected. + /// + public static string OtherItems_RemoveSelected { + get { + return ResourceManager.GetString("OtherItems_RemoveSelected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Before you install mods, QuestPatcher must patch your app. + ///This may take several minutes depending on your internet connection. + ///Make sure that your internet does not go offline during patching.. + /// + public static string Patching_BeforeStartMessage { + get { + return ResourceManager.GetString("Patching_BeforeStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to QuestPatcher could not download files that it needs to patch the APK. Please check your internet connection, then try again.. + /// + public static string Patching_FileDownloadFailed_Text { + get { + return ResourceManager.GetString("Patching_FileDownloadFailed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download files. + /// + public static string Patching_FileDownloadFailed_Title { + get { + return ResourceManager.GetString("Patching_FileDownloadFailed_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait while patching completes . . .. + /// + public static string Patching_InProgress { + get { + return ResourceManager.GetString("Patching_InProgress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unhandled error occured while attempting to patch the game. + /// + public static string Patching_PatchingFailed_Text { + get { + return ResourceManager.GetString("Patching_PatchingFailed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Patching Failed. + /// + public static string Patching_PatchingFailed_Title { + get { + return ResourceManager.GetString("Patching_PatchingFailed_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Patching Options. + /// + public static string Patching_PatchingOptions { + get { + return ResourceManager.GetString("Patching_PatchingOptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your installation is now modded! + ///You can now access installed mods, cosmetics, etc. + /// + ///NOTE: If you see a restore app prompt inside your headset, just press close. The chance of getting banned for modding is virtually zero, so it's nothing to worry about.. + /// + public static string Patching_PatchingSuccess_Text { get { - return ResourceManager.GetString("DisplayLogs", resourceCulture); + return ResourceManager.GetString("Patching_PatchingSuccess_Text", resourceCulture); } } /// - /// Looks up a localized string similar to Browse. + /// Looks up a localized string similar to Patching Complete!. /// - public static string Generic_Browse { + public static string Patching_PatchingSuccess_Title { get { - return ResourceManager.GetString("Generic_Browse", resourceCulture); + return ResourceManager.GetString("Patching_PatchingSuccess_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Cancel. + /// Looks up a localized string similar to Choose the mod loader to patch with: . /// - public static string Generic_Cancel { + public static string Patching_SelectModLoader { get { - return ResourceManager.GetString("Generic_Cancel", resourceCulture); + return ResourceManager.GetString("Patching_SelectModLoader", resourceCulture); } } /// - /// Looks up a localized string similar to Delete. + /// Looks up a localized string similar to Custom Splash Screen:. /// - public static string Generic_Delete { + public static string Patching_SplashScreen { get { - return ResourceManager.GetString("Generic_Delete", resourceCulture); + return ResourceManager.GetString("Patching_SplashScreen", resourceCulture); } } /// - /// Looks up a localized string similar to Off. + /// Looks up a localized string similar to None Selected. /// - public static string Generic_Off { + public static string Patching_SplashScreen_None { get { - return ResourceManager.GetString("Generic_Off", resourceCulture); + return ResourceManager.GetString("Patching_SplashScreen_None", resourceCulture); } } /// - /// Looks up a localized string similar to OK. + /// Looks up a localized string similar to Patch my App!. /// - public static string Generic_OK { + public static string Patching_StartPatching { get { - return ResourceManager.GetString("Generic_OK", resourceCulture); + return ResourceManager.GetString("Patching_StartPatching", resourceCulture); } } /// - /// Looks up a localized string similar to On. + /// Looks up a localized string similar to Allow Debugging. /// - public static string Generic_On { + public static string PatchingOption_Debugging { get { - return ResourceManager.GetString("Generic_On", resourceCulture); + return ResourceManager.GetString("PatchingOption_Debugging", resourceCulture); } } /// - /// Looks up a localized string similar to Select. + /// Looks up a localized string similar to Allow External Files. /// - public static string Generic_Select { + public static string PatchingOption_ExternalFiles { get { - return ResourceManager.GetString("Generic_Select", resourceCulture); + return ResourceManager.GetString("PatchingOption_ExternalFiles", resourceCulture); } } /// - /// Looks up a localized string similar to APK is 32 bit. + /// Looks up a localized string similar to Hand Tracking Type. /// - public static string LoadedAPKStatus_32bit { + public static string PatchingOption_HandTracking { get { - return ResourceManager.GetString("LoadedAPKStatus_32bit", resourceCulture); + return ResourceManager.GetString("PatchingOption_HandTracking", resourceCulture); } } /// - /// Looks up a localized string similar to APK is 64 bit. + /// Looks up a localized string similar to None. /// - public static string LoadedAPKStatus_64bit { + public static string PatchingOption_HandTracking_None { get { - return ResourceManager.GetString("LoadedAPKStatus_64bit", resourceCulture); + return ResourceManager.GetString("PatchingOption_HandTracking_None", resourceCulture); } } /// - /// Looks up a localized string similar to APK is modded. + /// Looks up a localized string similar to V1. /// - public static string LoadedAPKStatus_Modded { + public static string PatchingOption_HandTracking_V1 { get { - return ResourceManager.GetString("LoadedAPKStatus_Modded", resourceCulture); + return ResourceManager.GetString("PatchingOption_HandTracking_V1", resourceCulture); } } /// - /// Looks up a localized string similar to APK is not modded. + /// Looks up a localized string similar to V1 High Frequency. /// - public static string LoadedAPKStatus_NotModded { + public static string PatchingOption_HandTracking_V1HighFrequency { get { - return ResourceManager.GetString("LoadedAPKStatus_NotModded", resourceCulture); + return ResourceManager.GetString("PatchingOption_HandTracking_V1HighFrequency", resourceCulture); } } /// - /// Looks up a localized string similar to APK Version: {0}. + /// Looks up a localized string similar to V2. /// - public static string LoadedAPKStatus_Version { + public static string PatchingOption_HandTracking_V2 { get { - return ResourceManager.GetString("LoadedAPKStatus_Version", resourceCulture); + return ResourceManager.GetString("PatchingOption_HandTracking_V2", resourceCulture); } } /// - /// Looks up a localized string similar to QP Version: {0}. + /// Looks up a localized string similar to Enable Microphone. /// - public static string LoadedQPVersion { + public static string PatchingOption_Microphone { get { - return ResourceManager.GetString("LoadedQPVersion", resourceCulture); + return ResourceManager.GetString("PatchingOption_Microphone", resourceCulture); } } /// - /// Looks up a localized string similar to QuestPatcher loading . . .. + /// Looks up a localized string similar to Disable VR Requirement. /// - public static string LoadingView_QPLoading { + public static string PatchingOption_NoVRRequirement { get { - return ResourceManager.GetString("LoadingView_QPLoading", resourceCulture); + return ResourceManager.GetString("PatchingOption_NoVRRequirement", resourceCulture); } } /// - /// Looks up a localized string similar to Modding Log. + /// Looks up a localized string similar to Enable OpenXR. /// - public static string LoggingDock_Title { + public static string PatchingOption_OpenXR { get { - return ResourceManager.GetString("LoggingDock_Title", resourceCulture); + return ResourceManager.GetString("PatchingOption_OpenXR", resourceCulture); } } /// - /// Looks up a localized string similar to QuestLoader. + /// Looks up a localized string similar to (1/6) Downloading files needed to mod the APK . /// - public static string ModLoader_QuestLoader { + public static string PatchingStage_FetchFiles { get { - return ResourceManager.GetString("ModLoader_QuestLoader", resourceCulture); + return ResourceManager.GetString("PatchingStage_FetchFiles", resourceCulture); } } /// - /// Looks up a localized string similar to Scotland2. + /// Looks up a localized string similar to (6/6) Installing modded APK. /// - public static string ModLoader_Scotland2 { + public static string PatchingStage_InstallModded { get { - return ResourceManager.GetString("ModLoader_Scotland2", resourceCulture); + return ResourceManager.GetString("PatchingStage_InstallModded", resourceCulture); } } /// - /// Looks up a localized string similar to Choose a file type to manage:. + /// Looks up a localized string similar to (2/6) Moving APK to temporary location. /// - public static string OtherItems_ChooseType { + public static string PatchingStage_MoveToTemp { get { - return ResourceManager.GetString("OtherItems_ChooseType", resourceCulture); + return ResourceManager.GetString("PatchingStage_MoveToTemp", resourceCulture); } } /// - /// Looks up a localized string similar to Failed to load files. + /// Looks up a localized string similar to Not Started. /// - public static string OtherItems_FailToLoad { + public static string PatchingStage_NotStarted { get { - return ResourceManager.GetString("OtherItems_FailToLoad", resourceCulture); + return ResourceManager.GetString("PatchingStage_NotStarted", resourceCulture); } } /// - /// Looks up a localized string similar to Please wait . . . . + /// Looks up a localized string similar to (3/6) Modifying APK files to support mods. /// - public static string OtherItems_Loading { + public static string PatchingStage_Patching { get { - return ResourceManager.GetString("OtherItems_Loading", resourceCulture); + return ResourceManager.GetString("PatchingStage_Patching", resourceCulture); } } /// - /// Looks up a localized string similar to No file types available for this app. + /// Looks up a localized string similar to (4/6) Signing APK. /// - public static string OtherItems_NotAvailable { + public static string PatchingStage_Signing { get { - return ResourceManager.GetString("OtherItems_NotAvailable", resourceCulture); + return ResourceManager.GetString("PatchingStage_Signing", resourceCulture); } } /// - /// Looks up a localized string similar to Remove All. + /// Looks up a localized string similar to (5/6) Uninstalling original APK to install modded APK. /// - public static string OtherItems_RemoveAll { + public static string PatchingStage_UninstallOriginal { get { - return ResourceManager.GetString("OtherItems_RemoveAll", resourceCulture); + return ResourceManager.GetString("PatchingStage_UninstallOriginal", resourceCulture); } } /// - /// Looks up a localized string similar to Remove Selected. + /// Looks up a localized string similar to Downloading {0} . . .. /// - public static string OtherItems_RemoveSelected { + public static string Progress_Downloading { get { - return ResourceManager.GetString("OtherItems_RemoveSelected", resourceCulture); + return ResourceManager.GetString("Progress_Downloading", resourceCulture); } } /// - /// Looks up a localized string similar to Before you install mods, QuestPatcher must patch your app. - ///This may take several minutes depending on your internet connection. - ///Make sure that your internet does not go offline during patching.. + /// Looks up a localized string similar to Extracting {0} . . .. /// - public static string Patching_BeforeStartMessage { + public static string Progress_Extracting { get { - return ResourceManager.GetString("Patching_BeforeStartMessage", resourceCulture); + return ResourceManager.GetString("Progress_Extracting", resourceCulture); } } /// - /// Looks up a localized string similar to Please wait while patching completes . . .. + /// Looks up a localized string similar to The app you are attempting to patch is 32 bit (armeabi-v7a). QuestPatcher supports a 32 version of QuestLoader, however most libraries like beatsaber-hook don't, unlesss you use a very old version. This will make modding much more difficult.. /// - public static string Patching_InProgress { + public static string Prompt_32Bit_Text { get { - return ResourceManager.GetString("Patching_InProgress", resourceCulture); + return ResourceManager.GetString("Prompt_32Bit_Text", resourceCulture); } } /// - /// Looks up a localized string similar to Patching Options. + /// Looks up a localized string similar to 32 bit APK. /// - public static string Patching_PatchingOptions { + public static string Prompt_32Bit_Title { get { - return ResourceManager.GetString("Patching_PatchingOptions", resourceCulture); + return ResourceManager.GetString("Prompt_32Bit_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Choose the mod loader to patch with: . + /// Looks up a localized string similar to SideQuest Instructions. /// - public static string Patching_SelectModLoader { + public static string Prompt_AdbDisconnect_NoDevice_SideQuest { get { - return ResourceManager.GetString("Patching_SelectModLoader", resourceCulture); + return ResourceManager.GetString("Prompt_AdbDisconnect_NoDevice_SideQuest", resourceCulture); } } /// - /// Looks up a localized string similar to Custom Splash Screen:. + /// Looks up a localized string similar to QuestPatcher could not detect your Quest. + ///Make sure that your Quest is plugged in, and that you have setup developer mode as per the SideQuest installation instructions.. /// - public static string Patching_SplashScreen { + public static string Prompt_AdbDisconnect_NoDevice_Text { get { - return ResourceManager.GetString("Patching_SplashScreen", resourceCulture); + return ResourceManager.GetString("Prompt_AdbDisconnect_NoDevice_Text", resourceCulture); } } /// - /// Looks up a localized string similar to None Selected. + /// Looks up a localized string similar to Quest Not Connected. /// - public static string Patching_SplashScreen_None { + public static string Prompt_AdbDisconnect_NoDevice_Title { get { - return ResourceManager.GetString("Patching_SplashScreen_None", resourceCulture); + return ResourceManager.GetString("Prompt_AdbDisconnect_NoDevice_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Patch my App!. + /// Looks up a localized string similar to Your Quest has been detected as offline. + ///Try restarting your Quest and your PC. /// - public static string Patching_StartPatching { + public static string Prompt_AdbDisconnect_Offline_Text { get { - return ResourceManager.GetString("Patching_StartPatching", resourceCulture); + return ResourceManager.GetString("Prompt_AdbDisconnect_Offline_Text", resourceCulture); } } /// - /// Looks up a localized string similar to Allow Debugging. + /// Looks up a localized string similar to Device Offline. /// - public static string PatchingOption_Debugging { + public static string Prompt_AdbDisconnect_Offline_Title { get { - return ResourceManager.GetString("PatchingOption_Debugging", resourceCulture); + return ResourceManager.GetString("Prompt_AdbDisconnect_Offline_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Allow External Files. + /// Looks up a localized string similar to Please press allow from this PC within the headset, even if you have done it before for SideQuest.. /// - public static string PatchingOption_ExternalFiles { + public static string Prompt_AdbDisconnect_Unauthorized_Text { get { - return ResourceManager.GetString("PatchingOption_ExternalFiles", resourceCulture); + return ResourceManager.GetString("Prompt_AdbDisconnect_Unauthorized_Text", resourceCulture); } } /// - /// Looks up a localized string similar to Hand Tracking Type. + /// Looks up a localized string similar to Device Unauthorized. /// - public static string PatchingOption_HandTracking { + public static string Prompt_AdbDisconnect_Unauthorized_Title { get { - return ResourceManager.GetString("PatchingOption_HandTracking", resourceCulture); + return ResourceManager.GetString("Prompt_AdbDisconnect_Unauthorized_Title", resourceCulture); } } /// - /// Looks up a localized string similar to None. + /// Looks up a localized string similar to Change App. /// - public static string PatchingOption_HandTracking_None { + public static string Prompt_AppNotInstalled_ChangeApp { get { - return ResourceManager.GetString("PatchingOption_HandTracking_None", resourceCulture); + return ResourceManager.GetString("Prompt_AppNotInstalled_ChangeApp", resourceCulture); } } /// - /// Looks up a localized string similar to V1. + /// Looks up a localized string similar to The selected app - {0} - is not installed. /// - public static string PatchingOption_HandTracking_V1 { + public static string Prompt_AppNotInstalled_Text { get { - return ResourceManager.GetString("PatchingOption_HandTracking_V1", resourceCulture); + return ResourceManager.GetString("Prompt_AppNotInstalled_Text", resourceCulture); } } /// - /// Looks up a localized string similar to V1 High Frequency. + /// Looks up a localized string similar to App Not Installed. /// - public static string PatchingOption_HandTracking_V1HighFrequency { + public static string Prompt_AppNotInstalled_Title { get { - return ResourceManager.GetString("PatchingOption_HandTracking_V1HighFrequency", resourceCulture); + return ResourceManager.GetString("Prompt_AppNotInstalled_Title", resourceCulture); } } /// - /// Looks up a localized string similar to V2. + /// Looks up a localized string similar to No unstripped libunity.so is available for the app you have selected. This may mean that certain mods will not work correctly until one is added to the index. Proceed with caution - if you're updating from an older version, it is wise to wait for the latest version of your app to be added.. /// - public static string PatchingOption_HandTracking_V2 { + public static string Prompt_NoUnstrippedUnity_Text { get { - return ResourceManager.GetString("PatchingOption_HandTracking_V2", resourceCulture); + return ResourceManager.GetString("Prompt_NoUnstrippedUnity_Text", resourceCulture); } } /// - /// Looks up a localized string similar to Enable Microphone. + /// Looks up a localized string similar to Missing libunity.so. /// - public static string PatchingOption_Microphone { + public static string Prompt_NoUnstrippedUnity_Title { get { - return ResourceManager.GetString("PatchingOption_Microphone", resourceCulture); + return ResourceManager.GetString("Prompt_NoUnstrippedUnity_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Disable VR Requirement. + /// Looks up a localized string similar to QuestPatcher still has ongoing operations. Closing QuestPatcher before these finish may lead to corruption of your install!. /// - public static string PatchingOption_NoVRRequirement { + public static string Prompt_OperationInProgress_Text { get { - return ResourceManager.GetString("PatchingOption_NoVRRequirement", resourceCulture); + return ResourceManager.GetString("Prompt_OperationInProgress_Text", resourceCulture); } } /// - /// Looks up a localized string similar to Enable OpenXR. + /// Looks up a localized string similar to Operations still in progress!. /// - public static string PatchingOption_OpenXR { + public static string Prompt_OperationInProgress_Title { get { - return ResourceManager.GetString("PatchingOption_OpenXR", resourceCulture); + return ResourceManager.GetString("Prompt_OperationInProgress_Title", resourceCulture); } } /// - /// Looks up a localized string similar to Downloading {0} . . .. + /// Looks up a localized string similar to The app you're attempting to patch contains a mod loader that QuestPatcher doesn't recognise. QuestPatcher can attempt to replace this mod loader with the one you have selected, but this may lead to a non-functional APK.. /// - public static string Progress_Downloading { + public static string Prompt_UnknownModLoader_Text { get { - return ResourceManager.GetString("Progress_Downloading", resourceCulture); + return ResourceManager.GetString("Prompt_UnknownModLoader_Text", resourceCulture); } } /// - /// Looks up a localized string similar to Extracting {0} . . .. + /// Looks up a localized string similar to Unknown Mod Loader Detected. /// - public static string Progress_Extracting { + public static string Prompt_UnknownModLoader_Title { get { - return ResourceManager.GetString("Progress_Extracting", resourceCulture); + return ResourceManager.GetString("Prompt_UnknownModLoader_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to It looks as though you've previously used QuestPatcher 1. + /// + ///Note that your mods from QuestPatcher 1 will be removed - this is deliberate as QuestPatcher 2 reworks mod installing to allow toggling of mods! To get your mods back, just reinstall them. + /// + ///NOTE: All save data, custom maps and cosmetics will remain safe!. + /// + public static string Prompt_UpgradeFromOld_Text { + get { + return ResourceManager.GetString("Prompt_UpgradeFromOld_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading from QuestPatcher 1. + /// + public static string Prompt_UpgradeFromOld_Title { + get { + return ResourceManager.GetString("Prompt_UpgradeFromOld_Title", resourceCulture); } } @@ -673,6 +1430,24 @@ public static string Tools_Tool_CreateDump_Description { } } + /// + /// Looks up a localized string similar to Creating the dump failed due to an unhandled error. + /// + public static string Tools_Tool_CreateDump_Failed_Text { + get { + return ResourceManager.GetString("Tools_Tool_CreateDump_Failed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create dump. + /// + public static string Tools_Tool_CreateDump_Failed_Title { + get { + return ResourceManager.GetString("Tools_Tool_CreateDump_Failed_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Open Logs Folder. /// @@ -709,6 +1484,24 @@ public static string Tools_Tool_QuickFix_Description { } } + /// + /// Looks up a localized string similar to Running the quick fix failed due to an unhandled error. + /// + public static string Tools_Tool_QuickFix_Failed_Text { + get { + return ResourceManager.GetString("Tools_Tool_QuickFix_Failed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to clear cache. + /// + public static string Tools_Tool_QuickFix_Failed_Title { + get { + return ResourceManager.GetString("Tools_Tool_QuickFix_Failed_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Repatch App. /// @@ -745,6 +1538,24 @@ public static string Tools_Tool_RestartApp_Description { } } + /// + /// Looks up a localized string similar to Restarting the app failed due to an unhandled error. + /// + public static string Tools_Tool_RestartApp_Failed_Text { + get { + return ResourceManager.GetString("Tools_Tool_RestartApp_Failed_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to restart app. + /// + public static string Tools_Tool_RestartApp_Failed_Title { + get { + return ResourceManager.GetString("Tools_Tool_RestartApp_Failed_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Starts an ADB log - you must keep your quest plugged in while you use this.. /// @@ -754,6 +1565,24 @@ public static string Tools_Tool_ToggleADB_Description { } } + /// + /// Looks up a localized string similar to Start ADB Log. + /// + public static string Tools_Tool_ToggleADB_Start { + get { + return ResourceManager.GetString("Tools_Tool_ToggleADB_Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop ADB Log. + /// + public static string Tools_Tool_ToggleADB_Stop { + get { + return ResourceManager.GetString("Tools_Tool_ToggleADB_Stop", resourceCulture); + } + } + /// /// Looks up a localized string similar to Uninstall App. /// @@ -763,6 +1592,15 @@ public static string Tools_Tool_UninstallApp { } } + /// + /// Looks up a localized string similar to Uninstall App. + /// + public static string Tools_Tool_UninstallApp_Confirm { + get { + return ResourceManager.GetString("Tools_Tool_UninstallApp_Confirm", resourceCulture); + } + } + /// /// Looks up a localized string similar to Uninstalls your selected app.. /// @@ -771,5 +1609,23 @@ public static string Tools_Tool_UninstallApp_Description { return ResourceManager.GetString("Tools_Tool_UninstallApp_Description", resourceCulture); } } + + /// + /// Looks up a localized string similar to Uninstalling your app will exit QuestPatcher, as it requires your app to be installed. If you ever reinstall your app, reopen QuestPatcher and you can repatch. + /// + public static string Tools_Tool_UninstallApp_Text { + get { + return ResourceManager.GetString("Tools_Tool_UninstallApp_Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure?. + /// + public static string Tools_Tool_UninstallApp_Title { + get { + return ResourceManager.GetString("Tools_Tool_UninstallApp_Title", resourceCulture); + } + } } } diff --git a/QuestPatcher/Resources/Strings.resx b/QuestPatcher/Resources/Strings.resx index e61eb3e9..8c905f55 100644 --- a/QuestPatcher/Resources/Strings.resx +++ b/QuestPatcher/Resources/Strings.resx @@ -18,10 +18,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + QuestPatcher loading . . . - + Display Logs @@ -257,4 +257,296 @@ Make sure that your internet does not go offline during patching. Off + + App Not Installed + + + The selected app - {0} - is not installed + + + Change App + + + Close + + + Try Again + + + Continue + + + Continue Anyway + + + Quest Not Connected + + + QuestPatcher could not detect your Quest. +Make sure that your Quest is plugged in, and that you have setup developer mode as per the SideQuest installation instructions. + + + SideQuest Instructions + + + Device Offline + + + Your Quest has been detected as offline. +Try restarting your Quest and your PC + + + Device Unauthorized + + + Please press allow from this PC within the headset, even if you have done it before for SideQuest. + + + 32 bit APK + + + The app you are attempting to patch is 32 bit (armeabi-v7a). QuestPatcher supports a 32 version of QuestLoader, however most libraries like beatsaber-hook don't, unlesss you use a very old version. This will make modding much more difficult. + + + Missing libunity.so + + + No unstripped libunity.so is available for the app you have selected. This may mean that certain mods will not work correctly until one is added to the index. Proceed with caution - if you're updating from an older version, it is wise to wait for the latest version of your app to be added. + + + Unknown Mod Loader Detected + + + The app you're attempting to patch contains a mod loader that QuestPatcher doesn't recognise. QuestPatcher can attempt to replace this mod loader with the one you have selected, but this may lead to a non-functional APK. + + + Upgrading from QuestPatcher 1 + + + It looks as though you've previously used QuestPatcher 1. + +Note that your mods from QuestPatcher 1 will be removed - this is deliberate as QuestPatcher 2 reworks mod installing to allow toggling of mods! To get your mods back, just reinstall them. + +NOTE: All save data, custom maps and cosmetics will remain safe! + + + Critical Error + + + QuestPatcher encountered a critical error during early startup, which was unrecoverable. + + + An error occured while loading + + + Unhandled Load Error + + + Change App + + + Operations still in progress! + + + QuestPatcher still has ongoing operations. Closing QuestPatcher before these finish may lead to corruption of your install! + + + Close Anyway + + + Failed to download file + + + Downloading the file from {0} failed, and thus the file could not be imported. + + + Failed to import file from URL + + + The server at {0} did not provide a valid file extension, and so QuestPatcher doesn't know how the import the file. + + + Import Failed + + + Multiple files failed to install. Check logs for details about each + + + {0} failed to install: {1} + + + The file {0} failed to install + + + Multiple Import Options + + + {0} can be imported as multiple types of file. Please select what you would like it to be installed as. + + + Wrong Mod Loader + + + The mod you are trying to install needs the mod loader {0}. However, your app has the mod loader {1} installed. +Would you like to repatch your app with the required modloader? + + + Repatch + + + Not now + + + Outdated Mod + + + The mod just installed is for version {0} of your app. However, you have {1}. Enabling the mod may crash the game, or not work. + + + Enable Now + + + Failed to install mod + + + Failed to uninstall mod + + + Failed to delete mod + + + (By {0}) + + + (By {0} - ported by {1}) + + + Enabled + + + Disabled + + + Enable + + + Disable + + + Mods + + + Libraries + + + Welcome to {0} 2 + + + Modding {0} + + + Failed to load files + + + Failed to load the list of files in the folder {0} + + + The file {0} failed to delete + + + File Failed to Delete + + + Deleting all files + + + Are you sure that you want to delete all ({0}) {1}? + + + Yes + + + No + + + {0} out of {1} files failed to delete. Check the log for details about each + + + Files Failed to Delete + + + Could not download files + + + QuestPatcher could not download files that it needs to patch the APK. Please check your internet connection, then try again. + + + Patching Failed + + + An unhandled error occured while attempting to patch the game + + + Patching Complete! + + + Your installation is now modded! +You can now access installed mods, cosmetics, etc. + +NOTE: If you see a restore app prompt inside your headset, just press close. The chance of getting banned for modding is virtually zero, so it's nothing to worry about. + + + Not Started + + + (1/6) Downloading files needed to mod the APK + + + (2/6) Moving APK to temporary location + + + (3/6) Modifying APK files to support mods + + + (4/6) Signing APK + + + (5/6) Uninstalling original APK to install modded APK + + + (6/6) Installing modded APK + + + Are you sure? + + + Uninstalling your app will exit QuestPatcher, as it requires your app to be installed. If you ever reinstall your app, reopen QuestPatcher and you can repatch + + + Failed to clear cache + + + Running the quick fix failed due to an unhandled error + + + Failed to create dump + + + Creating the dump failed due to an unhandled error + + + Failed to restart app + + + Restarting the app failed due to an unhandled error + + + Start ADB Log + + + Stop ADB Log + + + Uninstall App + \ No newline at end of file diff --git a/QuestPatcher/Resources/Strings.zh-hans.resx b/QuestPatcher/Resources/Strings.zh-hans.resx index b3677cac..2bb5ed29 100644 --- a/QuestPatcher/Resources/Strings.zh-hans.resx +++ b/QuestPatcher/Resources/Strings.zh-hans.resx @@ -11,10 +11,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + QuestPatcher 正在加载 . . . - + 显示日志 @@ -191,7 +191,7 @@ 开启ADB日志:为了使用这个,你必须让你的设备保持连接 - 创建Dump + 创建转储 创建一段调试用的信息 @@ -238,4 +238,296 @@ + + 关闭 + + + 应用未安装 + + + 所选择的APP - {0} - 没有在你的Quest上安装 + + + 切换APP + + + 重试 + + + 仍然继续 + + + 继续 + + + Quest没有连接 + + + QuestPatcher 无法检测到你的 Quest. +请检查你的 Quest 是否插入了电脑, 并且是否已按照 SideQuest 安装说明设置开发人员模式。 + + + SideQuest 安装说明 + + + 设备离线 + + + 已检测到您的 Quest 处于离线状态。 +请尝试重新启动您的 Quest 和您的电脑 + + + 设备未经授权 + + + 请在头显中允许此PC的连接(即使您之前已为 SideQuest 执行过此操作) + + + 缺少libunity.so + + + 你准备打补丁的应用暂时还没有未剥离的libunity.so,这可能导致某些Mod不能正常运行,直到它被添加到索引中。请谨慎操作 - 如果你是从旧版升级上来,最好等待它更新再打Mod。 + + + 32 位 APK + + + 您尝试打补丁的应用程序是 32 位 (armeabi-v7a)。 QuestPatcher 支持 32 版本的 QuestLoader,但大多数库(如 beatsaber-hook)不支持,除非您使用非常旧的版本。这将使打Mod变得更加困难。 + + + 检测到了未知的Mod注入器 + + + 您尝试打补丁的应用包含了一个 QuestPatcher 无法识别的Mod注入器。QuestPatcher 会尝试将已有的注入器替换为你选择的,但是这可能会导致最终的文件无法正常运行。 + + + 从QuestPatcher 1升级 + + + 看来您以前使用过 QuestPatcher 1。 + +请注意,您的 QuestPatcher 1 中的模组将被删除 - 这是故意的,因为 QuestPatcher 2 重新设计了模组安装以允许开关模组! 要恢复您的模组,只需重新安装它们即可。 + +注意:保存数据、自定义地图和装饰品不会受到影响! + + + 严重错误 + + + QuestPatcher 在启动过程中遇到了无法恢复的严重错误。 + + + 出错了! + + + 加载的过程中出现了意料之外的错误! + + + 更换应用 + + + 操作仍在处理中! + + + QuestPatcher正在处理中。在处理完成前强行关闭可能会损坏你的游戏! + + + 仍然关闭 + + + 导入失败 + + + {0} 安装失败:{1} + + + 文件 {0} 安装失败 + + + 多种导入选项 + + + {0}可以作为多种不同类型的文件导入,请选择你想要安装的内容。 + + + Mod注入器不匹配 + + + 您正在安装的模组需要 {0} 注入器,但您的游戏是使用 {1} 打的补丁。 +要使用所需的注入器重新打补丁吗? + + + 重打补丁 + + + 不是现在 + + + 版本不匹配的Mod + + + 该Mod是为{0}版本的游戏开发的,然而你当前安装的游戏版本是{1}。启用这个Mod可能会导致游戏崩溃,也可能不管用。 + + + 立即启用 + + + {0} 的服务器未提供有效的文件后缀名,因此 QuestPatcher 不知道如何导入这个文件。 + + + 无法从 URL 导入文件 + + + 从 {0} 下载文件失败,因此无法导入这个文件。 + + + 文件下载失败 + + + 有多个文件安装失败,请检查日志确认详情。 + + + 删除Mod失败 + + + 安装Mod失败 + + + 卸载Mod失败 + + + (作者 {0}) + + + (原作者 {0} - 由 {1} 移植) + + + 已禁用 + + + 已启用 + + + 禁用 + + + 启用 + + + + + + 模组 + + + 欢迎使用 {0} 2 + + + 当前应用 {0} + + + 不是 + + + 是的 + + + 文件读取失败 + + + 从文件夹 {0} 读取文件列表失败 + + + 文件删除失败 + + + 文件 {0} 删除失败 + + + {1} 个文件中 {0} 个删除失败。请检查日志确认详情。 + + + 删除所有文件 + + + 确定要删除所有 {0} 个{1}吗 + + + 文件删除失败 + + + 完蛋!出错了 + + + 在给游戏打补丁的过程中出现了一个意料外的错误。 + + + 完工! + + + 你的游戏现在已经打完补丁啦 +现在你可以安装Mod了! + +提示:如果你在头显里面看到了一个“恢复的应用”窗口,不必惊慌,只用点击取消即可。Oculus不会因为打Mod封号,所以没啥好担心的。 + + + 未开始 + + + (1/6) 下载打补丁所需的文件 + + + (2/6) 将APK移动至指定位置 + + + (3/6) 更改APK文件来使其支持安装mod + + + (4/6) 给APK签名 + + + (5/6) 卸载原有的APK + + + (6/6) 安装改过的APK + + + QuestPatcher 无法下载打补丁所需的文件。 请检查您的互联网连接,然后重试。 + + + 无法下载文件 + + + 开始ADB日志 + + + 停止ADB日志 + + + 你确定吗? + + + 游戏卸载完成后本软件将自动退出。如果你今后又安装了回来,重新打开本软件就可以再次打补丁 + + + 好的,卸载 + + + 清除缓存失败 + + + 快速修复由于意料之外的错误失败了 + + + 创建转储失败 + + + 创建转储由于意料之外的错误失败了 + + + 游戏重启失败 + + + 重启游戏由于意料之外的错误失败了 + \ No newline at end of file diff --git a/QuestPatcher/Services/QuestPatcherUiService.cs b/QuestPatcher/Services/QuestPatcherUiService.cs index eacc145d..45f2891c 100644 --- a/QuestPatcher/Services/QuestPatcherUiService.cs +++ b/QuestPatcher/Services/QuestPatcherUiService.cs @@ -8,6 +8,7 @@ using QuestPatcher.Core; using QuestPatcher.Core.Models; using QuestPatcher.Models; +using QuestPatcher.Resources; using QuestPatcher.ViewModels; using QuestPatcher.ViewModels.Modding; using QuestPatcher.Views; @@ -100,18 +101,18 @@ private async Task LoadAndHandleErrors() } catch (Exception ex) { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Unhandled Load Error", - Text = "An error occured while loading", - HideCancelButton = true + Title = Strings.Loading_UnhandledError_Title, + Text = Strings.Loading_UnhandledError_Text, + HideCancelButton = true, }; builder.OkButton.ReturnValue = false; builder.WithException(ex); builder.WithButtons( new ButtonInfo { - Text = "Change App", + Text = Strings.Loading_UnhandledError_ChangeApp, CloseDialogue = true, ReturnValue = true, OnClick = async () => @@ -124,7 +125,7 @@ private async Task LoadAndHandleErrors() // If the user did not select to change app, or closed the dialogue, we exit due to the error if (!await builder.OpenDialogue(_mainWindow)) { - Log.Error($"Exiting QuestPatcher due to unhandled load error: {ex}"); + Log.Error(ex, "Exiting QuestPatcher due to unhandled load error: {Ex}", ex.Message); ExitApplication(); } } @@ -145,12 +146,12 @@ private async void OnMainWindowClosing(object? sender, CancelEventArgs args) // We must set this to true at first, even if the user might press OK later. // This is since the caller of the event will not wait for our async handler to finish args.Cancel = true; - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Operations still in progress!", - Text = "QuestPatcher still has ongoing operations. Closing QuestPatcher before these finish may lead to corruption of your install!" + Title = Strings.Prompt_OperationInProgress_Title, + Text = Strings.Prompt_OperationInProgress_Text }; - builder.OkButton.Text = "Close Anyway"; + builder.OkButton.Text = Strings.Generic_CloseAnyway; // Now we can exit the application if the user decides to if (await builder.OpenDialogue(_mainWindow)) diff --git a/QuestPatcher/UIPrompter.cs b/QuestPatcher/UIPrompter.cs index 1aae978e..e16ff0a1 100644 --- a/QuestPatcher/UIPrompter.cs +++ b/QuestPatcher/UIPrompter.cs @@ -5,6 +5,7 @@ using Avalonia.Controls; using QuestPatcher.Core; using QuestPatcher.Core.Models; +using QuestPatcher.Resources; using QuestPatcher.Services; using QuestPatcher.ViewModels; using QuestPatcher.Views; @@ -34,17 +35,17 @@ public Task PromptAppNotInstalled() { Debug.Assert(_config != null); - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "App Not Installed", - Text = $"The selected app - {_config.AppId} - is not installed", + Title = Strings.Prompt_AppNotInstalled_Title, + Text = string.Format(Strings.Prompt_AppNotInstalled_Text, _config.AppId), HideOkButton = true }; - builder.CancelButton.Text = "Close"; + builder.CancelButton.Text = Strings.Generic_Close; builder.WithButtons( new ButtonInfo { - Text = "Change App", + Text = Strings.Prompt_AppNotInstalled_ChangeApp, CloseDialogue = true, ReturnValue = true, OnClick = async () => @@ -60,18 +61,18 @@ public Task PromptAppNotInstalled() public Task PromptAdbDisconnect(DisconnectionType type) { - DialogBuilder builder = new(); - builder.OkButton.Text = "Try Again"; + var builder = new DialogBuilder(); + builder.OkButton.Text = Strings.Generic_Retry; switch (type) { case DisconnectionType.NoDevice: - builder.Title = "Quest Not Connected"; - builder.Text = "QuestPatcher could not detect your Quest.\nMake sure that your Quest is plugged in, and that you have setup developer mode as per the SideQuest installation instructions."; + builder.Title = Strings.Prompt_AdbDisconnect_NoDevice_Title; + builder.Text = Strings.Prompt_AdbDisconnect_NoDevice_Text; builder.WithButtons( new ButtonInfo { - Text = "SideQuest Instructions", + Text = Strings.Prompt_AdbDisconnect_NoDevice_SideQuest, OnClick = () => { ProcessStartInfo psi = new() @@ -85,12 +86,12 @@ public Task PromptAdbDisconnect(DisconnectionType type) ); break; case DisconnectionType.DeviceOffline: - builder.Title = "Device Offline"; - builder.Text = "Your Quest has been detected as offline.\nTry restarting your Quest and your PC"; + builder.Title = Strings.Prompt_AdbDisconnect_Offline_Title; + builder.Text = Strings.Prompt_AdbDisconnect_Offline_Text; break; case DisconnectionType.Unauthorized: - builder.Title = "Device Unauthorized"; - builder.Text = "Please press allow from this PC within the headset, even if you have done it before for SideQuest."; + builder.Title = Strings.Prompt_AdbDisconnect_Unauthorized_Title; + builder.Text = Strings.Prompt_AdbDisconnect_Unauthorized_Text; break; default: throw new NotImplementedException($"Variant {type} has no fallback/dialogue box"); @@ -101,52 +102,46 @@ public Task PromptAdbDisconnect(DisconnectionType type) public Task PromptUnstrippedUnityUnavailable() { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Missing libunity.so", - Text = "No unstripped libunity.so is available for the app you have selected. " + - "This may mean that certain mods will not work correctly until one is added to the index. " + - "Proceed with caution - if you're updating from an older version, it is wise to wait for the latest version of your app to be added." + Title = Strings.Prompt_NoUnstrippedUnity_Title, + Text = Strings.Prompt_NoUnstrippedUnity_Text }; - builder.OkButton.Text = "Continue Anyway"; + builder.OkButton.Text = Strings.Generic_ContinueAnyway; return builder.OpenDialogue(_mainWindow); } public Task Prompt32Bit() { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "32 bit APK", - Text = "The app you are attempting to patch is 32 bit (armeabi-v7a). QuestPatcher supports a 32 version of QuestLoader, however most libraries like beatsaber-hook don't, unlesss you use a very old version. " + - "This will make modding much more difficult." + Title = Strings.Prompt_32Bit_Title, + Text = Strings.Prompt_32Bit_Text }; - builder.OkButton.Text = "Continue Anyway"; + builder.OkButton.Text = Strings.Generic_ContinueAnyway; return builder.OpenDialogue(_mainWindow); } public Task PromptUnknownModLoader() { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Unknown Mod Loader Detected", - Text = "The app you're attempting to patch contains a modloader that QuestPatcher doesn't recognise. QuestPatcher can attempt to replace this modloader with the one you have selected, but this may lead to a non-functional APK." + Title = Strings.Prompt_UnknownModLoader_Title, + Text = Strings.Prompt_UnknownModLoader_Text }; - builder.OkButton.Text = "Continue Anyway"; + builder.OkButton.Text = Strings.Generic_ContinueAnyway; return builder.OpenDialogue(_mainWindow); } public Task PromptUpgradeFromOld() { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Upgrading from QuestPatcher 1", - Text = "It looks as though you've previously used QuestPatcher 1.\n\n" + - "Note that your mods from QuestPatcher 1 will be removed - this is deliberate as QuestPatcher 2 reworks mod installing to allow toggling of mods! " + - "To get your mods back, just reinstall them.\n\n" + - "NOTE: All save data, custom maps and cosmetics will remain safe!", + Title = Strings.Prompt_UpgradeFromOld_Title, + Text = Strings.Prompt_UpgradeFromOld_Text, HideCancelButton = true }; diff --git a/QuestPatcher/ViewModels/LoadedViewModel.cs b/QuestPatcher/ViewModels/LoadedViewModel.cs index 5f11ff58..383bbee0 100644 --- a/QuestPatcher/ViewModels/LoadedViewModel.cs +++ b/QuestPatcher/ViewModels/LoadedViewModel.cs @@ -5,6 +5,7 @@ using Avalonia.Input; using QuestPatcher.Core; using QuestPatcher.Core.Models; +using QuestPatcher.Resources; using QuestPatcher.ViewModels.Modding; using ReactiveUI; using Serilog; @@ -13,7 +14,7 @@ namespace QuestPatcher.ViewModels { public class LoadedViewModel : ViewModelBase { - public string SelectedAppText => $"Modding {Config.AppId}"; + public string SelectedAppText => string.Format(Strings.Global_CurrentModding, Config.AppId); public PatchingViewModel PatchingView { get; } @@ -35,7 +36,7 @@ private string AppName } } - public string WelcomeText => $"Welcome to {AppName} 2"; + public string WelcomeText => string.Format(Strings.Global_WelcomeMessage, AppName); public string Version => VersionUtil.QuestPatcherVersion.ToString(); diff --git a/QuestPatcher/ViewModels/Modding/ManageModsViewModel.cs b/QuestPatcher/ViewModels/Modding/ManageModsViewModel.cs index e5758abd..3f4798bf 100644 --- a/QuestPatcher/ViewModels/Modding/ManageModsViewModel.cs +++ b/QuestPatcher/ViewModels/Modding/ManageModsViewModel.cs @@ -2,6 +2,7 @@ using QuestPatcher.Core; using QuestPatcher.Core.Modding; using QuestPatcher.Models; +using QuestPatcher.Resources; namespace QuestPatcher.ViewModels.Modding { @@ -16,8 +17,8 @@ public class ManageModsViewModel : ViewModelBase public ManageModsViewModel(ModManager modManager, InstallManager installManager, Window mainWindow, OperationLocker locker, ProgressViewModel progressView, BrowseImportManager browseManager) { ProgressView = progressView; - ModsList = new ModListViewModel("Mods", true, modManager.Mods, modManager, installManager, mainWindow, locker, browseManager); - LibrariesList = new ModListViewModel("Libraries", false, modManager.Libraries, modManager, installManager, mainWindow, locker, browseManager); + ModsList = new ModListViewModel(Strings.Mod_Section_Mods, true, modManager.Mods, modManager, installManager, mainWindow, locker, browseManager); + LibrariesList = new ModListViewModel(Strings.Mod_Section_Libraries, false, modManager.Libraries, modManager, installManager, mainWindow, locker, browseManager); } } } diff --git a/QuestPatcher/ViewModels/Modding/ModViewModel.cs b/QuestPatcher/ViewModels/Modding/ModViewModel.cs index 88b28026..92a68189 100644 --- a/QuestPatcher/ViewModels/Modding/ModViewModel.cs +++ b/QuestPatcher/ViewModels/Modding/ModViewModel.cs @@ -6,6 +6,7 @@ using QuestPatcher.Core; using QuestPatcher.Core.Modding; using QuestPatcher.Models; +using QuestPatcher.Resources; using ReactiveUI; namespace QuestPatcher.ViewModels.Modding @@ -17,7 +18,7 @@ namespace QuestPatcher.ViewModels.Modding public class ModViewModel : ViewModelBase { public string Name => Mod.Name; - public string Author => Mod.Porter == null ? $"(By {Mod.Author})" : $"(By {Mod.Author} - ported by {Mod.Porter})"; + public string Author => Mod.Porter == null ? string.Format(Strings.Mod_Author, Mod.Author) : string.Format(Strings.Mod_AuthorWithPorter, Mod.Author, Mod.Porter); public string Version => $"v{Mod.Version}"; @@ -120,10 +121,10 @@ private async Task InstallSafely() // Check that the modloader matches what we have installed if (Mod.ModLoader != _installManager.InstalledApp.ModLoader) { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Wrong Mod Loader", - Text = $"The mod you are trying to install needs the modloader {Mod.ModLoader}, however your app has the modloader {_installManager.InstalledApp.ModLoader} installed.", + Title = Strings.Mod_WrongModLoader_Title, + Text = String.Format(Strings.Mod_WrongModLoader_Text, Mod.ModLoader, _installManager.InstalledApp.ModLoader), HideCancelButton = true }; @@ -134,12 +135,12 @@ private async Task InstallSafely() // Check game version, and prompt if it is incorrect to avoid users installing mods that may crash their game if (Mod.PackageVersion != null && Mod.PackageVersion != _installManager.InstalledApp.Version) { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Outdated Mod", - Text = $"The mod you are trying to install is for game version {Mod.PackageVersion}, however you have {_installManager.InstalledApp.Version}. The mod may fail to load, it may crash the game, or it might even work just fine." + Title = Strings.Mod_OutdatedMod_Title, + Text = string.Format(Strings.Mod_OutdatedMod_Text, Mod.PackageVersion, _installManager.InstalledApp.Version) }; - builder.OkButton.Text = "Continue Anyway"; + builder.OkButton.Text = Strings.Generic_ContinueAnyway; if (!await builder.OpenDialogue(_mainWindow)) { @@ -153,7 +154,7 @@ private async Task InstallSafely() } catch (Exception ex) { - await ShowFailDialog("Failed to install mod", ex); + await ShowFailDialog(Strings.Mod_InstallFailed, ex); } } @@ -211,7 +212,7 @@ private async Task UninstallSafely() } catch (Exception ex) { - await ShowFailDialog("Failed to uninstall mod", ex); + await ShowFailDialog(Strings.Mod_UninstallFailed, ex); return false; } } @@ -236,7 +237,7 @@ public async void OnDelete() } catch (Exception ex) { - await ShowFailDialog("Failed to delete mod", ex); + await ShowFailDialog(Strings.Mod_DeleteFailed, ex); } finally { @@ -253,7 +254,7 @@ public async void OnDelete() /// Exception to display private async Task ShowFailDialog(string title, Exception ex) { - DialogBuilder builder = new() + var builder = new DialogBuilder { Title = title, Text = ex.Message, diff --git a/QuestPatcher/ViewModels/OtherItemsViewModel.cs b/QuestPatcher/ViewModels/OtherItemsViewModel.cs index e384ec4c..b0696707 100644 --- a/QuestPatcher/ViewModels/OtherItemsViewModel.cs +++ b/QuestPatcher/ViewModels/OtherItemsViewModel.cs @@ -7,6 +7,7 @@ using Avalonia.Controls; using QuestPatcher.Core.Modding; using QuestPatcher.Models; +using QuestPatcher.Resources; using ReactiveUI; using Serilog; @@ -103,10 +104,10 @@ public async Task RefreshFiles() } catch (Exception ex) { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Failed to load files", - Text = $"Failed to load the list of files in the folder {SelectedFileCopy.Path}", + Title = Strings.OtherItems_LoadFailed_Title, + Text = string.Format(Strings.OtherItems_LoadFailed_Text, SelectedFileCopy.Path), HideCancelButton = true }; builder.WithException(ex); @@ -144,21 +145,22 @@ public async Task DeleteFiles(params string[] filePaths) if (failed == 0) { return; } - DialogBuilder builder = new() + var builder = new DialogBuilder { HideCancelButton = true }; - // If multiple files failed, we can display a dialog saying how many succeeded and how many failed + if (failed > 1) { - builder.Title = "Files Failed to Delete"; - builder.Text = $"{failed} out of {filePaths.Length} files failed to delete. Check the log for details about each"; + // If multiple files failed, we can display a dialog saying how many succeeded and how many failed + builder.Title = Strings.OtherItems_DeleteFailed_Title_Multiple; + builder.Text = string.Format(Strings.OtherItems_DeleteFailed_Text_Multiple, failed, filePaths.Length); } else { // Otherwise, it'd be more useful to display a dialog with just the one exception - builder.Title = "File Failed to Delete"; - builder.Text = $"The file {Path.GetFileName(lastFailed)} failed to delete"; + builder.Title = Strings.OtherItems_DeleteFailed_Title; + builder.Text = string.Format(Strings.OtherItems_DeleteFailed_Text, Path.GetFileName(lastFailed)); Debug.Assert(lastException != null); builder.WithException(lastException); } @@ -189,13 +191,13 @@ public async void DeleteAllFiles() // Make sure that people don't delete all their hats accidentally! if (SelectedFileCopy.ExistingFiles.Count > 1) { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Deleting all files", - Text = $"Are you sure that you want to delete all ({SelectedFileCopy.ExistingFiles.Count}) {SelectedFileCopy.NamePlural}?" + Title = Strings.OtherItems_DeleteAll_Title, + Text = string.Format(Strings.OtherItems_DeleteAll_Text, SelectedFileCopy.ExistingFiles.Count, SelectedFileCopy.NamePlural) }; - builder.OkButton.Text = "Yes"; - builder.CancelButton.Text = "No"; + builder.OkButton.Text = Strings.Generic_Yes; + builder.CancelButton.Text = Strings.Generic_No; if (!await builder.OpenDialogue(_mainWindow)) { diff --git a/QuestPatcher/ViewModels/PatchingViewModel.cs b/QuestPatcher/ViewModels/PatchingViewModel.cs index f2128496..1ab1fbad 100644 --- a/QuestPatcher/ViewModels/PatchingViewModel.cs +++ b/QuestPatcher/ViewModels/PatchingViewModel.cs @@ -6,6 +6,7 @@ using QuestPatcher.Core.Models; using QuestPatcher.Core.Patching; using QuestPatcher.Models; +using QuestPatcher.Resources; using ReactiveUI; using Serilog; @@ -64,10 +65,10 @@ public async void StartPatching() { Log.Error("Patching failed as essential files could not be downloaded: {Message}", ex.Message); - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Could not download files", - Text = "QuestPatcher could not download files that it needs to patch the APK. Please check your internet connection, then try again.", + Title = Strings.Patching_FileDownloadFailed_Title, + Text = Strings.Patching_FileDownloadFailed_Text, HideCancelButton = true }; @@ -76,11 +77,11 @@ public async void StartPatching() catch (Exception ex) { // Print troubleshooting information for debugging - Log.Error(ex, $"Patching failed!"); - DialogBuilder builder = new() + Log.Error(ex, "Patching failed!"); + var builder = new DialogBuilder { - Title = "Patching Failed", - Text = "An unhandled error occured while attempting to patch the game", + Title = Strings.Patching_PatchingFailed_Title, + Text = Strings.Patching_PatchingFailed_Text, HideCancelButton = true }; builder.WithException(ex); @@ -97,10 +98,10 @@ public async void StartPatching() { // Display a dialogue to give the user some info about what to expect next, and to avoid them pressing restore app by mistake Log.Debug("Patching completed successfully, displaying info dialogue"); - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Patching Complete!", - Text = "Your installation is now modded!\nYou can now access installed mods, cosmetics, etc.\n\nNOTE: If you see a restore app prompt inside your headset, just press close. The chance of getting banned for modding is virtually zero, so it's nothing to worry about.", + Title = Strings.Patching_PatchingSuccess_Title, + Text = Strings.Patching_PatchingSuccess_Text, HideCancelButton = true }; await builder.OpenDialogue(_mainWindow); @@ -135,13 +136,13 @@ private void OnPatchingStageChange(PatchingStage stage) { PatchingStageText = stage switch { - PatchingStage.NotStarted => "Not Started", - PatchingStage.FetchingFiles => "Downloading files needed to mod the APK (patching stage 1/6)", - PatchingStage.MovingToTemp => "Moving APK to temporary location (patching stage 2/6)", - PatchingStage.Patching => "Modifying APK files to support mods (patching stage 3/6)", - PatchingStage.Signing => "Signing APK (patching stage 4/6)", - PatchingStage.UninstallingOriginal => "Uninstalling original APK to install modded APK (patching stage 5/6)", - PatchingStage.InstallingModded => "Installing modded APK (patching stage 6/6)", + PatchingStage.NotStarted => Strings.PatchingStage_NotStarted, + PatchingStage.FetchingFiles => Strings.PatchingStage_FetchFiles, + PatchingStage.MovingToTemp => Strings.PatchingStage_MoveToTemp, + PatchingStage.Patching => Strings.PatchingStage_Patching, + PatchingStage.Signing => Strings.PatchingStage_Signing, + PatchingStage.UninstallingOriginal => Strings.PatchingStage_UninstallOriginal, + PatchingStage.InstallingModded => Strings.PatchingStage_InstallModded, _ => throw new NotImplementedException() }; this.RaisePropertyChanged(nameof(PatchingStageText)); diff --git a/QuestPatcher/ViewModels/ToolsViewModel.cs b/QuestPatcher/ViewModels/ToolsViewModel.cs index 58166717..283b6527 100644 --- a/QuestPatcher/ViewModels/ToolsViewModel.cs +++ b/QuestPatcher/ViewModels/ToolsViewModel.cs @@ -6,6 +6,7 @@ using QuestPatcher.Core; using QuestPatcher.Core.Models; using QuestPatcher.Models; +using QuestPatcher.Resources; using QuestPatcher.Services; using ReactiveUI; using Serilog; @@ -22,7 +23,7 @@ public class ToolsViewModel : ViewModelBase public ThemeManager ThemeManager { get; } - public string AdbButtonText => _isAdbLogging ? "Stop ADB Log" : "Start ADB Log"; + public string AdbButtonText => _isAdbLogging ? Strings.Tools_Tool_ToggleADB_Stop : Strings.Tools_Tool_ToggleADB_Start; private bool _isAdbLogging; @@ -59,12 +60,12 @@ public async void UninstallApp() { try { - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Are you sure?", - Text = "Uninstalling your app will exit QuestPatcher, as it requires your app to be installed. If you ever reinstall your app, reopen QuestPatcher and you can repatch" + Title = Strings.Tools_Tool_UninstallApp_Title, + Text = Strings.Tools_Tool_UninstallApp_Text, }; - builder.OkButton.Text = "Uninstall App"; + builder.OkButton.Text = Strings.Tools_Tool_UninstallApp_Confirm; if (await builder.OpenDialogue(_mainWindow)) { Locker.StartOperation(); @@ -106,10 +107,10 @@ public async void QuickFix() catch (Exception ex) { Log.Error(ex, "Failed to clear cache"); - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Failed to clear cache", - Text = "Running the quick fix failed due to an unhandled error", + Title = Strings.Tools_Tool_QuickFix_Failed_Title, + Text = Strings.Tools_Tool_QuickFix_Failed_Text, HideCancelButton = true }; builder.WithException(ex); @@ -162,10 +163,10 @@ public async void CreateDump() { // Show a dialog with any errors Log.Error(ex, "Failed to create dump"); - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Failed to create dump", - Text = "Creating the dump failed due to an unhandled error", + Title = Strings.Tools_Tool_CreateDump_Failed_Title, + Text = Strings.Tools_Tool_CreateDump_Failed_Text, HideCancelButton = true }; builder.WithException(ex); @@ -205,10 +206,10 @@ public async void RestartApp() catch (Exception ex) { Log.Error(ex, "Failed to restart app"); - DialogBuilder builder = new() + var builder = new DialogBuilder { - Title = "Failed to restart app", - Text = "Restarting the app failed due to an unhandled error", + Title = Strings.Tools_Tool_RestartApp_Failed_Title, + Text = Strings.Tools_Tool_RestartApp_Failed_Text, HideCancelButton = true }; builder.WithException(ex); diff --git a/QuestPatcher/Views/LoadedView.axaml b/QuestPatcher/Views/LoadedView.axaml index 74d18460..bcc60837 100644 --- a/QuestPatcher/Views/LoadedView.axaml +++ b/QuestPatcher/Views/LoadedView.axaml @@ -43,7 +43,7 @@ diff --git a/QuestPatcher/Views/LoadingView.axaml b/QuestPatcher/Views/LoadingView.axaml index 02dbfd54..87389823 100644 --- a/QuestPatcher/Views/LoadingView.axaml +++ b/QuestPatcher/Views/LoadingView.axaml @@ -15,11 +15,11 @@ - + -