diff --git a/src/NadekoBot/Services/Impl/NadekoStrings.cs b/src/NadekoBot/Services/Impl/NadekoStrings.cs index 66aff02b..ef5725bf 100644 --- a/src/NadekoBot/Services/Impl/NadekoStrings.cs +++ b/src/NadekoBot/Services/Impl/NadekoStrings.cs @@ -47,29 +47,30 @@ namespace NadekoBot.Services string.Join(",", responseStrings.Keys), sw.Elapsed.TotalSeconds); - var compareTo = responseStrings["en-us"] - .Select(x => { - return (StringKey: x.Key,Placeholders: formatFinder.Matches(x.Value).Cast().Select(y => y.Value).ToArray()); - }) - .ToDictionary(x => x.StringKey, x => x.Placeholders); + //improper string format checks + //var compareTo = responseStrings["en-us"] + // .Select(x => { + // return (StringKey: x.Key,Placeholders: formatFinder.Matches(x.Value).Cast().Select(y => y.Value).ToArray()); + // }) + // .ToDictionary(x => x.StringKey, x => x.Placeholders); - var errors = responseStrings - .Select(a => (a.Key, a.Value.Select(x => - { - if (!compareTo.ContainsKey(x.Key)) - return (StringKey: x.Key, Placeholders: new HashSet(), Missing: true); - var hs = new HashSet(compareTo[x.Key]); - hs.SymmetricExceptWith(formatFinder.Matches(x.Value).Cast().Select(y => y.Value).ToArray()); - return (StringKey: x.Key, Placeholders: hs, Missing: false); - }) - .Where(x => x.Placeholders.Any() || x.Missing))) - .Where(x => x.Item2.Any()); + //var errors = responseStrings + // .Select(a => (a.Key, a.Value.Select(x => + // { + // if (!compareTo.ContainsKey(x.Key)) + // return (StringKey: x.Key, Placeholders: new HashSet(), Missing: true); + // var hs = new HashSet(compareTo[x.Key]); + // hs.SymmetricExceptWith(formatFinder.Matches(x.Value).Cast().Select(y => y.Value).ToArray()); + // return (StringKey: x.Key, Placeholders: hs, Missing: false); + // }) + // .Where(x => x.Placeholders.Any() || x.Missing))) + // .Where(x => x.Item2.Any()); - var str = string.Join("\n", errors.Select(x => $"------{x.Item1}------\n" + - string.Join("\n", x.Item2.Select(y => - y.StringKey + ": " + (y.Missing ? "MISSING" : string.Join(", ", y.Placeholders)))))); - if(!string.IsNullOrWhiteSpace(str)) - _log.Warn($"Improperly Formatted strings:\n{str}"); + //var str = string.Join("\n", errors.Select(x => $"------{x.Item1}------\n" + + // string.Join("\n", x.Item2.Select(y => + // y.StringKey + ": " + (y.Missing ? "MISSING" : string.Join(", ", y.Placeholders)))))); + //if(!string.IsNullOrWhiteSpace(str)) + // _log.Warn($"Improperly Formatted strings:\n{str}"); } private string GetLocaleName(string fileName)