mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Further enhance remaining TimeSpan-based strings
This commit is contained in:
@@ -75,14 +75,16 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if ((AutoUpdatesTimer == null) && Program.GlobalConfig.AutoUpdates) {
|
||||
TimeSpan autoUpdatePeriod = TimeSpan.FromHours(AutoUpdatePeriodInHours);
|
||||
|
||||
AutoUpdatesTimer = new Timer(
|
||||
async e => await CheckForUpdate().ConfigureAwait(false),
|
||||
null,
|
||||
TimeSpan.FromHours(AutoUpdatePeriodInHours), // Delay
|
||||
TimeSpan.FromHours(AutoUpdatePeriodInHours) // Period
|
||||
autoUpdatePeriod, // Delay
|
||||
autoUpdatePeriod // Period
|
||||
);
|
||||
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.AutoUpdateCheckInfo, AutoUpdatePeriodInHours));
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.AutoUpdateCheckInfo, autoUpdatePeriod.ToHumanReadable()));
|
||||
}
|
||||
|
||||
string releaseURL = SharedInfo.GithubReleaseURL;
|
||||
|
||||
@@ -1415,7 +1415,7 @@ namespace ArchiSteamFarm {
|
||||
await Task.Delay(5000).ConfigureAwait(false);
|
||||
break;
|
||||
case EResult.RateLimitExceeded:
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.BotRateLimitExceeded, LoginCooldownInMinutes));
|
||||
ArchiLogger.LogGenericInfo(string.Format(Strings.BotRateLimitExceeded, TimeSpan.FromMinutes(LoginCooldownInMinutes).ToHumanReadable()));
|
||||
await Task.Delay(LoginCooldownInMinutes * 60 * 1000).ConfigureAwait(false);
|
||||
break;
|
||||
case EResult.AccountDisabled:
|
||||
@@ -2764,7 +2764,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
StartFamilySharingInactivityTimer();
|
||||
return FormatBotResponse(string.Format(Strings.BotAutomaticIdlingPausedWithCountdown, FamilySharingInactivityMinutes));
|
||||
return FormatBotResponse(string.Format(Strings.BotAutomaticIdlingPausedWithCountdown, TimeSpan.FromMinutes(FamilySharingInactivityMinutes).ToHumanReadable()));
|
||||
}
|
||||
|
||||
private static async Task<string> ResponsePause(ulong steamID, string botNames, bool sticky) {
|
||||
|
||||
6
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
6
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
@@ -70,7 +70,7 @@ namespace ArchiSteamFarm.Localization {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu ASF will automatically check for new versions every {0} hours..
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu ASF will automatically check for new versions every {0}..
|
||||
/// </summary>
|
||||
internal static string AutoUpdateCheckInfo {
|
||||
get {
|
||||
@@ -223,7 +223,7 @@ namespace ArchiSteamFarm.Localization {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Automatic idling is now paused! You have {0} minutes to start a game..
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Automatic idling is now paused! You have {0} to start a game..
|
||||
/// </summary>
|
||||
internal static string BotAutomaticIdlingPausedWithCountdown {
|
||||
get {
|
||||
@@ -493,7 +493,7 @@ namespace ArchiSteamFarm.Localization {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Rate limit exceeded; we will retry after {0} minutes of cooldown....
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Rate limit exceeded; we will retry after {0} of cooldown....
|
||||
/// </summary>
|
||||
internal static string BotRateLimitExceeded {
|
||||
get {
|
||||
|
||||
@@ -122,8 +122,8 @@
|
||||
<comment>{0} will be replaced by trade number</comment>
|
||||
</data>
|
||||
<data name="AutoUpdateCheckInfo" xml:space="preserve">
|
||||
<value>ASF will automatically check for new versions every {0} hours.</value>
|
||||
<comment>{0} will be replaced by number of hours</comment>
|
||||
<value>ASF will automatically check for new versions every {0}.</value>
|
||||
<comment>{0} will be replaced by translated TimeSpan string (such as "24 hours")</comment>
|
||||
</data>
|
||||
<data name="Content" xml:space="preserve">
|
||||
<value>Content:
|
||||
@@ -478,8 +478,8 @@ StackTrace:
|
||||
<value>Automatic idling is paused already!</value>
|
||||
</data>
|
||||
<data name="BotAutomaticIdlingPausedWithCountdown" xml:space="preserve">
|
||||
<value>Automatic idling is now paused! You have {0} minutes to start a game.</value>
|
||||
<comment>{0} will be replaced by number of minutes</comment>
|
||||
<value>Automatic idling is now paused! You have {0} to start a game.</value>
|
||||
<comment>{0} will be replaced by translated TimeSpan string (such as "5 minutes")</comment>
|
||||
</data>
|
||||
<data name="BotAutomaticIdlingResumedAlready" xml:space="preserve">
|
||||
<value>Automatic idling is resumed already!</value>
|
||||
@@ -556,8 +556,8 @@ StackTrace:
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
|
||||
</data>
|
||||
<data name="BotRateLimitExceeded" xml:space="preserve">
|
||||
<value>Rate limit exceeded; we will retry after {0} minutes of cooldown...</value>
|
||||
<comment>{0} will be replaced by number of minutes</comment>
|
||||
<value>Rate limit exceeded; we will retry after {0} of cooldown...</value>
|
||||
<comment>{0} will be replaced by translated TimeSpan string (such as "25 minutes")</comment>
|
||||
</data>
|
||||
<data name="BotReconnecting" xml:space="preserve">
|
||||
<value>Reconnecting...</value>
|
||||
|
||||
Reference in New Issue
Block a user