localise frontend

This commit is contained in:
bluepilledgreat 2025-03-11 18:53:57 +00:00
parent f873b7785e
commit 667fa5c1db
3 changed files with 28 additions and 2 deletions

View File

@ -1153,6 +1153,25 @@ namespace Bloxstrap.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to No custom theme selected.
/// </summary>
public static string CustomTheme_Errors_NoThemeSelected {
get {
return ResourceManager.GetString("CustomTheme.Errors.NoThemeSelected", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed to setup custom bootstrapper: {0}.
///Defaulting to Fluent..
/// </summary>
public static string CustomTheme_Errors_SetupFailed {
get {
return ResourceManager.GetString("CustomTheme.Errors.SetupFailed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Theme XML root is not {0}.
/// </summary>

View File

@ -1423,4 +1423,11 @@ Please close any applications that may be using Roblox's files, and relaunch.</v
<data name="CustomTheme.Add.Errors.ZipInvalidData" xml:space="preserve">
<value>Invalid or corrupted ZIP file</value>
</data>
<data name="CustomTheme.Errors.NoThemeSelected" xml:space="preserve">
<value>No custom theme selected</value>
</data>
<data name="CustomTheme.Errors.SetupFailed" xml:space="preserve">
<value>Failed to setup custom bootstrapper: {0}.
Defaulting to Fluent.</value>
</data>
</root>

View File

@ -67,7 +67,7 @@ namespace Bloxstrap.UI
try
{
if (App.Settings.Prop.SelectedCustomTheme == null)
throw new Exception("No custom theme selected");
throw new CustomThemeException("CustomTheme.Errors.NoThemeSelected");
CustomDialog dialog = new CustomDialog();
dialog.ApplyCustomTheme(App.Settings.Prop.SelectedCustomTheme);
@ -78,7 +78,7 @@ namespace Bloxstrap.UI
App.Logger.WriteException(LOG_IDENT, ex);
if (!App.LaunchSettings.QuietFlag.Active)
Frontend.ShowMessageBox($"Failed to setup custom bootstrapper: {ex.Message}.\nDefaulting to Fluent.", MessageBoxImage.Error);
ShowMessageBox(string.Format(Strings.CustomTheme_Errors_SetupFailed, ex.Message), MessageBoxImage.Error);
return GetBootstrapperDialog(BootstrapperStyle.FluentDialog);
}