mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
WIP: rework of localized strings, instead of generic LocStr, LocStr is now a struct which contains both the key, and the values which should be put into the value's placeholders. strs' properties are now methods which take values as arguments, and properties if they don't
This commit is contained in:
@@ -117,7 +117,7 @@ namespace NadekoBot.Modules.Utility
|
||||
return _eb.Create().WithOkColor().WithDescription(GetText(strs.no_user_on_this_page));
|
||||
|
||||
return _eb.Create().WithOkColor()
|
||||
.WithTitle(GetText(strs.inrole_list, Format.Bold(role?.Name ?? "No Role")) + $" - {roleUsers.Length}")
|
||||
.WithTitle(GetText(strs.inrole_list(Format.Bold(role?.Name ?? "No Role")) + $" - {roleUsers.Length}"))
|
||||
.WithDescription(string.Join("\n", pageUsers));
|
||||
}, roleUsers.Length, 20).ConfigureAwait(false);
|
||||
}
|
||||
@@ -199,7 +199,7 @@ namespace NadekoBot.Modules.Utility
|
||||
else
|
||||
{
|
||||
|
||||
await SendConfirmAsync(GetText(strs.roles_page, page, Format.Bold(target.ToString())),
|
||||
await SendConfirmAsync(GetText(strs.roles_page(page, Format.Bold(target.ToString()))),
|
||||
"\n• " + string.Join("\n• ", (IEnumerable<IRole>)roles).SanitizeMentions(true)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ namespace NadekoBot.Modules.Utility
|
||||
}
|
||||
else
|
||||
{
|
||||
await SendConfirmAsync(GetText(strs.roles_all_page, page),
|
||||
await SendConfirmAsync(GetText(strs.roles_all_page(page)),
|
||||
"\n• " + string.Join("\n• ", (IEnumerable<IRole>)roles).SanitizeMentions(true)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
@@ -269,7 +269,7 @@ namespace NadekoBot.Modules.Utility
|
||||
{
|
||||
var tags = ctx.Message.Tags.Where(t => t.Type == TagType.Emoji).Select(t => (Emote)t.Value);
|
||||
|
||||
var result = string.Join("\n", tags.Select(m => GetText(strs.showemojis, m, m.Url)));
|
||||
var result = string.Join("\n", tags.Select(m => GetText(strs.showemojis(m, m.Url))));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(result))
|
||||
await ReplyErrorLocalizedAsync("showemojis_none").ConfigureAwait(false);
|
||||
@@ -298,7 +298,7 @@ namespace NadekoBot.Modules.Utility
|
||||
.WithOkColor();
|
||||
foreach (var guild in guilds)
|
||||
embed.AddField(guild.Name,
|
||||
GetText(strs.listservers, guild.Id, guild.MemberCount, guild.OwnerId),
|
||||
GetText(strs.listservers(guild.Id, guild.MemberCount, guild.OwnerId)),
|
||||
false);
|
||||
|
||||
await ctx.Channel.EmbedAsync(embed);
|
||||
|
Reference in New Issue
Block a user