From 1f426fa722683c4d1c407d9da5366f6254bbcd1a Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 21 May 2013 17:45:58 +0000 Subject: [PATCH] prefix for link [#462] --- modules/link/config.json | 1 + modules/link/link.js | 4 ++-- modules/link/strings.json | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/link/config.json b/modules/link/config.json index 9c3dc3e..34cc8a0 100644 --- a/modules/link/config.json +++ b/modules/link/config.json @@ -2,5 +2,6 @@ "autoTitle": false, "dependencies": [ "command" ], "ignorable": true, + "outputPrefix": "\u00034link\u000f" "help": "http://github.com/reality/depressionbot/blob/master/modules/link/README.md" } diff --git a/modules/link/link.js b/modules/link/link.js index 2ce7e56..0d686b3 100644 --- a/modules/link/link.js +++ b/modules/link/link.js @@ -53,7 +53,7 @@ var link = function(dbot) { } } this.api.getTitle(link, function(title) { - event.reply(title); + event.reply(dbot.t('link', { 'link': title} )); }); }, @@ -80,7 +80,7 @@ var link = function(dbot) { try { if (response.statusCode == "200") { data = JSON.parse(body); - event.reply(dbot.t("xkcd",data)); + event.reply(dbot.t("xkcd", data)); } else { event.reply(dbot.t("no-hits")); } diff --git a/modules/link/strings.json b/modules/link/strings.json index fcef28f..38d8aba 100644 --- a/modules/link/strings.json +++ b/modules/link/strings.json @@ -11,5 +11,8 @@ "en": "No hits.", "na'vi": "Oel ke tsun rivum ayuoti.", "nl": "Geen resultaten." + }, + "link": { + "en": "{link}" } }