Generalized Localizer File

This commit is contained in:
Alex Stewart
2019-04-14 00:25:52 -07:00
parent fbd047849c
commit e0c761dfc0
36 changed files with 268 additions and 213 deletions
+4 -2
View File
@@ -10,7 +10,7 @@ public class CommandPollResults extends Command
public CommandPollResults(KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String HelpText() { return Localizer.Stub("Will show current results of a poll and percentages of votes per choice"); }
public String HelpText() { return Localizer.Stub("PollResultsInfo"); }
@Override
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
@@ -24,9 +24,11 @@ public class CommandPollResults extends Command
totalVotes += votes.get(i).votes;
}
results += "The poll was " + guild.poll + "\n";
for(int i = 0; i < votes.size(); i++)
{
results += String.format(Localizer.Stub("%s people voted for %s `%s` with `%s%` !\n "), votes.get(i).votes, votes.get(i).choice, (int)(((double)votes.get(i).votes) / ((double)totalVotes) * 100));
results += String.format(Localizer.Stub("PollResultsResponse"), votes.get(i).votes, votes.get(i).choice, (int)(((double)votes.get(i).votes) / ((double)totalVotes) * 100));
}
res.Call(results);