Fixed unlocalised message.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2019-09-24 23:05:58 +01:00 committed by Mihaela Stoica
parent b46d9fda92
commit eed06a6b4a
3 changed files with 6 additions and 12 deletions

View File

@ -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())
{

View File

@ -163,7 +163,7 @@ namespace XenAdmin
public string GetLogFile()
{
return Program.GetLogFile_();
return Program.GetLogFile();
}
public void UpdateServerHistory(string hostnameWithPort)

View File

@ -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