From eed06a6b4a82d8243e9dc7368d008bf0f4771428 Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Tue, 24 Sep 2019 23:05:58 +0100 Subject: [PATCH] Fixed unlocalised message. Signed-off-by: Konstantina Chremmou --- XenAdmin/Program.cs | 14 ++++---------- XenAdmin/WinformsXenAdminConfigProvider.cs | 2 +- .../BugToolPageSelectCapabilities.cs | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/XenAdmin/Program.cs b/XenAdmin/Program.cs index 7548a3fa7..f455a1d99 100644 --- a/XenAdmin/Program.cs +++ b/XenAdmin/Program.cs @@ -575,7 +575,7 @@ namespace XenAdmin } else { - string filepath = GetLogFile(); + string filepath = GetLogFile() ?? Messages.MESSAGEBOX_LOGFILE_MISSING; using (var d = new ThreeButtonDialog( new ThreeButtonDialog.Details( @@ -715,7 +715,7 @@ namespace XenAdmin private static void FatalError() { string msg = String.Format(Messages.MESSAGEBOX_PROGRAM_UNEXPECTED, - HelpersGUI.DateTimeToString(DateTime.Now, "yyyy-MM-dd HH:mm:ss", false), GetLogFile_()); + HelpersGUI.DateTimeToString(DateTime.Now, "yyyy-MM-dd HH:mm:ss", false), GetLogFile()); var msgWithStackTrace = string.Format("{0}\n{1}", msg, Environment.StackTrace); log.Fatal(msgWithStackTrace); @@ -748,7 +748,7 @@ namespace XenAdmin public static void ViewLogFiles() { - string s = GetLogFile_(); + string s = GetLogFile(); if (s == null) { using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Error, Messages.MESSAGEBOX_LOGFILE_MISSING, Messages.XENCENTER))) @@ -762,13 +762,7 @@ namespace XenAdmin } } - private static string GetLogFile() - { - string s = GetLogFile_(); - return s ?? "MISSING LOG FILE!"; - } - - public static string GetLogFile_() + public static string GetLogFile() { foreach (log4net.Appender.IAppender appender in log.Logger.Repository.GetAppenders()) { diff --git a/XenAdmin/WinformsXenAdminConfigProvider.cs b/XenAdmin/WinformsXenAdminConfigProvider.cs index 457731093..7b38de061 100644 --- a/XenAdmin/WinformsXenAdminConfigProvider.cs +++ b/XenAdmin/WinformsXenAdminConfigProvider.cs @@ -163,7 +163,7 @@ namespace XenAdmin public string GetLogFile() { - return Program.GetLogFile_(); + return Program.GetLogFile(); } public void UpdateServerHistory(string hostnameWithPort) diff --git a/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs b/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs index c2fa9316e..c9d22f5ed 100644 --- a/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs +++ b/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs @@ -314,7 +314,7 @@ namespace XenAdmin.Wizards.BugToolWizardFiles private long getLogSize() { - String path = Program.GetLogFile_(); + String path = Program.GetLogFile(); if (path != null) { // Size of XenCenter.log