3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 11:42:36 +01:00

wrote strings for polls

This commit is contained in:
Luke Slater 2012-06-15 00:07:15 +01:00
parent d012ff4394
commit 333e3c592d
2 changed files with 25 additions and 4 deletions

View File

@ -10,7 +10,7 @@ var poll = function(dbot) {
event.reply(dbot.t('newpoll_usage')); event.reply(dbot.t('newpoll_usage'));
} else { } else {
if(polls.hasOwnProperty(name)) { if(polls.hasOwnProperty(name)) {
event.reply(dbot.t('poll_exists')); event.reply(dbot.t('poll_exists', {'name': name}));
} else { } else {
polls[name] = { polls[name] = {
'name': name, 'name': name,
@ -24,7 +24,7 @@ var poll = function(dbot) {
polls[name]['votes'][options[i]] = 0; polls[name]['votes'][options[i]] = 0;
} }
event.reply(dbot.t('poll_created', {'name': name, 'options': options.join(' ')})); event.reply(dbot.t('poll_created', {'name': name, 'description': description}));
} }
} }
}, },
@ -46,7 +46,7 @@ var poll = function(dbot) {
} }
} }
} else { } else {
event.reply(dbot.t('poll_unexistent')); event.reply(dbot.t('poll_unexistent', {'name': name}));
} }
}, },
@ -55,7 +55,7 @@ var poll = function(dbot) {
if(polls.hasOwnProperty(name)) { if(polls.hasOwnProperty(name)) {
} else { } else {
event.reply(dbot.t('poll_unexistent')); event.reply(dbot.t('poll_unexistent', {'name': name}));
} }
} }
}; };

View File

@ -195,5 +195,26 @@
}, },
"part": { "part": {
"english": "Left {channel}" "english": "Left {channel}"
},
"newpoll_usage": {
"english": "Usage: ~newpoll name [options=opt1,opt2,opt3] description"
},
"poll_exists": {
"english": "Poll '{name}' already exists."
},
"poll_created": {
"english": "Poll '{name}' created ({description}). Cast thy votations!"
},
"already_voted": {
"english": "You've already voted in this poll!"
},
"voted": {
"english": "Voted for {vote}"
},
"invalid_vote": {
"english": "Invalid vote: {vote}"
},
"poll_unexistent": {
"english": "Poll '{name}' doesn't exist."
} }
} }