CA-208808: The items of “Day of the week” drop-down list are not localized

Signed-off-by: Mihaela Stoica <Mihaela.Stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2016-04-26 10:55:34 +01:00
parent c3e0fd082e
commit 394320679f
2 changed files with 5 additions and 2 deletions

View File

@ -33,6 +33,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Windows.Forms;
using XenAdmin.Actions;
@ -201,7 +202,8 @@ namespace XenAdmin.Dialogs.HealthCheck
var time = new DateTime(1900, 1, 1, healthCheckSettings.TimeOfDay, 0, 0);
return healthCheckSettings.Status == HealthCheckStatus.Enabled
? string.Format(Messages.HEALTHCHECK_SCHEDULE_DESCRIPTION, healthCheckSettings.IntervalInWeeks,
healthCheckSettings.DayOfWeek, HelpersGUI.DateTimeToString(time, Messages.DATEFORMAT_HM, true))
DateTimeFormatInfo.CurrentInfo.GetDayName(healthCheckSettings.DayOfWeek),
HelpersGUI.DateTimeToString(time, Messages.DATEFORMAT_HM, true))
: string.Empty;
}
}

View File

@ -32,6 +32,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Core;
@ -94,7 +95,7 @@ namespace XenAdmin.Dialogs.HealthCheck
Dictionary<int, string> days = new Dictionary<int, string>();
foreach (var dayOfWeek in Enum.GetValues(typeof(DayOfWeek)))
{
days.Add((int)dayOfWeek, dayOfWeek.ToString());
days.Add((int)dayOfWeek, DateTimeFormatInfo.CurrentInfo.GetDayName((DayOfWeek)dayOfWeek));
}
return days;
}