3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

strings.json for users module

This commit is contained in:
reality 2012-12-29 20:07:14 +00:00
parent a332305a25
commit 824e6fb3ff
2 changed files with 17 additions and 5 deletions

View File

@ -0,0 +1,11 @@
{
"alias": {
"english": "{alias} is an alias of {user}"
},
"unknown_alias": {
"english": "{alias} does not currently exist as an alias."
},
"aliasparentset": {
"english": "{newParent} is now the parent user, and {newAlias} is an alias"
}
}

View File

@ -26,9 +26,10 @@ var users = function(dbot) {
var knownUsers = getServerUsers(event);
var alias = event.params[1].trim();
if(knownUsers.aliases.hasOwnProperty(alias)) {
event.reply(alias + ' is an alias of ' + knownUsers.aliases[alias]);
event.reply(dbot.t('alias', { 'alias': alias,
'user': knownUsers.aliases[alias] }));
} else {
event.reply(alias + ' is not known as an alias to me.');
event.reply(dbot.t('unknown_alias', { 'alias': alias }));
}
},
@ -57,10 +58,10 @@ var users = function(dbot) {
}
}
event.reply(newParent + ' is now the parent user, and ' +
newAlias + ' is an alias.');
event.reply(dbot.t('aliasparentset', { 'newParent': newParent,
'newAlias': newAlias }));
} else {
event.reply('Given new parent does not currently exist as an alias.');
event.reply(dbot.t('unknown_alias', { 'alias': newParent}));
}
}
}