Use string interpolation wherever possible

Majority of cases still need to go through string.Format() due to localization requirements
This commit is contained in:
Archi
2021-09-27 19:59:00 +02:00
parent de19010820
commit f2d3a2a894
29 changed files with 160 additions and 160 deletions

View File

@@ -254,7 +254,7 @@ namespace ArchiSteamFarm {
}
if (globalConfig.Debug) {
ASF.ArchiLogger.LogGenericDebug(globalConfigFile + ": " + JsonConvert.SerializeObject(globalConfig, Formatting.Indented));
ASF.ArchiLogger.LogGenericDebug($"{globalConfigFile}: {JsonConvert.SerializeObject(globalConfig, Formatting.Indented)}");
}
if (!string.IsNullOrEmpty(globalConfig.CurrentCulture)) {
@@ -333,7 +333,7 @@ namespace ArchiSteamFarm {
if (currentStringObjects.Count < defaultStringObjects.Count) {
float translationCompleteness = currentStringObjects.Count / (float) defaultStringObjects.Count;
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.TranslationIncomplete, CultureInfo.CurrentUICulture.Name + " (" + CultureInfo.CurrentUICulture.EnglishName + ")", translationCompleteness.ToString("P1", CultureInfo.CurrentCulture)));
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.TranslationIncomplete, $"{CultureInfo.CurrentUICulture.Name} ({CultureInfo.CurrentUICulture.EnglishName})", translationCompleteness.ToString("P1", CultureInfo.CurrentCulture)));
}
return true;
@@ -367,7 +367,7 @@ namespace ArchiSteamFarm {
// If debugging is on, we prepare debug directory prior to running
if (Debugging.IsUserDebugging) {
if (Debugging.IsDebugConfigured) {
ASF.ArchiLogger.LogGenericDebug(globalDatabaseFile + ": " + JsonConvert.SerializeObject(ASF.GlobalDatabase, Formatting.Indented));
ASF.ArchiLogger.LogGenericDebug($"{globalDatabaseFile}: {JsonConvert.SerializeObject(ASF.GlobalDatabase, Formatting.Indented)}");
}
Logging.EnableTraceLogging();