Browse Source

Log plurals

Keelhauled 4 years ago
parent
commit
0f4ac05a31

+ 1 - 1
BepInEx.Preloader/Patching/AssemblyPatcher.cs

@@ -150,7 +150,7 @@ namespace BepInEx.Preloader.Patching
 
 				var assName = ass.GetName();
 				Logger.Log(patcherCollection.Any() ? LogLevel.Info : LogLevel.Debug,
-					$"Loaded {patcherCollection.Count} patcher method{(patcherCollection.Count > 1 ? "s" : "")} from {assName.Name}, Version={assName.Version}");
+					$"Loaded {patcherCollection.Count} patcher method{(patcherCollection.Count == 1 ? "" : "s")} from [{assName.Name} {assName.Version}]");
 			}
 
 			foreach (KeyValuePair<string, PatcherPlugin> patcher in sortedPatchers)

+ 1 - 1
BepInEx.Preloader/Preloader.cs

@@ -83,7 +83,7 @@ namespace BepInEx.Preloader
 
 				AssemblyPatcher.AddPatchersFromDirectory(Paths.PatcherPluginPath);
 
-				Logger.LogInfo($"{AssemblyPatcher.PatcherPlugins.Count} patcher plugin(s) loaded");
+				Logger.LogInfo($"{AssemblyPatcher.PatcherPlugins.Count} patcher plugin{(AssemblyPatcher.PatcherPlugins.Count == 1 ? "" : "s")} loaded");
 
 				AssemblyPatcher.PatchAndLoad(Paths.ManagedPath);
 				AssemblyPatcher.DisposePatchers();

+ 1 - 1
BepInEx/Bootstrap/Chainloader.cs

@@ -274,7 +274,7 @@ namespace BepInEx.Bootstrap
 				var pluginInfos = pluginsToLoad.SelectMany(p => p.Value).ToList();
 				var loadedAssemblies = new Dictionary<string, Assembly>();
 
-				Logger.LogInfo($"{pluginInfos.Count} plugins to load");
+				Logger.LogInfo($"{pluginInfos.Count} plugin{(PluginInfos.Count == 1 ? "" : "s")} to load");
 
 				// We use a sorted dictionary to ensure consistent load order
 				var dependencyDict = new SortedDictionary<string, IEnumerable<string>>(StringComparer.InvariantCultureIgnoreCase);