diff --git a/src/NadekoBot/Modules/Help/Services/HelpService.cs b/src/NadekoBot/Modules/Help/Services/HelpService.cs index dac5f5c53..25a9b51f3 100644 --- a/src/NadekoBot/Modules/Help/Services/HelpService.cs +++ b/src/NadekoBot/Modules/Help/Services/HelpService.cs @@ -74,7 +74,7 @@ namespace NadekoBot.Modules.Help.Services var reqs = GetCommandRequirements(com, overrides); if(reqs.Any()) { - em.AddField(GetText("requires", guild), string.Join("\n", reqs)); + em.AddField(GetText(strs.requires, guild), string.Join("\n", reqs)); } em @@ -82,7 +82,7 @@ namespace NadekoBot.Modules.Help.Services string.Join("\n", Array.ConvertAll(com.RealRemarksArr(_strings, guild?.Id, prefix), arg => Format.Code(arg))), false) - .WithFooter(GetText("module", guild, com.Module.GetTopLevelModule().Name)) + .WithFooter(GetText(strs.module(com.Module.GetTopLevelModule().Name), guild)) .WithOkColor(); var opt = ((NadekoOptionsAttribute)com.Attributes.FirstOrDefault(x => x is NadekoOptionsAttribute))?.OptionType; @@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Help.Services { var hs = GetCommandOptionHelp(opt); if(!string.IsNullOrWhiteSpace(hs)) - em.AddField(GetText("options", guild), hs, false); + em.AddField(GetText(strs.options, guild), hs, false); } return em; @@ -172,7 +172,7 @@ namespace NadekoBot.Modules.Help.Services .Replace("Guild", "Server", StringComparison.InvariantCulture); } - private string GetText(string text, IGuild guild, params object[] replacements) => - _strings.GetText(text, guild?.Id, replacements); + private string GetText(LocStr str, IGuild guild, params object[] replacements) => + _strings.GetText(str, guild?.Id); } } diff --git a/src/NadekoBot/Modules/Music/Services/MusicService.cs b/src/NadekoBot/Modules/Music/Services/MusicService.cs index 77c22a7f1..1b7afce69 100644 --- a/src/NadekoBot/Modules/Music/Services/MusicService.cs +++ b/src/NadekoBot/Modules/Music/Services/MusicService.cs @@ -305,9 +305,6 @@ namespace NadekoBot.Modules.Music.Services return Array.Empty<(string, string)>(); } - - private string GetText(ulong guildId, string key, params object[] args) - => _strings.GetText(key, guildId, args); private string GetText(ulong guildId, LocStr str) => _strings.GetText(str, guildId); diff --git a/src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs b/src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs index 691cd64c1..d8043df8a 100644 --- a/src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs +++ b/src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs @@ -447,8 +447,8 @@ namespace NadekoBot.Modules.Searches.Services .WithTitle(status.Name) .WithUrl(status.StreamUrl) .WithDescription(status.StreamUrl) - .AddField(GetText(guildId, "status"), status.IsLive ? "🟢 Online" : "🔴 Offline", true) - .AddField(GetText(guildId, "viewers"), status.IsLive ? status.Viewers.ToString() : "-", true); + .AddField(GetText(guildId, strs.status), status.IsLive ? "🟢 Online" : "🔴 Offline", true) + .AddField(GetText(guildId, strs.viewers), status.IsLive ? status.Viewers.ToString() : "-", true); if (status.IsLive) embed = embed.WithOkColor(); @@ -459,7 +459,7 @@ namespace NadekoBot.Modules.Searches.Services embed.WithAuthor(status.Title); if (!string.IsNullOrWhiteSpace(status.Game)) - embed.AddField(GetText(guildId, "streaming"), status.Game, true); + embed.AddField(GetText(guildId, strs.streaming), status.Game, true); if (!string.IsNullOrWhiteSpace(status.AvatarUrl)) embed.WithThumbnailUrl(status.AvatarUrl); @@ -470,8 +470,8 @@ namespace NadekoBot.Modules.Searches.Services return embed; } - private string GetText(ulong guildId, string key, params object[] replacements) - => _strings.GetText(key, guildId, replacements); + private string GetText(ulong guildId, LocStr str) + => _strings.GetText(str, guildId); public bool ToggleStreamOffline(ulong guildId) { diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index a11ecc716..12f646dcc 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -258,7 +258,10 @@ namespace NadekoBot.Modules.Utility .AddField(GetText(strs.uptime), _stats.GetUptimeString("\n"), true) .AddField(GetText(strs.presence), GetText(strs.presence_txt( - _coord.GetGuildCount(), _stats.TextChannels, _stats.VoiceChannels)), true)) + _coord.GetGuildCount(), + _stats.TextChannels, + _stats.VoiceChannels)), + true)) .ConfigureAwait(false); }