diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index fb38f4f..547f49a 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -188,7 +188,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Failed to extract all files. + /// Looks up a localized string similar to Failed to extract files. /// public static string Bootstrapper_ExtractionFailed_Title { get { @@ -235,7 +235,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Failed to apply all modifications. + /// Looks up a localized string similar to Failed to apply modifications. /// public static string Bootstrapper_ModificationsFailed_Title { get { @@ -991,6 +991,15 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Failed to preview theme: {0}. + /// + public static string CustomTheme_Editor_Errors_PreviewFailed { + get { + return ResourceManager.GetString("CustomTheme.Editor.Errors.PreviewFailed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Open Theme Directory. /// @@ -1218,7 +1227,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Custom bootstrappers can only have a maximum of {0} elements, got {1}.. + /// Looks up a localized string similar to Custom bootstrappers can only have a maximum of {0} elements, got {1}. /// public static string CustomTheme_Errors_TooManyElements { get { diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index e4111a7..33a9d19 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -1274,13 +1274,13 @@ Please close any applications that may be using Roblox's files, and relaunch.Roblox no longer supports Windows 7 or 8.1. To continue playing Roblox, please upgrade to Windows 10 or newer. - Failed to extract all files + Failed to extract files Some content may be missing. Force a Roblox reinstallation in settings to fix this. - Failed to apply all modifications + Failed to apply modifications Not all modifications will be present in the current launch. @@ -1302,7 +1302,7 @@ Please close any applications that may be using Roblox's files, and relaunch.Custom dialog has already been initialised - Custom bootstrappers can only have a maximum of {0} elements, got {1}. + Custom bootstrappers can only have a maximum of {0} elements, got {1} {0} and {1} are numbers @@ -1496,4 +1496,7 @@ Defaulting to {1}. Your theme has been saved! + + Failed to preview theme: {0} + \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs index 68a61d0..33743c6 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs @@ -416,7 +416,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private static UIElement HandleXmlElement_BloxstrapCustomBootstrapper_Fake(CustomDialog dialog, XElement xmlElement) { // this only exists to error out the theme if someone tries to use two BloxstrapCustomBootstrappers - throw new Exception($"{xmlElement.Parent!.Name} cannot have a child of {xmlElement.Name}"); + throw new CustomThemeException("CustomTheme.Errors.ElementInvalidChild", xmlElement.Parent!.Name, xmlElement.Name); } private static DummyFrameworkElement HandleXmlElement_TitleBar(CustomDialog dialog, XElement xmlElement) diff --git a/Bloxstrap/UI/ViewModels/Editor/BootstrapperEditorWindowViewModel.cs b/Bloxstrap/UI/ViewModels/Editor/BootstrapperEditorWindowViewModel.cs index b8c1968..72129b8 100644 --- a/Bloxstrap/UI/ViewModels/Editor/BootstrapperEditorWindowViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Editor/BootstrapperEditorWindowViewModel.cs @@ -50,7 +50,7 @@ namespace Bloxstrap.UI.ViewModels.Editor App.Logger.WriteLine(LOG_IDENT, "Failed to preview custom theme"); App.Logger.WriteException(LOG_IDENT, ex); - Frontend.ShowMessageBox($"Failed to preview theme: {ex.Message}", MessageBoxImage.Error, MessageBoxButton.OK); + Frontend.ShowMessageBox(string.Format(Strings.CustomTheme_Editor_Errors_PreviewFailed, ex.Message), MessageBoxImage.Error, MessageBoxButton.OK); } }