mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-09 21:24:34 +00:00
Use string interpolation wherever possible
Majority of cases still need to go through string.Format() due to localization requirements
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user