diff --git a/Geekbot.net/Commands/Rpg/Cookies.cs b/Geekbot.net/Commands/Rpg/Cookies.cs index c96d456..f55fa6c 100644 --- a/Geekbot.net/Commands/Rpg/Cookies.cs +++ b/Geekbot.net/Commands/Rpg/Cookies.cs @@ -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) { diff --git a/Geekbot.net/Lib/Localization/Translations.json b/Geekbot.net/Lib/Localization/Translations.json index 2d3414e..41865a1 100644 --- a/Geekbot.net/Lib/Localization/Translations.json +++ b/Geekbot.net/Lib/Localization/Translations.json @@ -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" + } } } \ No newline at end of file