wip strings rework, experimenting, nothing works

This commit is contained in:
Kwoth
2021-07-25 19:25:48 +02:00
parent 70288f7670
commit 9d375dccee
53 changed files with 211 additions and 187 deletions

View File

@@ -138,7 +138,7 @@ namespace NadekoBot.Modules.Xp
var embed = _eb.Create()
.WithOkColor()
.WithTitle($"{club.ToString()}")
.WithDescription(GetText("level_x", lvl.Level) + $" ({club.Xp} xp)")
.WithDescription(GetText(strs.level_x, lvl.Level) + $" ({club.Xp} xp)")
.AddField(GetText(strs.desc), string.IsNullOrWhiteSpace(club.Description) ? "-" : club.Description,
false)
.AddField(GetText(strs.owner), club.Owner.ToString(), true)
@@ -188,7 +188,7 @@ namespace NadekoBot.Modules.Xp
.Select(x => x.ToString()));
return _eb.Create()
.WithTitle(GetText("club_bans_for", club.ToString()))
.WithTitle(GetText(strs.club_bans_for, club.ToString()))
.WithDescription(toShow)
.WithOkColor();
}, bans.Length, 10);
@@ -219,7 +219,7 @@ namespace NadekoBot.Modules.Xp
.Select(x => x.ToString()));
return _eb.Create()
.WithTitle(GetText("club_apps_for", club.ToString()))
.WithTitle(GetText(strs.club_apps_for, club.ToString()))
.WithDescription(toShow)
.WithOkColor();
}, apps.Length, 10);
@@ -374,7 +374,7 @@ namespace NadekoBot.Modules.Xp
var clubs = _service.GetClubLeaderboardPage(page);
var embed = _eb.Create()
.WithTitle(GetText("club_leaderboard", page + 1))
.WithTitle(GetText(strs.club_leaderboard, page + 1))
.WithOkColor();
var i = page * 9;

View File

@@ -264,14 +264,14 @@ namespace NadekoBot.Modules.Xp.Services
{
var chan = await x.User.GetOrCreateDMChannelAsync();
if (chan != null)
await chan.SendConfirmAsync(_eb, _strings.GetText("level_up_dm",
await chan.SendConfirmAsync(_eb, _strings.GetText(strs.level_up_dm,
x.Guild.Id,
x.User.Mention, Format.Bold(x.Level.ToString()),
Format.Bold(x.Guild.ToString() ?? "-")));
}
else if (x.MessageChannel != null) // channel
{
await x.MessageChannel.SendConfirmAsync(_eb, _strings.GetText("level_up_channel",
await x.MessageChannel.SendConfirmAsync(_eb, _strings.GetText(strs.level_up_channel,
x.Guild.Id,
x.User.Mention, Format.Bold(x.Level.ToString())));
}
@@ -288,7 +288,7 @@ namespace NadekoBot.Modules.Xp.Services
chan = x.MessageChannel;
}
await chan.SendConfirmAsync(_eb, _strings.GetText("level_up_global",
await chan.SendConfirmAsync(_eb, _strings.GetText(strs.level_up_global,
x.Guild.Id,
x.User.Mention, Format.Bold(x.Level.ToString())));
}

View File

@@ -72,13 +72,13 @@ namespace NadekoBot.Modules.Xp
var str = ctx.Guild.GetRole(x.RoleId)?.ToString();
if (str is null)
str = GetText("role_not_found", Format.Code(x.RoleId.ToString()));
str = GetText(strs.role_not_found, Format.Code(x.RoleId.ToString()));
else
{
if (!x.Remove)
str = GetText("xp_receive_role", Format.Bold(str));
str = GetText(strs.xp_receive_role, Format.Bold(str));
else
str = GetText("xp_lose_role", Format.Bold(str));
str = GetText(strs.xp_lose_role, Format.Bold(str));
}
return (x.Level, Text: sign + str);
})
@@ -105,7 +105,7 @@ namespace NadekoBot.Modules.Xp
foreach (var reward in localRewards)
{
embed.AddField(GetText("level_x", reward.Key),
embed.AddField(GetText(strs.level_x, reward.Key),
string.Join("\n", reward.Select(y => y.Item2)));
}
@@ -364,7 +364,7 @@ namespace NadekoBot.Modules.Xp
embed.AddField(
$"#{(i + 1 + curPage * 9)} {(user?.ToString() ?? users[i].UserId.ToString())}",
$"{GetText("level_x", levelStats.Level)} - {levelStats.TotalXp}xp {awardStr}");
$"{GetText(strs.level_x, levelStats.Level)} - {levelStats.TotalXp}xp {awardStr}");
}
return embed;
}
@@ -392,7 +392,7 @@ namespace NadekoBot.Modules.Xp
var user = users[i];
embed.AddField(
$"#{i + 1 + page * 9} {(user.ToString())}",
$"{GetText("level_x", new LevelStats(users[i].TotalXp).Level)} - {users[i].TotalXp}xp");
$"{GetText(strs.level_x, new LevelStats(users[i].TotalXp).Level)} - {users[i].TotalXp}xp");
}
}