From 49c7e045afdf7f6b9ce107be5a833c19658a063c Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 30 Dec 2012 16:41:10 +0000 Subject: [PATCH] Complete strings.json usage in admin module [#88] --- modules/admin/admin.js | 6 +++--- modules/admin/strings.json | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/admin/admin.js b/modules/admin/admin.js index d51474b..a230c9f 100644 --- a/modules/admin/admin.js +++ b/modules/admin/admin.js @@ -13,7 +13,7 @@ var admin = function(dbot) { 'join': function(event) { var channel = event.params[1]; if(event.allChannels.hasOwnProperty(channel)) { - event.reply("I'm already in that channel."); + event.reply(dbot.t('already_in_channel', {'channel': channel})); } else { dbot.instance.join(event, channel); event.reply(dbot.t('join', {'channel': channel})); @@ -24,7 +24,7 @@ var admin = function(dbot) { 'part': function(event) { var channel = event.params[1]; if(!event.allChannels.hasOwnProperty(channel)) { - event.reply("I'm not in that channel."); + event.reply(dbot.t('not_in_channel', {'channel': channel})); } else { event.instance.part(event, channel); event.reply(dbot.t('part', {'channel': channel})); @@ -57,7 +57,7 @@ var admin = function(dbot) { event.reply(dbot.t('reload')); }, - // Say something in a channel (TODO probably doesn't work.) + // Say something in a channel 'say': function(event) { var channel = event.params[1]; if(event.params[1] === "@") { diff --git a/modules/admin/strings.json b/modules/admin/strings.json index 8ecacd0..1ca3ed4 100644 --- a/modules/admin/strings.json +++ b/modules/admin/strings.json @@ -64,5 +64,11 @@ "spanish": "Cerrado la categoría: {category}", "na'vi": "{category}ìri oel 'upxareti fmoli", "welsh": "Categori wedi cloi: {category}" + }, + "already_in_channel": { + "english": "I'm already in {channel}" + }, + "not_in_channel": { + "english": "I'm not in {channel}" } }