From f4a118db89855681c4b60811f35f987648758316 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Thu, 7 Feb 2013 16:47:05 +0000 Subject: [PATCH] complete module --- modules/rain/rain.js | 4 ++-- modules/rain/strings.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/rain/rain.js b/modules/rain/rain.js index 2b48433..f04c381 100644 --- a/modules/rain/rain.js +++ b/modules/rain/rain.js @@ -11,7 +11,7 @@ var rain = function(dbot) { var apikey = dbot.config.rain.apikey; var place = event.input[1]; if (!place) { var place = "Aberystwyth"; } - var url = "http://api.wunderground.com/api/" + apikey + "/conditions/q/CA/" + place + ".json"; + var url = "http://api.wunderground.com/api/" + apikey + "/conditions/q/" + place + ".json"; request(url, function(error, response, body) { if(response.statusCode == "200") { var data = JSON.parse(body); @@ -27,7 +27,7 @@ var rain = function(dbot) { } else { var score = "e"; } - event.reply(dbot.t("rain-"+score)); + event.reply(dbot.t("rain-"+score,{"place": place})); }); } }; diff --git a/modules/rain/strings.json b/modules/rain/strings.json index 1f04bf8..60904e6 100644 --- a/modules/rain/strings.json +++ b/modules/rain/strings.json @@ -1,12 +1,12 @@ { "rain-0": { - "english" : "It's not raining." + "english" : "It's not raining in {place}." }, "rain-1": { - "english" : "It's raining." + "english" : "It's raining in {place}." }, "rain-2": { - "english" : "It's raining rather a lot." + "english" : "It's raining rather a lot in {place}." }, "rain-3": { "english" : "It's raining shitloads." @@ -15,7 +15,7 @@ "english" : "It's raining fucktons." }, "rain-5": { - "english" : "It's raining whales (in Wales)!" + "english" : "It's raining whales (in {place})!" }, "rain-6": { "english" : "IT'S SO FUCKING WET OUT HERE MAN"