3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

Complete strings.json usage in admin module [#88]

This commit is contained in:
reality 2012-12-30 16:41:10 +00:00
parent 042f6b2236
commit 49c7e045af
2 changed files with 9 additions and 3 deletions

View File

@ -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] === "@") {

View File

@ -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}"
}
}