diff --git a/packages/rocketchat-lib/server/methods/setUsername.coffee b/packages/rocketchat-lib/server/methods/setUsername.coffee index eb209354045..d61cb560f2b 100644 --- a/packages/rocketchat-lib/server/methods/setUsername.coffee +++ b/packages/rocketchat-lib/server/methods/setUsername.coffee @@ -11,12 +11,12 @@ Meteor.methods return username if not /^[0-9a-zA-Z-_.]+$/.test username - throw new Meteor.Error 'username-invalid', TAPi18next.t('project:Username_invalid', username) + throw new Meteor.Error 'username-invalid', t('Username_invalid', username) if not RocketChat.checkUsernameAvailability username - throw new Meteor.Error 'username-unavailable' + throw new Meteor.Error 'username-unavailable', t('Username_unavaliable') unless RocketChat.setUsername user, username throw new Meteor.Error 'could-not-change-username', t('Could_not_change_username') - return username \ No newline at end of file + return username