diff --git a/modules/users/strings.json b/modules/users/strings.json new file mode 100644 index 0000000..2a8b876 --- /dev/null +++ b/modules/users/strings.json @@ -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" + } +} diff --git a/modules/users/users.js b/modules/users/users.js index 9190bcd..683fd62 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -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})); } } }