diff --git a/src/modules/awake/Awake/Core/Manager.cs b/src/modules/awake/Awake/Core/Manager.cs index 4ce733dfc3..df4ac87581 100644 --- a/src/modules/awake/Awake/Core/Manager.cs +++ b/src/modules/awake/Awake/Core/Manager.cs @@ -49,7 +49,9 @@ namespace Awake.Core private static DateTimeOffset ExpireAt { get; set; } + private static readonly CompositeFormat AwakeMinute = CompositeFormat.Parse(Resources.AWAKE_MINUTE); private static readonly CompositeFormat AwakeMinutes = CompositeFormat.Parse(Resources.AWAKE_MINUTES); + private static readonly CompositeFormat AwakeHour = CompositeFormat.Parse(Resources.AWAKE_HOUR); private static readonly CompositeFormat AwakeHours = CompositeFormat.Parse(Resources.AWAKE_HOURS); private static readonly BlockingCollection _stateQueue; private static CancellationTokenSource _tokenSource; @@ -451,7 +453,7 @@ namespace Awake.Core Dictionary optionsList = new() { { string.Format(CultureInfo.InvariantCulture, AwakeMinutes, 30), 1800 }, - { string.Format(CultureInfo.InvariantCulture, AwakeHours, 1), 3600 }, + { string.Format(CultureInfo.InvariantCulture, AwakeHour, 1), 3600 }, { string.Format(CultureInfo.InvariantCulture, AwakeHours, 2), 7200 }, }; return optionsList; diff --git a/src/modules/awake/Awake/Properties/Resources.Designer.cs b/src/modules/awake/Awake/Properties/Resources.Designer.cs index 1e2b941a6b..905518f6bc 100644 --- a/src/modules/awake/Awake/Properties/Resources.Designer.cs +++ b/src/modules/awake/Awake/Properties/Resources.Designer.cs @@ -159,6 +159,15 @@ namespace Awake.Properties { } } + /// + /// Looks up a localized string similar to {0} hour. + /// + internal static string AWAKE_HOUR { + get { + return ResourceManager.GetString("AWAKE_HOUR", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0} hours. /// @@ -240,6 +249,15 @@ namespace Awake.Properties { } } + /// + /// Looks up a localized string similar to {0} minute. + /// + internal static string AWAKE_MINUTE { + get { + return ResourceManager.GetString("AWAKE_MINUTE", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0} minutes. /// diff --git a/src/modules/awake/Awake/Properties/Resources.resx b/src/modules/awake/Awake/Properties/Resources.resx index 375ac385d1..76ff5b234d 100644 --- a/src/modules/awake/Awake/Properties/Resources.resx +++ b/src/modules/awake/Awake/Properties/Resources.resx @@ -123,6 +123,10 @@ Exit + + {0} hour + {0} shouldn't be removed. It will be replaced by the number 1 at runtime by the application. Used for defining a period to keep the PC awake. + {0} hours {0} shouldn't be removed. It will be replaced by a number greater than 1 at runtime by the application. Used for defining a period to keep the PC awake. @@ -142,6 +146,10 @@ Keep awake until expiration date and time Keep the system awake until expiration date and time + + {0} minute + {0} shouldn't be removed. It will be replaced by the number 1 at runtime by the application. Used for defining a period to keep the PC awake. + {0} minutes {0} shouldn't be removed. It will be replaced by a number greater than 1 at runtime by the application. Used for defining a period to keep the PC awake.