Sadly this also changes some already existing translations
This commit is contained in:
JustArchi
2017-02-20 15:03:22 +01:00
parent 65d02b9ced
commit 7ec81bda7d
4 changed files with 223 additions and 207 deletions

View File

@@ -1693,11 +1693,11 @@ namespace ArchiSteamFarm {
}
if (!HasMobileAuthenticator) {
return Environment.NewLine + Strings.BotNoASFAuthenticator;
return FormatBotResponse(Strings.BotNoASFAuthenticator);
}
string token = await BotDatabase.MobileAuthenticator.GenerateToken().ConfigureAwait(false);
return Environment.NewLine + (!string.IsNullOrEmpty(token) ? string.Format(Strings.BotAuthenticatorToken, token) : Strings.WarningFailed);
return FormatBotResponse(!string.IsNullOrEmpty(token) ? string.Format(Strings.BotAuthenticatorToken, token) : Strings.WarningFailed);
}
private static async Task<string> Response2FA(ulong steamID, string botNames) {
@@ -1708,7 +1708,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -1742,18 +1742,18 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
if (!HasMobileAuthenticator) {
return Environment.NewLine + Strings.BotNoASFAuthenticator;
return FormatBotResponse(Strings.BotNoASFAuthenticator);
}
if (await AcceptConfirmations(confirm).ConfigureAwait(false)) {
return Environment.NewLine + Strings.Success;
return FormatBotResponse(Strings.Success);
}
return Environment.NewLine + Strings.WarningFailed;
return FormatBotResponse(Strings.WarningFailed);
}
private static async Task<string> Response2FAConfirm(ulong steamID, string botNames, bool confirm) {
@@ -1764,7 +1764,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -1798,7 +1798,7 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
StringBuilder response = new StringBuilder();
@@ -1809,23 +1809,23 @@ namespace ArchiSteamFarm {
callback = await SteamApps.RequestFreeLicense(gameID);
} catch (Exception e) {
ArchiLogger.LogGenericException(e);
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponse, BotName, gameID, EResult.Timeout));
response.Append(FormatBotResponse(string.Format(Strings.BotAddLicense, gameID, EResult.Timeout)));
break;
}
if (callback == null) {
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponse, BotName, gameID, EResult.Timeout));
response.Append(FormatBotResponse(string.Format(Strings.BotAddLicense, gameID, EResult.Timeout)));
break;
}
if (callback.GrantedApps.Count > 0) {
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponseWithItems, BotName, gameID, callback.Result, string.Join(", ", callback.GrantedApps)));
response.Append(FormatBotResponse(string.Format(Strings.BotAddLicenseWithItems, gameID, callback.Result, string.Join(", ", callback.GrantedApps))));
} else if (callback.GrantedPackages.Count > 0) {
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponseWithItems, BotName, gameID, callback.Result, string.Join(", ", callback.GrantedPackages)));
response.Append(FormatBotResponse(string.Format(Strings.BotAddLicenseWithItems, gameID, callback.Result, string.Join(", ", callback.GrantedPackages))));
} else if (await ArchiWebHandler.AddFreeLicense(gameID).ConfigureAwait(false)) {
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponseWithItems, BotName, gameID, EResult.OK, gameID));
response.Append(FormatBotResponse(string.Format(Strings.BotAddLicenseWithItems, gameID, EResult.OK, gameID)));
} else {
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponse, BotName, gameID, EResult.AccessDenied));
response.Append(FormatBotResponse(string.Format(Strings.BotAddLicense, gameID, EResult.AccessDenied)));
}
}
@@ -1843,7 +1843,7 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
string[] gameIDs = games.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -1852,14 +1852,14 @@ namespace ArchiSteamFarm {
foreach (string game in gameIDs.Where(game => !string.IsNullOrEmpty(game))) {
uint gameID;
if (!uint.TryParse(game, out gameID)) {
return Environment.NewLine + string.Format(Strings.ErrorParsingObject, nameof(gameID));
return FormatBotResponse(string.Format(Strings.ErrorParsingObject, nameof(gameID)));
}
gamesToRedeem.Add(gameID);
}
if (gamesToRedeem.Count == 0) {
return Environment.NewLine + string.Format(Strings.ErrorIsEmpty, nameof(gamesToRedeem));
return FormatBotResponse(string.Format(Strings.ErrorIsEmpty, nameof(gamesToRedeem)));
}
return await ResponseAddLicense(steamID, gamesToRedeem).ConfigureAwait(false);
@@ -1873,7 +1873,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -1898,7 +1898,7 @@ namespace ArchiSteamFarm {
private static string ResponseAPI(ulong steamID) {
if (steamID != 0) {
return IsOwner(steamID) ? Environment.NewLine + GetAPIStatus() : null;
return IsOwner(steamID) ? FormatStaticResponse(GetAPIStatus()) : null;
}
ASF.ArchiLogger.LogNullError(nameof(steamID));
@@ -1921,7 +1921,7 @@ namespace ArchiSteamFarm {
await Program.Exit().ConfigureAwait(false);
}).Forget();
return Environment.NewLine + Strings.Done;
return FormatStaticResponse(Strings.Done);
}
private async Task<string> ResponseFarm(ulong steamID) {
@@ -1935,12 +1935,12 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
await CardsFarmer.StopFarming().ConfigureAwait(false);
CardsFarmer.StartFarming().Forget();
return Environment.NewLine + Strings.Done;
return FormatBotResponse(Strings.Done);
}
private static async Task<string> ResponseFarm(ulong steamID, string botNames) {
@@ -1951,7 +1951,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -1975,16 +1975,12 @@ namespace ArchiSteamFarm {
}
private string ResponseHelp(ulong steamID) {
if (steamID == 0) {
ArchiLogger.LogNullError(nameof(steamID));
return null;
if (steamID != 0) {
return IsMaster(steamID) ? FormatBotResponse("https://github.com/" + SharedInfo.GithubRepo + "/wiki/Commands") : null;
}
if (!IsMaster(steamID)) {
return null;
}
return Environment.NewLine + "https://github.com/" + SharedInfo.GithubRepo + "/wiki/Commands";
ArchiLogger.LogNullError(nameof(steamID));
return null;
}
private async Task<string> ResponseLoot(ulong steamID) {
@@ -1998,39 +1994,39 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
if (!LootingAllowed) {
return Environment.NewLine + Strings.BotLootingTemporarilyDisabled;
return FormatBotResponse(Strings.BotLootingTemporarilyDisabled);
}
if (BotConfig.SteamMasterID == 0) {
return Environment.NewLine + Strings.BotLootingMasterNotDefined;
return FormatBotResponse(Strings.BotLootingMasterNotDefined);
}
if (BotConfig.SteamMasterID == SteamClient.SteamID) {
return Environment.NewLine + Strings.BotLootingYourself;
return FormatBotResponse(Strings.BotLootingYourself);
}
if (BotConfig.LootableTypes.Count == 0) {
return Environment.NewLine + Strings.BotLootingNoLootableTypes;
return FormatBotResponse(Strings.BotLootingNoLootableTypes);
}
await Trading.LimitInventoryRequestsAsync().ConfigureAwait(false);
HashSet<Steam.Item> inventory = await ArchiWebHandler.GetMySteamInventory(true, BotConfig.LootableTypes).ConfigureAwait(false);
if ((inventory == null) || (inventory.Count == 0)) {
return Environment.NewLine + string.Format(Strings.ErrorIsEmpty, nameof(inventory));
return FormatBotResponse(string.Format(Strings.ErrorIsEmpty, nameof(inventory)));
}
if (!await ArchiWebHandler.SendTradeOffer(inventory, BotConfig.SteamMasterID, BotConfig.SteamTradeToken).ConfigureAwait(false)) {
return Environment.NewLine + Strings.BotLootingFailed;
return FormatBotResponse(Strings.BotLootingFailed);
}
await Task.Delay(3000).ConfigureAwait(false); // Sometimes we can be too fast for Steam servers to generate confirmations, wait a short moment
await AcceptConfirmations(true, Steam.ConfirmationDetails.EType.Trade, BotConfig.SteamMasterID).ConfigureAwait(false);
return Environment.NewLine + Strings.BotLootingSuccess;
return FormatBotResponse(Strings.BotLootingSuccess);
}
private static async Task<string> ResponseLoot(ulong steamID, string botNames) {
@@ -2041,7 +2037,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2075,7 +2071,7 @@ namespace ArchiSteamFarm {
}
LootingAllowed = !LootingAllowed;
return Environment.NewLine + (LootingAllowed ? Strings.BotLootingNowEnabled : Strings.BotLootingNowDisabled);
return FormatBotResponse(LootingAllowed ? Strings.BotLootingNowEnabled : Strings.BotLootingNowDisabled);
}
private static async Task<string> ResponseLootSwitch(ulong steamID, string botNames) {
@@ -2086,7 +2082,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2120,7 +2116,7 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
Dictionary<uint, string> ownedGames;
@@ -2131,7 +2127,7 @@ namespace ArchiSteamFarm {
}
if ((ownedGames == null) || (ownedGames.Count == 0)) {
return Environment.NewLine + string.Format(Strings.ErrorIsEmpty, nameof(ownedGames));
return FormatBotResponse(string.Format(Strings.ErrorIsEmpty, nameof(ownedGames)));
}
StringBuilder response = new StringBuilder();
@@ -2142,22 +2138,18 @@ namespace ArchiSteamFarm {
uint appID;
if (uint.TryParse(game, out appID)) {
string ownedName;
if (ownedGames.TryGetValue(appID, out ownedName)) {
response.Append(Environment.NewLine + string.Format(Strings.BotOwnedAlready, BotName, appID, ownedName));
} else {
response.Append(Environment.NewLine + string.Format(Strings.BotNotOwnedYet, BotName, appID));
}
response.Append(FormatBotResponse(ownedGames.TryGetValue(appID, out ownedName) ? string.Format(Strings.BotOwnedAlready, appID, ownedName) : string.Format(Strings.BotNotOwnedYet, appID)));
continue;
}
// This is a string, so check our entire library
foreach (KeyValuePair<uint, string> ownedGame in ownedGames.Where(ownedGame => ownedGame.Value.IndexOf(game, StringComparison.OrdinalIgnoreCase) >= 0)) {
response.Append(Environment.NewLine + string.Format(Strings.BotOwnedAlready, BotName, ownedGame.Key, ownedGame.Value));
response.Append(FormatBotResponse(string.Format(Strings.BotOwnedAlready, ownedGame.Key, ownedGame.Value)));
}
}
return response.Length > 0 ? response.ToString() : Environment.NewLine + string.Format(Strings.BotNotOwnedYet, BotName, query);
return response.Length > 0 ? response.ToString() : FormatBotResponse(string.Format(Strings.BotNotOwnedYet, query));
}
private static async Task<string> ResponseOwns(ulong steamID, string botNames, string query) {
@@ -2168,7 +2160,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2201,11 +2193,7 @@ namespace ArchiSteamFarm {
return null;
}
if (string.IsNullOrEmpty(BotConfig.SteamPassword)) {
return Environment.NewLine + string.Format(Strings.ErrorIsEmpty, nameof(BotConfig.SteamPassword));
}
return Environment.NewLine + string.Format(Strings.BotEncryptedPassword, CryptoHelper.ECryptoMethod.AES, CryptoHelper.Encrypt(CryptoHelper.ECryptoMethod.AES, BotConfig.SteamPassword)) + Environment.NewLine + string.Format(Strings.BotEncryptedPassword, CryptoHelper.ECryptoMethod.ProtectedDataForCurrentUser, CryptoHelper.Encrypt(CryptoHelper.ECryptoMethod.ProtectedDataForCurrentUser, BotConfig.SteamPassword));
return !string.IsNullOrEmpty(BotConfig.SteamPassword) ? FormatBotResponse(string.Format(Strings.BotEncryptedPassword, CryptoHelper.ECryptoMethod.AES, CryptoHelper.Encrypt(CryptoHelper.ECryptoMethod.AES, BotConfig.SteamPassword))) + FormatBotResponse(string.Format(Strings.BotEncryptedPassword, CryptoHelper.ECryptoMethod.ProtectedDataForCurrentUser, CryptoHelper.Encrypt(CryptoHelper.ECryptoMethod.ProtectedDataForCurrentUser, BotConfig.SteamPassword))) : FormatBotResponse(string.Format(Strings.ErrorIsEmpty, nameof(BotConfig.SteamPassword)));
}
private static async Task<string> ResponsePassword(ulong steamID, string botNames) {
@@ -2216,7 +2204,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2250,21 +2238,21 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
if (CardsFarmer.Paused) {
return Environment.NewLine + Strings.BotAutomaticIdlingPausedAlready;
return FormatBotResponse(Strings.BotAutomaticIdlingPausedAlready);
}
await CardsFarmer.Pause(sticky).ConfigureAwait(false);
if (!SteamFamilySharingIDs.Contains(steamID)) {
return Environment.NewLine + Strings.BotAutomaticIdlingNowPaused;
return FormatBotResponse(Strings.BotAutomaticIdlingNowPaused);
}
StartFamilySharingInactivityTimer();
return Environment.NewLine + string.Format(Strings.BotAutomaticIdlingPausedWithCountdown, FamilySharingInactivityMinutes);
return FormatBotResponse(string.Format(Strings.BotAutomaticIdlingPausedWithCountdown, FamilySharingInactivityMinutes));
}
private static async Task<string> ResponsePause(ulong steamID, string botNames, bool sticky) {
@@ -2275,7 +2263,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2309,7 +2297,7 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
if (!CardsFarmer.Paused) {
@@ -2317,7 +2305,7 @@ namespace ArchiSteamFarm {
}
ArchiHandler.PlayGames(gameIDs);
return Environment.NewLine + Strings.Done;
return FormatBotResponse(Strings.Done);
}
private async Task<string> ResponsePlay(ulong steamID, string games) {
@@ -2331,7 +2319,7 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
string[] gameIDs = games.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -2340,7 +2328,7 @@ namespace ArchiSteamFarm {
foreach (string game in gameIDs.Where(game => !string.IsNullOrEmpty(game))) {
uint gameID;
if (!uint.TryParse(game, out gameID)) {
return Environment.NewLine + string.Format(Strings.ErrorParsingObject, nameof(gameID));
return FormatBotResponse(string.Format(Strings.ErrorParsingObject, nameof(gameID)));
}
gamesToPlay.Add(gameID);
@@ -2351,7 +2339,7 @@ namespace ArchiSteamFarm {
}
if (gamesToPlay.Count == 0) {
return Environment.NewLine + string.Format(Strings.ErrorIsEmpty, gamesToPlay);
return FormatBotResponse(string.Format(Strings.ErrorIsEmpty, gamesToPlay));
}
return await ResponsePlay(steamID, gamesToPlay).ConfigureAwait(false);
@@ -2365,7 +2353,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2400,7 +2388,7 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
bool forward = !redeemFlags.HasFlag(ERedeemFlags.SkipForwarding) && (redeemFlags.HasFlag(ERedeemFlags.ForceForwarding) || BotConfig.RedeemingPreferences.HasFlag(BotConfig.ERedeemingPreferences.Forwarding));
@@ -2428,7 +2416,7 @@ namespace ArchiSteamFarm {
} else {
ArchiHandler.PurchaseResponseCallback result = await currentBot.ArchiHandler.RedeemKey(key).ConfigureAwait(false);
if (result == null) {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponse, currentBot.BotName, key, EPurchaseResultDetail.Timeout));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeem, key, EPurchaseResultDetail.Timeout), currentBot.BotName));
currentBot = null; // Either bot will be changed, or loop aborted
} else {
switch (result.PurchaseResultDetail) {
@@ -2444,9 +2432,9 @@ namespace ArchiSteamFarm {
}
if ((result.Items != null) && (result.Items.Count > 0)) {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponseWithItems, currentBot.BotName, key, result.PurchaseResultDetail, string.Join("", result.Items)));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeemWithItems, key, result.PurchaseResultDetail, string.Join("", result.Items)), currentBot.BotName));
} else {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponse, currentBot.BotName, key, result.PurchaseResultDetail));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeem, key, result.PurchaseResultDetail), currentBot.BotName));
}
if (result.PurchaseResultDetail != EPurchaseResultDetail.Timeout) {
@@ -2465,9 +2453,9 @@ namespace ArchiSteamFarm {
case EPurchaseResultDetail.RateLimited:
case EPurchaseResultDetail.RestrictedCountry:
if ((result.Items != null) && (result.Items.Count > 0)) {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponseWithItems, currentBot.BotName, key, result.PurchaseResultDetail, string.Join("", result.Items)));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeemWithItems, key, result.PurchaseResultDetail, string.Join("", result.Items)), currentBot.BotName));
} else {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponse, currentBot.BotName, key, result.PurchaseResultDetail));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeem, key, result.PurchaseResultDetail), currentBot.BotName));
}
if (!forward || (keepMissingGames && (result.PurchaseResultDetail != EPurchaseResultDetail.AlreadyPurchased))) {
@@ -2486,7 +2474,7 @@ namespace ArchiSteamFarm {
foreach (Bot bot in Bots.Where(bot => (bot.Value != previousBot) && (!redeemFlags.HasFlag(ERedeemFlags.SkipInitial) || (bot.Value != this)) && bot.Value.IsConnectedAndLoggedOn && ((items.Count == 0) || items.Keys.Any(packageID => !bot.Value.OwnedPackageIDs.Contains(packageID)))).OrderBy(bot => bot.Key).Select(bot => bot.Value)) {
ArchiHandler.PurchaseResponseCallback otherResult = await bot.ArchiHandler.RedeemKey(key).ConfigureAwait(false);
if (otherResult == null) {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponse, bot.BotName, key, EResult.Timeout));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeem, key, EResult.Timeout), bot.BotName));
continue;
}
@@ -2500,9 +2488,9 @@ namespace ArchiSteamFarm {
}
if ((otherResult.Items != null) && (otherResult.Items.Count > 0)) {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponseWithItems, bot.BotName, key, otherResult.PurchaseResultDetail, string.Join("", otherResult.Items)));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeemWithItems, key, otherResult.PurchaseResultDetail, string.Join("", otherResult.Items)), bot.BotName));
} else {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponse, bot.BotName, key, otherResult.PurchaseResultDetail));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeem, key, otherResult.PurchaseResultDetail), bot.BotName));
}
if (alreadyHandled) {
@@ -2524,9 +2512,9 @@ namespace ArchiSteamFarm {
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(result.PurchaseResultDetail), result.PurchaseResultDetail));
if ((result.Items != null) && (result.Items.Count > 0)) {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponseWithItems, currentBot.BotName, key, result.PurchaseResultDetail, string.Join("", result.Items)));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeemWithItems, key, result.PurchaseResultDetail, string.Join("", result.Items)), currentBot.BotName));
} else {
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponse, currentBot.BotName, key, result.PurchaseResultDetail));
response.Append(FormatBotResponse(string.Format(Strings.BotRedeem, key, result.PurchaseResultDetail), currentBot.BotName));
}
unusedKeys.Remove(key);
@@ -2549,7 +2537,7 @@ namespace ArchiSteamFarm {
}
if (unusedKeys.Count > 0) {
response.Append(Environment.NewLine + string.Format(Strings.UnusedKeys, string.Join(", ", unusedKeys)));
response.Append(FormatBotResponse(string.Format(Strings.UnusedKeys, string.Join(", ", unusedKeys))));
}
return response.Length > 0 ? response.ToString() : null;
@@ -2563,7 +2551,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2600,7 +2588,7 @@ namespace ArchiSteamFarm {
bot.JoinMasterChat();
}
return Environment.NewLine + Strings.Done;
return FormatStaticResponse(Strings.Done);
}
private static string ResponseRestart(ulong steamID) {
@@ -2619,7 +2607,7 @@ namespace ArchiSteamFarm {
await Program.Restart().ConfigureAwait(false);
}).Forget();
return Environment.NewLine + Strings.Done;
return FormatStaticResponse(Strings.Done);
}
private string ResponseResume(ulong steamID) {
@@ -2633,16 +2621,16 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + Strings.BotNotConnected;
return FormatBotResponse(Strings.BotNotConnected);
}
if (!CardsFarmer.Paused) {
return Environment.NewLine + Strings.BotAutomaticIdlingResumedAlready;
return FormatBotResponse(Strings.BotAutomaticIdlingResumedAlready);
}
StopFamilySharingInactivityTimer();
CardsFarmer.Resume(true);
return Environment.NewLine + Strings.BotAutomaticIdlingNowResumed;
return FormatBotResponse(Strings.BotAutomaticIdlingNowResumed);
}
private static async Task<string> ResponseResume(ulong steamID, string botNames) {
@@ -2653,7 +2641,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2687,12 +2675,12 @@ namespace ArchiSteamFarm {
}
if (KeepRunning) {
return Environment.NewLine + Strings.BotAlreadyRunning;
return FormatBotResponse(Strings.BotAlreadyRunning);
}
SkipFirstShutdown = true;
Start().Forget();
return Environment.NewLine + Strings.Done;
return FormatBotResponse(Strings.Done);
}
private static async Task<string> ResponseStart(ulong steamID, string botNames) {
@@ -2703,7 +2691,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2737,31 +2725,31 @@ namespace ArchiSteamFarm {
}
if (!IsConnectedAndLoggedOn) {
return Environment.NewLine + string.Format(KeepRunning ? Strings.BotStatusNotConnected : Strings.BotStatusNotRunning, BotName);
return FormatBotResponse(KeepRunning ? Strings.BotStatusNotConnected : Strings.BotStatusNotRunning);
}
if (PlayingBlocked) {
return Environment.NewLine + string.Format(Strings.BotStatusPlayingNotAvailable, BotName);
return FormatBotResponse(Strings.BotStatusPlayingNotAvailable);
}
if (CardsFarmer.Paused) {
return Environment.NewLine + string.Format(Strings.BotStatusPaused, BotName);
return FormatBotResponse(Strings.BotStatusPaused);
}
if (IsLimitedUser) {
return Environment.NewLine + string.Format(Strings.BotStatusLimited, BotName);
return FormatBotResponse(Strings.BotStatusLimited);
}
if (CardsFarmer.CurrentGamesFarming.Count == 0) {
return Environment.NewLine + string.Format(Strings.BotsStatusNotIdling, BotName);
return FormatBotResponse(Strings.BotsStatusNotIdling);
}
if (CardsFarmer.CurrentGamesFarming.Count > 1) {
return Environment.NewLine + string.Format(Strings.BotStatusIdlingList, BotName, string.Join(", ", CardsFarmer.CurrentGamesFarming.Select(game => game.AppID)), CardsFarmer.GamesToFarm.Count, CardsFarmer.GamesToFarm.Sum(game => game.CardsRemaining), CardsFarmer.TimeRemaining.ToHumanReadable());
return FormatBotResponse(string.Format(Strings.BotStatusIdlingList, string.Join(", ", CardsFarmer.CurrentGamesFarming.Select(game => game.AppID)), CardsFarmer.GamesToFarm.Count, CardsFarmer.GamesToFarm.Sum(game => game.CardsRemaining), CardsFarmer.TimeRemaining.ToHumanReadable()));
}
CardsFarmer.Game soloGame = CardsFarmer.CurrentGamesFarming.First();
return Environment.NewLine + string.Format(Strings.BotStatusIdling, BotName, soloGame.AppID, soloGame.GameName, soloGame.CardsRemaining, CardsFarmer.GamesToFarm.Count, CardsFarmer.GamesToFarm.Sum(game => game.CardsRemaining), CardsFarmer.TimeRemaining.ToHumanReadable());
return FormatBotResponse(string.Format(Strings.BotStatusIdling, soloGame.AppID, soloGame.GameName, soloGame.CardsRemaining, CardsFarmer.GamesToFarm.Count, CardsFarmer.GamesToFarm.Sum(game => game.CardsRemaining), CardsFarmer.TimeRemaining.ToHumanReadable()));
}
private static async Task<string> ResponseStatus(ulong steamID, string botNames) {
@@ -2772,7 +2760,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2803,7 +2791,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> botsRunning = new HashSet<Bot>(Bots.Values.Where(bot => bot.KeepRunning));
string extraResponse = string.Format(Strings.BotsStatusOverview, botsRunning.Count, Bots.Count, botsRunning.Sum(bot => bot.CardsFarmer.GamesToFarm.Count), botsRunning.Sum(bot => bot.CardsFarmer.GamesToFarm.Sum(game => game.CardsRemaining)));
return string.Join("", responses) + Environment.NewLine + extraResponse;
return string.Join("", responses) + FormatStaticResponse(extraResponse);
}
private string ResponseStop(ulong steamID) {
@@ -2817,11 +2805,11 @@ namespace ArchiSteamFarm {
}
if (!KeepRunning) {
return Environment.NewLine + Strings.BotAlreadyStopped;
return FormatBotResponse(Strings.BotAlreadyStopped);
}
Stop();
return Environment.NewLine + Strings.Done;
return FormatBotResponse(Strings.Done);
}
private static async Task<string> ResponseStop(ulong steamID, string botNames) {
@@ -2832,7 +2820,7 @@ namespace ArchiSteamFarm {
HashSet<Bot> bots = GetBots(botNames);
if ((bots == null) || (bots.Count == 0)) {
return IsOwner(steamID) ? Environment.NewLine + string.Format(Strings.BotNotFound, botNames.Replace(",", " || ")) : null;
return IsOwner(steamID) ? FormatStaticResponse(string.Format(Strings.BotNotFound, botNames)) : null;
}
ICollection<string> results;
@@ -2857,7 +2845,7 @@ namespace ArchiSteamFarm {
private string ResponseUnknown(ulong steamID) {
if (steamID != 0) {
return IsMaster(steamID) ? Environment.NewLine + Strings.UnknownCommand : null;
return IsMaster(steamID) ? FormatBotResponse(Strings.UnknownCommand) : null;
}
ArchiLogger.LogNullError(nameof(steamID));
@@ -2875,20 +2863,43 @@ namespace ArchiSteamFarm {
}
await ASF.CheckForUpdate(true).ConfigureAwait(false);
return Environment.NewLine + Strings.Done;
return FormatStaticResponse(Strings.Done);
}
private string ResponseVersion(ulong steamID) {
if (steamID == 0) {
ArchiLogger.LogNullError(nameof(steamID));
return null;
if (steamID != 0) {
return IsMaster(steamID) ? FormatBotResponse(string.Format(Strings.BotVersion, SharedInfo.ASF, SharedInfo.Version)) : null;
}
if (!IsMaster(steamID)) {
return null;
ArchiLogger.LogNullError(nameof(steamID));
return null;
}
private string FormatBotResponse(string response) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + "<" + BotName + "> " + response;
}
return Environment.NewLine + "ASF V" + SharedInfo.Version;
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
internal static string FormatBotResponse(string response, string botName) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + "<" + botName + "> " + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
private static string FormatStaticResponse(string response) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
private void SendMessageToChannel(ulong steamID, string message) {

View File

@@ -115,25 +115,25 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; GameID: {1} | Status: {2}.
/// Looks up a localized string similar to GameID: {0} | Status: {1}.
/// </summary>
internal static string BotAddLicenseResponse {
internal static string BotAddLicense {
get {
return ResourceManager.GetString("BotAddLicenseResponse", resourceCulture);
return ResourceManager.GetString("BotAddLicense", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; GameID: {1} | Status: {2} | Items: {3}.
/// Looks up a localized string similar to GameID: {0} | Status: {1} | Items: {2}.
/// </summary>
internal static string BotAddLicenseResponseWithItems {
internal static string BotAddLicenseWithItems {
get {
return ResourceManager.GetString("BotAddLicenseResponseWithItems", resourceCulture);
return ResourceManager.GetString("BotAddLicenseWithItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to That bot instance is already running!.
/// Looks up a localized string similar to This bot is already running!.
/// </summary>
internal static string BotAlreadyRunning {
get {
@@ -142,7 +142,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to That bot instance is already stopped!.
/// Looks up a localized string similar to This bot is already stopped!.
/// </summary>
internal static string BotAlreadyStopped {
get {
@@ -430,7 +430,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to That bot doesn&apos;t have ASF 2FA enabled! Did you forget to import your authenticator as ASF 2FA?.
/// Looks up a localized string similar to This bot doesn&apos;t have ASF 2FA enabled! Did you forget to import your authenticator as ASF 2FA?.
/// </summary>
internal static string BotNoASFAuthenticator {
get {
@@ -457,7 +457,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Not owned yet: {1}.
/// Looks up a localized string similar to Not owned yet: {0}.
/// </summary>
internal static string BotNotOwnedYet {
get {
@@ -466,7 +466,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Owned already: {1} | {2}.
/// Looks up a localized string similar to Owned already: {0} | {1}.
/// </summary>
internal static string BotOwnedAlready {
get {
@@ -493,20 +493,20 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Key: {1} | Status: {2}.
/// Looks up a localized string similar to Key: {0} | Status: {1}.
/// </summary>
internal static string BotRedeemResponse {
internal static string BotRedeem {
get {
return ResourceManager.GetString("BotRedeemResponse", resourceCulture);
return ResourceManager.GetString("BotRedeem", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Key: {1} | Status: {2} | Items: {3}.
/// Looks up a localized string similar to Key: {0} | Status: {1} | Items: {2}.
/// </summary>
internal static string BotRedeemResponseWithItems {
internal static string BotRedeemWithItems {
get {
return ResourceManager.GetString("BotRedeemResponseWithItems", resourceCulture);
return ResourceManager.GetString("BotRedeemWithItems", resourceCulture);
}
}
@@ -520,7 +520,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is not idling anything..
/// Looks up a localized string similar to Bot is not idling anything..
/// </summary>
internal static string BotsStatusNotIdling {
get {
@@ -538,7 +538,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is idling game: {1} ({2}, {3} card drops remaining) from a total of {4} games ({5} cards) left to idle (~{6} remaining)..
/// Looks up a localized string similar to Bot is idling game: {0} ({1}, {2} card drops remaining) from a total of {3} games ({4} cards) left to idle (~{5} remaining)..
/// </summary>
internal static string BotStatusIdling {
get {
@@ -547,7 +547,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is idling games: {1} from a total of {2} games ({3} cards) left to idle (~{4} remaining)..
/// Looks up a localized string similar to Bot is idling games: {0} from a total of {1} games ({2} cards) left to idle (~{3} remaining)..
/// </summary>
internal static string BotStatusIdlingList {
get {
@@ -556,7 +556,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is limited and can&apos;t drop any cards through idling..
/// Looks up a localized string similar to Bot is limited and can&apos;t drop any cards through idling..
/// </summary>
internal static string BotStatusLimited {
get {
@@ -565,7 +565,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is not connected..
/// Looks up a localized string similar to Bot is not connected..
/// </summary>
internal static string BotStatusNotConnected {
get {
@@ -574,7 +574,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is not running..
/// Looks up a localized string similar to Bot is not running..
/// </summary>
internal static string BotStatusNotRunning {
get {
@@ -583,7 +583,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is paused or running in manual mode..
/// Looks up a localized string similar to Bot is paused or running in manual mode..
/// </summary>
internal static string BotStatusPaused {
get {
@@ -592,7 +592,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to Bot {0} is currently being used..
/// Looks up a localized string similar to Bot is currently being used..
/// </summary>
internal static string BotStatusPlayingNotAvailable {
get {
@@ -636,6 +636,15 @@ namespace ArchiSteamFarm.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to {0} V{1}.
/// </summary>
internal static string BotVersion {
get {
return ResourceManager.GetString("BotVersion", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Checking first badge page....
/// </summary>
@@ -1324,7 +1333,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter your mobile authenticator device ID (including &quot;android:&quot;): .
/// Looks up a localized string similar to Please enter your mobile authenticator device ID (including &quot;android:&quot;): .
/// </summary>
internal static string UserInputDeviceID {
get {
@@ -1333,7 +1342,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter your 2FA code from your Steam authenticator app: .
/// Looks up a localized string similar to Please enter your 2FA code from your Steam authenticator app: .
/// </summary>
internal static string UserInputSteam2FA {
get {
@@ -1342,7 +1351,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter SteamGuard auth code that was sent on your e-mail: .
/// Looks up a localized string similar to Please enter SteamGuard auth code that was sent on your e-mail: .
/// </summary>
internal static string UserInputSteamGuard {
get {
@@ -1351,7 +1360,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter your Steam login: .
/// Looks up a localized string similar to Please enter your Steam login: .
/// </summary>
internal static string UserInputSteamLogin {
get {
@@ -1360,7 +1369,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter Steam parental PIN: .
/// Looks up a localized string similar to Please enter Steam parental PIN: .
/// </summary>
internal static string UserInputSteamParentalPIN {
get {
@@ -1369,7 +1378,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter your Steam password: .
/// Looks up a localized string similar to Please enter your Steam password: .
/// </summary>
internal static string UserInputSteamPassword {
get {
@@ -1378,7 +1387,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter undocumented value of {1}: .
/// Looks up a localized string similar to Please enter undocumented value of {0}: .
/// </summary>
internal static string UserInputUnknown {
get {
@@ -1387,7 +1396,7 @@ namespace ArchiSteamFarm.Localization {
}
/// <summary>
/// Looks up a localized string similar to &lt;{0}&gt; Please enter your WCF host: .
/// Looks up a localized string similar to Please enter your WCF host: .
/// </summary>
internal static string UserInputWCFHost {
get {

View File

@@ -303,36 +303,36 @@ StackTrace:
<comment>{0} will be replaced by current version, {1} will be replaced by remote version</comment>
</data>
<data name="UserInputDeviceID" xml:space="preserve">
<value>&lt;{0}&gt; Please enter your mobile authenticator device ID (including "android:"): </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
<value>Please enter your mobile authenticator device ID (including "android:"): </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteam2FA" xml:space="preserve">
<value>&lt;{0}&gt; Please enter your 2FA code from your Steam authenticator app: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
<value>Please enter your 2FA code from your Steam authenticator app: </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamGuard" xml:space="preserve">
<value>&lt;{0}&gt; Please enter SteamGuard auth code that was sent on your e-mail: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
<value>Please enter SteamGuard auth code that was sent on your e-mail: </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamLogin" xml:space="preserve">
<value>&lt;{0}&gt; Please enter your Steam login: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
<value>Please enter your Steam login: </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamParentalPIN" xml:space="preserve">
<value>&lt;{0}&gt; Please enter Steam parental PIN: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
<value>Please enter Steam parental PIN: </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamPassword" xml:space="preserve">
<value>&lt;{0}&gt; Please enter your Steam password: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
<value>Please enter your Steam password: </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="UserInputUnknown" xml:space="preserve">
<value>&lt;{0}&gt; Please enter undocumented value of {1}: </value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by property name. Please note that this translation should end with space</comment>
<value>Please enter undocumented value of {0}: </value>
<comment>{0} will be replaced by property name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputWCFHost" xml:space="preserve">
<value>&lt;{0}&gt; Please enter your WCF host: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
<value>Please enter your WCF host: </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="WarningUnknownValuePleaseReport" xml:space="preserve">
<value>Received unknown value for {0}, please report this: {1}</value>
@@ -369,23 +369,23 @@ StackTrace:
<comment>{0} will be replaced by WCF hostname</comment>
</data>
<data name="BotAlreadyStopped" xml:space="preserve">
<value>That bot instance is already stopped!</value>
<value>This bot is already stopped!</value>
</data>
<data name="BotNotFound" xml:space="preserve">
<value>Couldn't find any bot named {0}!</value>
<comment>{0} will be replaced by bot's name</comment>
<comment>{0} will be replaced by bot's name query (string)</comment>
</data>
<data name="BotsStatusOverview" xml:space="preserve">
<value>There are {0}/{1} bots running, with total of {2} games ({3} cards) left to idle.</value>
<comment>{0} will be replaced by number of active bots, {1} will be replaced by total number of bots, {2} will be replaced by total number of games left to idle, {3} will be replaced by total number of cards left to idle</comment>
</data>
<data name="BotStatusIdling" xml:space="preserve">
<value>Bot {0} is idling game: {1} ({2}, {3} card drops remaining) from a total of {4} games ({5} cards) left to idle (~{6} remaining).</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name, {3} will be replaced by number of cards left to idle, {4} will be replaced by total number of games to idle, {5} will be replaced by total number of cards to idle, {6} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
<value>Bot is idling game: {0} ({1}, {2} card drops remaining) from a total of {3} games ({4} cards) left to idle (~{5} remaining).</value>
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name, {2} will be replaced by number of cards left to idle, {3} will be replaced by total number of games to idle, {4} will be replaced by total number of cards to idle, {5} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
</data>
<data name="BotStatusIdlingList" xml:space="preserve">
<value>Bot {0} is idling games: {1} from a total of {2} games ({3} cards) left to idle (~{4} remaining).</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by list of the games (appIDs, numbers), {2} will be replaced by total number of games to idle, {3} will be replaced by total number of cards to idle, {4} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
<value>Bot is idling games: {0} from a total of {1} games ({2} cards) left to idle (~{3} remaining).</value>
<comment>{0} will be replaced by list of the games (appIDs, numbers), {1} will be replaced by total number of games to idle, {2} will be replaced by total number of cards to idle, {3} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
</data>
<data name="CheckingFirstBadgePage" xml:space="preserve">
<value>Checking first badge page...</value>
@@ -472,17 +472,16 @@ StackTrace:
<data name="BotAccountLimited" xml:space="preserve">
<value>This account is limited, idling process is permanently unavailable until the restriction is removed!</value>
</data>
<data name="BotAddLicenseResponse" xml:space="preserve">
<value>&lt;{0}&gt; GameID: {1} | Status: {2}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by gameID (number), {2} will be replaced by status string</comment>
<data name="BotAddLicense" xml:space="preserve">
<value>GameID: {0} | Status: {1}</value>
<comment>{0} will be replaced by gameID (number), {1} will be replaced by status string</comment>
</data>
<data name="BotAddLicenseResponseWithItems" xml:space="preserve">
<value>&lt;{0}&gt; GameID: {1} | Status: {2} | Items: {3}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by gameID (number), {2} will be replaced by status string, {3} will be replaced by list of granted appIDs (numbers), separated by a comma</comment>
<data name="BotAddLicenseWithItems" xml:space="preserve">
<value>GameID: {0} | Status: {1} | Items: {2}</value>
<comment>{0} will be replaced by gameID (number), {1} will be replaced by status string, {2} will be replaced by list of granted appIDs (numbers), separated by a comma</comment>
</data>
<data name="BotAlreadyRunning" xml:space="preserve">
<value>That bot instance is already running!</value>
<comment>{0} will be replaced by bot's name</comment>
<value>This bot is already running!</value>
</data>
<data name="BotAuthenticatorConverting" xml:space="preserve">
<value>Converting .maFile into ASF format...</value>
@@ -572,19 +571,18 @@ StackTrace:
<value>You can't loot yourself!</value>
</data>
<data name="BotNoASFAuthenticator" xml:space="preserve">
<value>That bot doesn't have ASF 2FA enabled! Did you forget to import your authenticator as ASF 2FA?</value>
<value>This bot doesn't have ASF 2FA enabled! Did you forget to import your authenticator as ASF 2FA?</value>
</data>
<data name="BotNotConnected" xml:space="preserve">
<value>This bot instance is not connected!</value>
<comment>{0} will be replaced by bot's name</comment>
</data>
<data name="BotNotOwnedYet" xml:space="preserve">
<value>&lt;{0}&gt; Not owned yet: {1}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by query (string)</comment>
<value>Not owned yet: {0}</value>
<comment>{0} will be replaced by query (string)</comment>
</data>
<data name="BotOwnedAlready" xml:space="preserve">
<value>&lt;{0}&gt; Owned already: {1} | {2}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name</comment>
<value>Owned already: {0} | {1}</value>
<comment>{0} will be replaced by game's appID (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>
@@ -593,40 +591,34 @@ StackTrace:
<data name="BotReconnecting" xml:space="preserve">
<value>Reconnecting...</value>
</data>
<data name="BotRedeemResponse" xml:space="preserve">
<value>&lt;{0}&gt; Key: {1} | Status: {2}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by cd-key (string), {2} will be replaced by status string</comment>
<data name="BotRedeem" xml:space="preserve">
<value>Key: {0} | Status: {1}</value>
<comment>{0} will be replaced by cd-key (string), {1} will be replaced by status string</comment>
</data>
<data name="BotRedeemResponseWithItems" xml:space="preserve">
<value>&lt;{0}&gt; Key: {1} | Status: {2} | Items: {3}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by cd-key (string), {2} will be replaced by status string, {3} will be replaced by list of key-value pairs, separated by a comma</comment>
<data name="BotRedeemWithItems" xml:space="preserve">
<value>Key: {0} | Status: {1} | Items: {2}</value>
<comment>{0} will be replaced by cd-key (string), {1} will be replaced by status string, {2} will be replaced by list of key-value pairs, separated by a comma</comment>
</data>
<data name="BotRemovedExpiredLoginKey" xml:space="preserve">
<value>Removed expired login key!</value>
</data>
<data name="BotsStatusNotIdling" xml:space="preserve">
<value>Bot {0} is not idling anything.</value>
<comment>{0} will be replaced by bot's name</comment>
<value>Bot is not idling anything.</value>
</data>
<data name="BotStatusLimited" xml:space="preserve">
<value>Bot {0} is limited and can't drop any cards through idling.</value>
<comment>{0} will be replaced by bot's name</comment>
<value>Bot is limited and can't drop any cards through idling.</value>
</data>
<data name="BotStatusNotConnected" xml:space="preserve">
<value>Bot {0} is not connected.</value>
<comment>{0} will be replaced by bot's name</comment>
<value>Bot is not connected.</value>
</data>
<data name="BotStatusNotRunning" xml:space="preserve">
<value>Bot {0} is not running.</value>
<comment>{0} will be replaced by bot's name</comment>
<value>Bot is not running.</value>
</data>
<data name="BotStatusPaused" xml:space="preserve">
<value>Bot {0} is paused or running in manual mode.</value>
<comment>{0} will be replaced by bot's name</comment>
<value>Bot is paused or running in manual mode.</value>
</data>
<data name="BotStatusPlayingNotAvailable" xml:space="preserve">
<value>Bot {0} is currently being used.</value>
<comment>{0} will be replaced by bot's name</comment>
<value>Bot is currently being used.</value>
</data>
<data name="BotUnableToConnect" xml:space="preserve">
<value>Unable to connect to Steam: {0}</value>
@@ -705,4 +697,8 @@ StackTrace:
<value>ASF detected appID mismatch for {0} ({1}) and will use appID of {2} instead.</value>
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name, {2} will be replaced by game's appID (number)</comment>
</data>
<data name="BotVersion" xml:space="preserve">
<value>{0} V{1}</value>
<comment>{0} will be replaced by program's name (e.g. "ASF"), {1} will be replaced by program's version (e.g. "1.0.0.0"). This string typically has nothing to translate and you should leave it as it is, unless you need to change the format, e.g. in RTL languages.</comment>
</data>
</root>

View File

@@ -76,29 +76,29 @@ namespace ArchiSteamFarm {
Logging.OnUserInputStart();
switch (userInputType) {
case ASF.EUserInputType.DeviceID:
Console.Write(Strings.UserInputDeviceID, botName);
Console.Write(Bot.FormatBotResponse(Strings.UserInputDeviceID, botName));
break;
case ASF.EUserInputType.Login:
Console.Write(Strings.UserInputSteamLogin, botName);
Console.Write(Bot.FormatBotResponse(Strings.UserInputSteamLogin, botName));
break;
case ASF.EUserInputType.Password:
Console.Write(Strings.UserInputSteamPassword, botName);
Console.Write(Bot.FormatBotResponse(Strings.UserInputSteamPassword, botName));
break;
case ASF.EUserInputType.SteamGuard:
Console.Write(Strings.UserInputSteamGuard, botName);
Console.Write(Bot.FormatBotResponse(Strings.UserInputSteamGuard, botName));
break;
case ASF.EUserInputType.SteamParentalPIN:
Console.Write(Strings.UserInputSteamParentalPIN, botName);
Console.Write(Bot.FormatBotResponse(Strings.UserInputSteamParentalPIN, botName));
break;
case ASF.EUserInputType.TwoFactorAuthentication:
Console.Write(Strings.UserInputSteam2FA, botName);
Console.Write(Bot.FormatBotResponse(Strings.UserInputSteam2FA, botName));
break;
case ASF.EUserInputType.WCFHostname:
Console.Write(Strings.UserInputWCFHost, botName);
Console.Write(Bot.FormatBotResponse(Strings.UserInputWCFHost, botName));
break;
default:
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(userInputType), userInputType));
Console.Write(Strings.UserInputUnknown, botName, userInputType);
Console.Write(Bot.FormatBotResponse(string.Format(Strings.UserInputUnknown, userInputType), botName));
break;
}