Skip to content

Commit

Permalink
[ux] Completed unifing grammatical person across all messaging. Fixed…
Browse files Browse the repository at this point in the history
… many small inconsistencies in message formatting.
  • Loading branch information
Marak committed Aug 31, 2012
1 parent 2b980eb commit e1fe1bc
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 67 deletions.
6 changes: 3 additions & 3 deletions lib/jitsu.js
Expand Up @@ -293,15 +293,15 @@ jitsu.showError = function (command, err, shallow, skip) {
if (err.result.result && err.result.result.error) {
if (err.result.result.error.stderr || err.result.result.error.stdout) {
jitsu.log.error('');
jitsu.log.error('There was an error while attempting to start your application.');
jitsu.log.error('There was an error while attempting to start the app');
jitsu.log.error(err.result.result.error.message);
if (err.result.result.error.blame) {
jitsu.log.error(err.result.result.error.blame.message);
jitsu.log.error('');
jitsu.log.error('This type of error is usually a ' + err.result.result.error.blame.type + ' error.');
}

jitsu.log.error('Error output from your application:');
jitsu.log.error('Error output from app:');
jitsu.log.error('');
if (err.result.result.error.stdout) {
err.result.result.error.stdout.split('\n').forEach(function (line) {
Expand All @@ -316,7 +316,7 @@ jitsu.showError = function (command, err, shallow, skip) {
}
}
else if (err.result.result.error.stack) {
jitsu.log.error('There was an error while attempting to deploy your application.');
jitsu.log.error('There was an error while attempting to deploy the app');
jitsu.log.error('');
jitsu.log.error(err.result.result.error.message);

Expand Down
8 changes: 4 additions & 4 deletions lib/jitsu/commands.js
Expand Up @@ -11,15 +11,15 @@ jitsu.use(require('flatiron-cli-users'), {
before: {
login: function (details) {
if (!details || !details.username) {
jitsu.log.warn('You will need to login to continue');
jitsu.log.info('To login, you will need an activated nodejitsu account');
jitsu.log.help('You can create an account using the ' + 'jitsu signup'.magenta + ' command');
jitsu.log.warn('Login is required to continue');
jitsu.log.info('To login, an activated nodejitsu account is required');
jitsu.log.help('To create a new account use the ' + 'jitsu signup'.magenta + ' command');
}
}
},
after: {
create: function (details) {
jitsu.log.help('You must check the email we sent to ' + details.email.grey + ' for further activation instructions.');
jitsu.log.help('Please check for an email sent to ' + details.email.grey + ' for further activation instructions.');
}
}
});
10 changes: 5 additions & 5 deletions lib/jitsu/commands/apps.js
Expand Up @@ -11,7 +11,7 @@ var analyzer = require('require-analyzer'),
var apps = exports;

apps.usage = [
'`jitsu apps *` commands allow you to work with your',
'The `jitsu apps` command manages',
'Applications on Nodejitsu. Valid commands are:',
'',
'jitsu apps deploy',
Expand Down Expand Up @@ -42,8 +42,8 @@ apps.deploy = function (callback) {
var dir = process.cwd(), pkg;

function promptLogin () {
jitsu.log.warn("You are not logged in.");
jitsu.log.warn("Please authenticate first.");
jitsu.log.warn("No user is logged in");
jitsu.log.warn("Please authenticate");
jitsu.commands.users.login(function(){
jitsu.commands.apps.deploy(callback);
});
Expand Down Expand Up @@ -389,7 +389,7 @@ apps.view = function (name, callback) {
getAppName(function (err, pkg) {
if(err) {
jitsu.commands.list(function(){
jitsu.log.info('Which ' + 'app'.magenta + ' do you want to view?');
jitsu.log.info('Which ' + 'app'.magenta + ' to view?');
jitsu.prompt.get(["app name"], function (err, result) {
if (err) {
jitsu.log.error('Prompt error:');
Expand Down Expand Up @@ -448,7 +448,7 @@ apps.update = function (name, callback) {

var diff = jitsu.common.objectDiff(app, pkg);
if (!diff) {
jitsu.log.warn('No changes found to your package.json for ' + name.magenta);
jitsu.log.warn('No changes found in package.json for ' + name.magenta);
return callback();
}

Expand Down
18 changes: 9 additions & 9 deletions lib/jitsu/commands/databases.js
Expand Up @@ -10,7 +10,7 @@ var jitsu = require('../../jitsu');
var databases = exports;

databases.usage = [
'`jitsu databases *` commands allow you to work with the database api',
'The `jitsu databases` commands manages databases',
'',
'jitsu databases create <database type> <database name>',
'jitsu databases list',
Expand Down Expand Up @@ -107,7 +107,7 @@ databases.create = function (requestedDatabaseType, requestedDatabaseName, callb

if (!database.name || !database.type) {
if (!database.name) {
jitsu.log.warn('Database name is required');
jitsu.log.error('Database name is required');
getProperties.push({
name: 'database name',
default: database.type
Expand Down Expand Up @@ -145,9 +145,9 @@ databases.create.usage = [

databases.get = function (databaseName, callback) {
if (!databaseName) {
jitsu.log.warn('You need to pass a database name');
jitsu.log.warn('Database name required');
jitsu.log.warn('jitsu databases get <database name>');
jitsu.log.warn('If you want to get a list of all the databases run:');
jitsu.log.warn('To list all the databases run:');
jitsu.log.warn('jitsu databases list');
return callback();
}
Expand Down Expand Up @@ -187,7 +187,7 @@ databases.list = function (callback) {
});

if (results.length === 0) {
jitsu.log.info('You have no databases.');
jitsu.log.info('No databases found');
}
}
callback();
Expand All @@ -202,18 +202,18 @@ databases.list.usage = [

databases.destroy = function (databaseName, callback) {
if (!databaseName) {
jitsu.log.error('You need to pass a database name');
jitsu.log.warn('Database name is required');
jitsu.log.error('jitsu databases destroy <database name>');
return callback();
}

jitsu.databases.destroy(databaseName, function (err) {
if (err) {
jitsu.log.error('Database could not be destroyed.');
jitsu.log.error('Database could not be destroyed');
jitsu.log.error(require('util').inspect(err.result.error));
}
else {
jitsu.log.info('Database was deleted.');
jitsu.log.info('Database was deleted');
}
callback();
});
Expand Down Expand Up @@ -285,7 +285,7 @@ var printDbHelp = function (database) {
'',
' $ curl ' + connUrl,
'',
'Connect with the `' + 'futon'.magenta + '` web app (' + 'open in your browser'.cyan + '):',
'Connect with the `' + 'futon'.magenta + '` web app (' + 'open in a web browser'.cyan + '):',
'',
' ' + connUrl + '/_utils',
'',
Expand Down
6 changes: 3 additions & 3 deletions lib/jitsu/commands/env.js
Expand Up @@ -10,8 +10,8 @@ var jitsu = require('../../jitsu');
var env = exports;

env.usage = [
'`jitsu env *` commands allow you to set local environment',
'variables for your application. Valid commands are:',
'`jitsu env *` commands enable management of environment',
'variables for the app. Valid commands are:',
'',
'jitsu env list',
'jitsu env list <app>',
Expand All @@ -34,7 +34,7 @@ env.set = function (appName, key, value, callback) {
if (value === null) {
if (key === null) {
jitsu.log.error(
'You must specify both an environment variable name and value.'
'Environment variable name and value and both required'
);
return callback({});
}
Expand Down
11 changes: 5 additions & 6 deletions lib/jitsu/commands/install.js
Expand Up @@ -134,8 +134,7 @@ module.exports = function (requestedApp, callback) {
function promptforAppName(cb) {

jitsu.log.help('The ' + 'install'.magenta + ' command downloads pre-built node apps');
jitsu.log.help('To continue, you will need to select an app');
jitsu.log.info('Please choose a node app so we can get you started');
jitsu.log.info('Please select a node app to get started');
jitsu.log.info('Available node apps:');
Object.keys(nodeapps).forEach(function (starter) {
jitsu.log.info(starter.magenta + ' ' + nodeapps[starter].description);
Expand Down Expand Up @@ -179,7 +178,7 @@ module.exports = function (requestedApp, callback) {

jitsu.log.info('Attempting to configure app based on ' + './config/schema.json'.grey )
jitsu.log.help('Prompting for ' + app.name.magenta + ' configuration data');
jitsu.log.help('You can hit ' + '[ENTER]'.grey + ' to specify default values');
jitsu.log.help('Press ' + '[ENTER]'.grey + ' to specify default values');

wizard.cli.run(schema, function (err, config) {

Expand Down Expand Up @@ -239,14 +238,14 @@ module.exports = function (requestedApp, callback) {
}

function deployApp(cb) {
jitsu.log.info('Jitsu will now help you create your package.json');
jitsu.log.info('Jitsu will now help create a package.json');
return jitsu.package.create(process.cwd(), function (err, result) {
if (err) {
return cb(err);
}

jitsu.log.info('Your app has been created successfully. Deploying!');
jitsu.log.info('You can run additional deployments using `jitsu deploy`');
jitsu.log.info('The app has been created successfully. Deploying!');
jitsu.log.info('Run additional deployments using `jitsu deploy`');
return jitsu.plugins.cli.executeCommand(['deploy'],callback);
});
}
Expand Down
6 changes: 3 additions & 3 deletions lib/jitsu/commands/logs.js
Expand Up @@ -10,8 +10,8 @@ var dateformat = require('dateformat');
var logs = exports;

logs.usage = [
'The `jitsu logs` commands allow you to read the logs related to your app.',
'The default number of lines to show is 10.',
'The `jitsu logs` command will display logs related to the app',
'The default number of lines to show is 10',
'',
'Example usages:',
'jitsu logs all',
Expand Down Expand Up @@ -108,7 +108,7 @@ logs.app = function (appName, amount, callback) {
getAppName(function (err, name) {
if (err) {
jitsu.commands.list(function(){
jitsu.log.info('Which application do you want to view ' + 'logs'.magenta + ' for?');
jitsu.log.info('Which application to view ' + 'logs'.magenta + ' for?');
jitsu.prompt.get(["app name"], function (err, result) {
if (err) {
jitsu.log.error('Prompt error:');
Expand Down
4 changes: 2 additions & 2 deletions lib/jitsu/commands/package.js
Expand Up @@ -10,8 +10,8 @@ var jitsu = require('../../jitsu');
var package = exports;

package.usage = [
'`jitsu package *` commands allow you to work with the tarballs',
'that are automatically created by jitsu',
'The `jitsu package` command manages the tarballs',
'which are automatically created by jitsu',
'Valid commands are: ',
'',
'jitsu package create',
Expand Down
8 changes: 4 additions & 4 deletions lib/jitsu/commands/snapshots.js
Expand Up @@ -13,9 +13,9 @@ var fs = require('fs'),
var snapshots = exports;

snapshots.usage = [
'`jitsu snapshots *` commands allow you to work with snapshots',
'for your Applications on Nodejitsu. Snapshots are images of your',
'Application\'s code that are deployed to the Nodejitsu Platform.',
'The `jitsu snapshots` command manages snapshots',
'for apps on Nodejitsu. Snapshots are images of the',
'apps\'s code that is deployed to the Nodejitsu Platform.',
'Valid commands are: ',
'',
'jitsu snapshots create',
Expand Down Expand Up @@ -98,7 +98,7 @@ snapshots.list = function (name, callback) {
if (err) {
jitsu.log.warn('App name is required to list snapshots')
jitsu.commands.list(function(){
jitsu.log.info('Which app do you want to view ' + 'snapshots'.magenta + ' for?');
jitsu.log.info('Which app to view ' + 'snapshots'.magenta + ' for?');
jitsu.prompt.get(["app name"], function (err, result) {
if (err) {
jitsu.log.error('Prompt error:');
Expand Down
14 changes: 7 additions & 7 deletions lib/jitsu/commands/users.js
Expand Up @@ -57,7 +57,7 @@ users.confirm = function (username, inviteCode, callback) {
if (err) {
if (tries >= 3) {
jitsu.log.error('Three failed login attempts');
jitsu.log.info('Would you like to reset your password?');
jitsu.log.info('Reset the password?');
return offerReset(username);
}
return setupAuth();
Expand Down Expand Up @@ -94,9 +94,9 @@ users.confirm = function (username, inviteCode, callback) {
if (!response.hasPassword) {
(function getNewPass() {

jitsu.log.help('Now that your account is confirmed, you will need to set a password.');
jitsu.log.help('In the future, you can also reset your password by running the' + ' jitsu users forgot'.magenta + ' command');
jitsu.log.help('Set your new password below');
jitsu.log.help('Now that the account is confirmed, a password is required');
jitsu.log.help('In the future, the password can be reset by running the' + ' jitsu users forgot'.magenta + ' command');
jitsu.log.help('Set the new password below');

jitsu.prompt.get(['set password', 'confirm password'], function (err, results) {
if (err) {
Expand Down Expand Up @@ -124,7 +124,7 @@ users.confirm = function (username, inviteCode, callback) {
}
else {
jitsu.log.info('User ' + username.magenta + ' confirmed');
jitsu.log.info('Would you like to log in now?');
jitsu.log.info('Log in now?');
jitsu.prompt.get(['login'], function (err, result) {
if (err) {
return callback(err);
Expand Down Expand Up @@ -158,8 +158,8 @@ users.confirm = function (username, inviteCode, callback) {
// Usage for `jitsu users confirm`.
//
users.confirm.usage = [
'Confirms the Nodejitsu user account for the specified username.',
'You will be prompted to supply a valid invite code for the account.',
'Confirms a Nodejitsu user account',
'Will prompt for a valid invite code for the account',
'',
'jitsu users confirm <username> <invitecode>'
];
4 changes: 2 additions & 2 deletions lib/jitsu/common/index.js
Expand Up @@ -182,9 +182,9 @@ common.checkVersion = function (callback) {
var pkg = JSON.parse(body);

if (semver.gt(pkg.version, jitsu.version)) {
jitsu.log.warn('A newer version of ' + 'jitsu'.magenta + ' is available. ' + 'You should update immediately.');
jitsu.log.warn('A newer version of ' + 'jitsu'.magenta + ' is available. ' + 'please update immediately');
jitsu.log.help('To install the latest ' + 'jitsu'.magenta + ' type `[sudo] npm install jitsu -g`');
jitsu.log.warn('If you wish to ' + 'continue'.bold + ' without an update you must ' + 'type'.cyan + ' ' + '\'yes\''.magenta);
jitsu.log.warn('To ' + 'continue'.bold + ' without an update ' + 'type'.cyan + ' ' + '\'yes\''.magenta);

jitsu.prompt.get({
message: 'Continue without updating? Bad things might happen (no)',
Expand Down
8 changes: 4 additions & 4 deletions lib/jitsu/config.js
Expand Up @@ -40,8 +40,8 @@ catch (err) {
console.log('Error parsing ' + jitsu.config.stores.file.file.magenta);
console.log(err.message);
console.log('');
console.log('This is most likely not an error in jitsu.');
console.log('Please check your jitsuconf and try again.');
console.log('This is most likely not an error in jitsu');
console.log('Please check the .jitsuconf file and try again');
console.log('');
process.exit(1);
}
Expand Down Expand Up @@ -99,8 +99,8 @@ jitsu.use(require('flatiron-cli-config'), {
configFile = jitsu.config.stores.file.file;

var display = [
' here is your ' + configFile.grey + ' file:',
'If you\'d like to change a property try:',
' here is the ' + configFile.grey + ' file:',
'To change a property type:',
'jitsu config set <key> <value>',
];

Expand Down

0 comments on commit e1fe1bc

Please sign in to comment.