Changed (almost) all responses to make them use the new system instead of raw strings

- Fixed many invalid string keys
This commit is contained in:
Kwoth
2021-07-30 22:42:10 +02:00
parent 4484732f5d
commit 919bedeae6
80 changed files with 883 additions and 859 deletions

View File

@@ -24,11 +24,11 @@ namespace NadekoBot.Modules.Administration
if (newVal)
{
await ReplyConfirmLocalizedAsync("adsarm_enable", Prefix).ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.adsarm_enable(Prefix));
}
else
{
await ReplyConfirmLocalizedAsync("adsarm_disable", Prefix).ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.adsarm_disable(Prefix));
}
}
@@ -55,11 +55,11 @@ namespace NadekoBot.Modules.Administration
if (succ)
{
await ReplyConfirmLocalizedAsync("role_added", Format.Bold(role.Name), Format.Bold(group.ToString())).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.role_added(Format.Bold(role.Name), Format.Bold(group.ToString()))).ConfigureAwait(false);
}
else
{
await ReplyErrorLocalizedAsync("role_in_list", Format.Bold(role.Name)).ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.role_in_list(Format.Bold(role.Name))).ConfigureAwait(false);
}
}
@@ -76,11 +76,11 @@ namespace NadekoBot.Modules.Administration
if (set)
{
await ReplyConfirmLocalizedAsync("group_name_added", Format.Bold(group.ToString()), Format.Bold(name.ToString())).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.group_name_added(Format.Bold(group.ToString()), Format.Bold(name.ToString()))).ConfigureAwait(false);
}
else
{
await ReplyConfirmLocalizedAsync("group_name_removed", Format.Bold(group.ToString())).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.group_name_removed(Format.Bold(group.ToString()))).ConfigureAwait(false);
}
}
@@ -96,11 +96,11 @@ namespace NadekoBot.Modules.Administration
bool success = _service.RemoveSar(role.Guild.Id, role.Id);
if (!success)
{
await ReplyErrorLocalizedAsync("self_assign_not").ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.self_assign_not).ConfigureAwait(false);
}
else
{
await ReplyConfirmLocalizedAsync("self_assign_rem", Format.Bold(role.Name)).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.self_assign_rem(Format.Bold(role.Name))).ConfigureAwait(false);
}
}
@@ -171,9 +171,9 @@ namespace NadekoBot.Modules.Administration
{
bool areExclusive = _service.ToggleEsar(ctx.Guild.Id);
if (areExclusive)
await ReplyConfirmLocalizedAsync("self_assign_excl").ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.self_assign_excl).ConfigureAwait(false);
else
await ReplyConfirmLocalizedAsync("self_assign_no_excl").ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.self_assign_no_excl).ConfigureAwait(false);
}
[NadekoCommand, Aliases]
@@ -189,13 +189,13 @@ namespace NadekoBot.Modules.Administration
if (!succ)
{
await ReplyErrorLocalizedAsync("self_assign_not").ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.self_assign_not).ConfigureAwait(false);
return;
}
await ReplyConfirmLocalizedAsync("self_assign_level_req",
await ReplyConfirmLocalizedAsync(strs.self_assign_level_req(
Format.Bold(role.Name),
Format.Bold(level.ToString())).ConfigureAwait(false);
Format.Bold(level.ToString())));
}
[NadekoCommand, Aliases]
@@ -209,23 +209,23 @@ namespace NadekoBot.Modules.Administration
IUserMessage msg;
if (result == SelfAssignedRolesService.AssignResult.Err_Not_Assignable)
{
msg = await ReplyErrorLocalizedAsync("self_assign_not").ConfigureAwait(false);
msg = await ReplyErrorLocalizedAsync(strs.self_assign_not).ConfigureAwait(false);
}
else if (result == SelfAssignedRolesService.AssignResult.Err_Lvl_Req)
{
msg = await ReplyErrorLocalizedAsync("self_assign_not_level", Format.Bold(extra.ToString())).ConfigureAwait(false);
msg = await ReplyErrorLocalizedAsync(strs.self_assign_not_level(Format.Bold(extra.ToString()))).ConfigureAwait(false);
}
else if (result == SelfAssignedRolesService.AssignResult.Err_Already_Have)
{
msg = await ReplyErrorLocalizedAsync("self_assign_already", Format.Bold(role.Name)).ConfigureAwait(false);
msg = await ReplyErrorLocalizedAsync(strs.self_assign_already(Format.Bold(role.Name))).ConfigureAwait(false);
}
else if (result == SelfAssignedRolesService.AssignResult.Err_Not_Perms)
{
msg = await ReplyErrorLocalizedAsync("self_assign_perms").ConfigureAwait(false);
msg = await ReplyErrorLocalizedAsync(strs.self_assign_perms).ConfigureAwait(false);
}
else
{
msg = await ReplyConfirmLocalizedAsync("self_assign_success", Format.Bold(role.Name)).ConfigureAwait(false);
msg = await ReplyConfirmLocalizedAsync(strs.self_assign_success(Format.Bold(role.Name))).ConfigureAwait(false);
}
if (autoDelete)
@@ -246,19 +246,19 @@ namespace NadekoBot.Modules.Administration
IUserMessage msg;
if (result == SelfAssignedRolesService.RemoveResult.Err_Not_Assignable)
{
msg = await ReplyErrorLocalizedAsync("self_assign_not").ConfigureAwait(false);
msg = await ReplyErrorLocalizedAsync(strs.self_assign_not).ConfigureAwait(false);
}
else if (result == SelfAssignedRolesService.RemoveResult.Err_Not_Have)
{
msg = await ReplyErrorLocalizedAsync("self_assign_not_have", Format.Bold(role.Name)).ConfigureAwait(false);
msg = await ReplyErrorLocalizedAsync(strs.self_assign_not_have(Format.Bold(role.Name))).ConfigureAwait(false);
}
else if (result == SelfAssignedRolesService.RemoveResult.Err_Not_Perms)
{
msg = await ReplyErrorLocalizedAsync("self_assign_perms").ConfigureAwait(false);
msg = await ReplyErrorLocalizedAsync(strs.self_assign_perms).ConfigureAwait(false);
}
else
{
msg = await ReplyConfirmLocalizedAsync("self_assign_remove", Format.Bold(role.Name)).ConfigureAwait(false);
msg = await ReplyConfirmLocalizedAsync(strs.self_assign_remove(Format.Bold(role.Name))).ConfigureAwait(false);
}
if (autoDelete)