Localized strings cannot be stored in static fields
This commit is contained in:
Lars Brubaker 2017-12-04 14:14:12 -08:00
parent 0bfcc1694d
commit c66fc57614
7 changed files with 44 additions and 42 deletions

View file

@ -386,13 +386,11 @@ namespace MatterHackers.MatterControl
return container;
}
private static string importPrinterSuccessMessage = "You have successfully imported a new printer profile. You can find '{0}' in your list of available printers.".Localize();
private static string importSettingSuccessMessage = "You have successfully imported a new {1} setting. You can find '{0}' in your list of {1} settings.".Localize();
public static void ImportFromExisting(string settingsFilePath)
{
if (ProfileManager.ImportFromExisting(settingsFilePath))
{
string importPrinterSuccessMessage = "You have successfully imported a new printer profile. You can find '{0}' in your list of available printers.".Localize();
DialogWindow.Show(
new ImportSucceeded(importPrinterSuccessMessage.FormatWith(Path.GetFileNameWithoutExtension(settingsFilePath))));
}
@ -497,6 +495,7 @@ namespace MatterHackers.MatterControl
ActiveSliceSettings.Instance.Save();
string importSettingSuccessMessage = "You have successfully imported a new {1} setting. You can find '{0}' in your list of {1} settings.".Localize();
WizardWindow.ChangeToPage(new ImportSucceeded(importSettingSuccessMessage.FormatWith(Path.GetFileNameWithoutExtension(settingsFilePath), sectionName))
{
WizardWindow = this.WizardWindow,