forked from GitHub/dbot
Report module uses strings.json [#88]
This commit is contained in:
parent
168d1335aa
commit
042f6b2236
@ -21,18 +21,21 @@ var report = function(dbot) {
|
||||
}
|
||||
|
||||
for(var i=0;i<ops.length;i++) {
|
||||
dbot.say(event.server, ops[i],
|
||||
'Attention: ' + event.user + ' has reported ' +
|
||||
nick + ' in ' + channelName + '. The reason ' +
|
||||
'given was: "' + reason + '."');
|
||||
dbot.say(event.server, ops[i], dbot.t('report', {
|
||||
'reporter': event.user,
|
||||
'reported': nick,
|
||||
'channel': channelName,
|
||||
'reason': reason
|
||||
}));
|
||||
}
|
||||
|
||||
event.reply('Thank you, ' + nick + ' has been reported the channel administrators.');
|
||||
event.reply(dbot.t('reported', { 'reported': nick }));
|
||||
} else {
|
||||
event.reply('User is not in that channel.');
|
||||
event.reply(dbot.t('user_not_found', { 'reported': nick,
|
||||
'channel': channelName }));
|
||||
}
|
||||
} else {
|
||||
event.reply('I am not in that channel.');
|
||||
event.reply(dbot.t('not_in_channel', { 'channel': channelName }));
|
||||
}
|
||||
}
|
||||
|
||||
|
14
modules/report/strings.json
Normal file
14
modules/report/strings.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"report": {
|
||||
"english": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{reason}.\""
|
||||
},
|
||||
"reported": {
|
||||
"english": "Thank you, {reported} has been reported to the channel administrators."
|
||||
},
|
||||
"user_not_found": {
|
||||
"english": "{reported} does not appear to be in {channel}."
|
||||
},
|
||||
"not_in_channel": {
|
||||
"english": "I am not present in {channel}."
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user