Add translations for cookies/guetzli

This commit is contained in:
runebaas 2019-05-10 22:06:58 +02:00
parent d3038b90a8
commit ba4de946dc
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
2 changed files with 19 additions and 4 deletions

View file

@ -32,16 +32,17 @@ namespace Geekbot.net.Commands.Rpg
{
try
{
var transDict = await _translation.GetDict(Context);
var actor = await GetUser(Context.User.Id);
if (actor.LastPayout.Value.AddHours(24) > DateTimeOffset.Now)
{
await ReplyAsync($"You already got cookies in the last 24 hours, wait until {actor.LastPayout.Value.AddHours(24):HH:mm:ss} for more cookies");
await ReplyAsync(string.Format(transDict["WaitForMoreCookies"], actor.LastPayout.Value.AddHours(24).ToString("HH:mm:ss")));
return;
}
actor.Cookies += 10;
actor.LastPayout = DateTimeOffset.Now;
await SetUser(actor);
await ReplyAsync($"You got 10 cookies, there are now {actor.Cookies} cookies in you cookie jar");
await ReplyAsync(string.Format(transDict["GetCookies"], 10, actor.Cookies));
}
catch (Exception e)
@ -56,9 +57,9 @@ namespace Geekbot.net.Commands.Rpg
{
try
{
var transDict = await _translation.GetDict(Context);
var actor = await GetUser(Context.User.Id);
await ReplyAsync($"There are {actor.Cookies} cookies in you cookie jar");
await ReplyAsync(string.Format(transDict["InYourJar"], actor.Cookies));
}
catch (Exception e)
{

View file

@ -96,5 +96,19 @@
"EN": ":red_circle: {0}, you can't guess the same number again",
"CHDE": ":red_circle: {0}, du chasch nid nomol es gliche rate"
}
},
"cookie": {
"GetCookies": {
"EN": "You got {0} cookies, there are now {1} cookies in you cookie jar",
"CHDE": "Du häsch {0} guetzli becho, du häsch jetzt {1} guetzli ih dr büchse"
},
"WaitForMoreCookies": {
"EN": "You already got cookies in the last 24 hours, wait until {0} for more cookies",
"CHDE": "Du hesch scho guetzli becho ih de letzti 24 stund, wart no bis {0}"
},
"InYourJar": {
"EN": "There are {0} cookies in you cookie jar",
"CHDE": "Es hät {0} guetzli ih dineri büchs"
}
}
}