diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index f07e6e6..f05872b 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -441,6 +441,15 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Create New. + /// + public static string Common_CreateNew { + get { + return ResourceManager.GetString("Common.CreateNew", resourceCulture); + } + } + /// /// Looks up a localized string similar to Custom. /// @@ -495,6 +504,15 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Import. + /// + public static string Common_Import { + get { + return ResourceManager.GetString("Common.Import", resourceCulture); + } + } + /// /// Looks up a localized string similar to Import from file. /// @@ -684,6 +702,15 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Template. + /// + public static string Common_Template { + get { + return ResourceManager.GetString("Common.Template", resourceCulture); + } + } + /// /// Looks up a localized string similar to Value. /// @@ -847,6 +874,87 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to File must be a ZIP. + /// + public static string CustomTheme_Add_Errors_FileNotZip { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.FileNotZip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name cannot be empty. + /// + public static string CustomTheme_Add_Errors_NameEmpty { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.NameEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name contains illegal characters. + /// + public static string CustomTheme_Add_Errors_NameIllegalCharacters { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.NameIllegalCharacters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name cannot be used. + /// + public static string CustomTheme_Add_Errors_NameReserved { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.NameReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name is already in use. + /// + public static string CustomTheme_Add_Errors_NameTaken { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.NameTaken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown error. + /// + public static string CustomTheme_Add_Errors_Unknown { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.Unknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid or corrupted ZIP file. + /// + public static string CustomTheme_Add_Errors_ZipInvalidData { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.ZipInvalidData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Theme file could not be found in the ZIP file. + /// + public static string CustomTheme_Add_Errors_ZipMissingThemeFile { + get { + return ResourceManager.GetString("CustomTheme.Add.Errors.ZipMissingThemeFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add Custom Theme. + /// + public static string CustomTheme_Add_Title { + get { + return ResourceManager.GetString("CustomTheme.Add.Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Custom dialog has already been initialised. /// diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index e307593..0d14ee0 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -1387,4 +1387,40 @@ Please close any applications that may be using Roblox's files, and relaunch. Open Theme Directory + + Create New + + + Import + + + Add Custom Theme + + + Template + + + Name cannot be empty + + + Name contains illegal characters + + + Name cannot be used + + + Unknown error + + + Name is already in use + + + File must be a ZIP + + + Theme file could not be found in the ZIP file + + + Invalid or corrupted ZIP file + \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml b/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml index 47f3a01..b49fcb0 100644 --- a/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml +++ b/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml @@ -29,7 +29,7 @@ - + @@ -93,7 +93,7 @@ Grid.Column="0" MinWidth="100" VerticalAlignment="Center" - Text="Template" /> + Text="{x:Static resources:Strings.Common_Template}" /> - + diff --git a/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml.cs b/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml.cs index 6358ac4..94ce4a8 100644 --- a/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/Dialogs/AddCustomThemeDialog.xaml.cs @@ -87,7 +87,7 @@ namespace Bloxstrap.UI.Elements.Dialogs if (string.IsNullOrEmpty(_viewModel.Name)) { - _viewModel.NameError = "Name cannot be empty"; + _viewModel.NameError = Strings.CustomTheme_Add_Errors_NameEmpty; return false; } @@ -98,16 +98,16 @@ namespace Bloxstrap.UI.Elements.Dialogs switch (validationResult) { case PathValidator.ValidationResult.IllegalCharacter: - _viewModel.NameError = "Name contains illegal characters"; + _viewModel.NameError = Strings.CustomTheme_Add_Errors_NameIllegalCharacters; break; case PathValidator.ValidationResult.ReservedFileName: - _viewModel.NameError = "Name cannot be used"; + _viewModel.NameError = Strings.CustomTheme_Add_Errors_NameReserved; break; default: App.Logger.WriteLine(LOG_IDENT, $"Got unhandled PathValidator::ValidationResult {validationResult}"); Debug.Assert(false); - _viewModel.NameError = "Unknown error"; + _viewModel.NameError = Strings.CustomTheme_Add_Errors_Unknown; break; } @@ -118,7 +118,7 @@ namespace Bloxstrap.UI.Elements.Dialogs string path = Path.Combine(Paths.CustomThemes, _viewModel.Name, "Theme.xml"); if (File.Exists(path)) { - _viewModel.NameError = "Name is already in use"; + _viewModel.NameError = Strings.CustomTheme_Add_Errors_NameTaken; return false; } @@ -131,7 +131,7 @@ namespace Bloxstrap.UI.Elements.Dialogs if (!_viewModel.FilePath.EndsWith(".zip")) { - _viewModel.FileError = "File must be a ZIP"; + _viewModel.FileError = Strings.CustomTheme_Add_Errors_FileNotZip; return false; } @@ -153,7 +153,7 @@ namespace Bloxstrap.UI.Elements.Dialogs if (!foundThemeFile) { - _viewModel.FileError = "Theme file could not be found in the ZIP file"; + _viewModel.FileError = Strings.CustomTheme_Add_Errors_ZipMissingThemeFile; return false; } @@ -164,7 +164,7 @@ namespace Bloxstrap.UI.Elements.Dialogs App.Logger.WriteLine(LOG_IDENT, "Got invalid data"); App.Logger.WriteException(LOG_IDENT, ex); - _viewModel.FileError = "Invalid or corrupted ZIP file"; + _viewModel.FileError = Strings.CustomTheme_Add_Errors_ZipInvalidData; return false; } }