mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Second iteration of source generated localized strings
- Strs renamed to strs - Generic params will now default to object instead of string for convenient argument passing - Many strings changed to use generated properties
This commit is contained in:
@@ -45,7 +45,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
|
||||
var ar = new AnimalRace(options, _cs, _gamesConf.Data.RaceAnimals.Shuffle());
|
||||
if (!_service.AnimalRaces.TryAdd(ctx.Guild.Id, ar))
|
||||
return SendErrorAsync(GetText("animal_race"), GetText("animal_race_already_started"));
|
||||
return SendErrorAsync(GetText(strs.animal_race), GetText(strs.animal_race_already_started));
|
||||
|
||||
ar.Initialize();
|
||||
|
||||
@@ -76,13 +76,13 @@ namespace NadekoBot.Modules.Gambling
|
||||
var winner = race.FinishedUsers[0];
|
||||
if (race.FinishedUsers[0].Bet > 0)
|
||||
{
|
||||
return SendConfirmAsync(GetText("animal_race"),
|
||||
return SendConfirmAsync(GetText(strs.animal_race),
|
||||
GetText("animal_race_won_money", Format.Bold(winner.Username),
|
||||
winner.Animal.Icon, (race.FinishedUsers[0].Bet * (race.Users.Count - 1)) + CurrencySign));
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendConfirmAsync(GetText("animal_race"),
|
||||
return SendConfirmAsync(GetText(strs.animal_race),
|
||||
GetText("animal_race_won", Format.Bold(winner.Username), winner.Animal.Icon));
|
||||
}
|
||||
}
|
||||
@@ -93,16 +93,16 @@ namespace NadekoBot.Modules.Gambling
|
||||
ar.OnStarted += Ar_OnStarted;
|
||||
_client.MessageReceived += _client_MessageReceived;
|
||||
|
||||
return SendConfirmAsync(GetText("animal_race"), GetText("animal_race_starting", options.StartTime),
|
||||
return SendConfirmAsync(GetText(strs.animal_race), GetText("animal_race_starting", options.StartTime),
|
||||
footer: GetText("animal_race_join_instr", Prefix));
|
||||
}
|
||||
|
||||
private Task Ar_OnStarted(AnimalRace race)
|
||||
{
|
||||
if (race.Users.Count == race.MaxUsers)
|
||||
return SendConfirmAsync(GetText("animal_race"), GetText("animal_race_full"));
|
||||
return SendConfirmAsync(GetText(strs.animal_race), GetText(strs.animal_race_full));
|
||||
else
|
||||
return SendConfirmAsync(GetText("animal_race"), GetText("animal_race_starting_with_x", race.Users.Count));
|
||||
return SendConfirmAsync(GetText(strs.animal_race), GetText("animal_race_starting_with_x", race.Users.Count));
|
||||
}
|
||||
|
||||
private async Task Ar_OnStateUpdate(AnimalRace race)
|
||||
@@ -123,7 +123,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
.ConfigureAwait(false);
|
||||
else
|
||||
await msg.ModifyAsync(x => x.Embed = _eb.Create()
|
||||
.WithTitle(GetText("animal_race"))
|
||||
.WithTitle(GetText(strs.animal_race))
|
||||
.WithDescription(text)
|
||||
.WithOkColor()
|
||||
.Build())
|
||||
@@ -171,7 +171,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
}
|
||||
catch (AnimalRaceFullException)
|
||||
{
|
||||
await SendConfirmAsync(GetText("animal_race"), GetText("animal_race_full"))
|
||||
await SendConfirmAsync(GetText(strs.animal_race), GetText(strs.animal_race_full))
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
catch (NotEnoughFundsException)
|
||||
|
Reference in New Issue
Block a user