Use i18n for most string.Format if shown in log, console or client side

This commit is contained in:
SGKoishi 2022-10-24 13:28:44 -07:00
parent ea9f6b73e0
commit b766e045b5
No known key found for this signature in database
GPG key ID: 8FFC399070653828
7 changed files with 117 additions and 113 deletions

View file

@ -36,7 +36,7 @@ namespace TShockAPI
public override string ToString()
{
return string.Format("Message: {0}: {1}: {2}",
return GetString("Message: {0}: {1}: {2}",
caller, logLevel.ToString().ToUpper(), message);
}
}
@ -314,7 +314,7 @@ namespace TShockAPI
{
caller = "TShock",
logLevel = TraceLevel.Error,
message = string.Format("SQL Log insert query failed: {0}", ex),
message = GetString("SQL Log insert query failed: {0}", ex),
timestamp = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)
});
}
@ -343,7 +343,7 @@ namespace TShockAPI
foreach (var logInfo in _failures)
{
_backupLog.Write(string.Format("SQL log failed at: {0}. {1}", logInfo.timestamp, logInfo),
_backupLog.Write(GetString("SQL log failed at: {0}. {1}", logInfo.timestamp, logInfo),
TraceLevel.Error);
}
_failures.Clear();