Skip to content

Commit

Permalink
only consider 1 result for the "single" verbage (#170)
Browse files Browse the repository at this point in the history
English is hard… 0 uses the "multiple" verbage. We want:

  0 domains
  1 domain
  2 domains
  3 domains
  …etc.
  • Loading branch information
TooTallNate authored and OlliV committed Oct 20, 2016
1 parent 139a449 commit 3f78172
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/now-alias
Expand Up @@ -147,7 +147,7 @@ async function run (token) {
})), { align: ['l', 'r', 'l', 'l'], hsep: ' '.repeat(2), stringLength: strlen });

const elapsed_ = ms(new Date() - start_);
console.log(`> ${aliases.length} alias${aliases.length > 1 ? 'es' : ''} found ${chalk.gray(`[${elapsed_}]`)}`);
console.log(`> ${aliases.length} alias${aliases.length !== 1 ? 'es' : ''} found ${chalk.gray(`[${elapsed_}]`)}`);
if (text) console.log('\n' + text + '\n');
break;

Expand Down
2 changes: 1 addition & 1 deletion bin/now-certs
Expand Up @@ -112,7 +112,7 @@ async function run (token) {
}
const list = await certs.ls();
const elapsed = ms(new Date() - start);
console.log(`> ${list.length} certificate${list.length > 1 ? 's' : ''} found ${chalk.gray(`[${elapsed}]`)}`);
console.log(`> ${list.length} certificate${list.length !== 1 ? 's' : ''} found ${chalk.gray(`[${elapsed}]`)}`);

if (0 < list.length) {
const cur = Date.now();
Expand Down
4 changes: 2 additions & 2 deletions bin/now-domains
Expand Up @@ -143,7 +143,7 @@ async function run (token) {
})), { align: ['l', 'r', 'l', 'l', 'l'], hsep: ' '.repeat(2), stringLength: strlen });

const elapsed_ = ms(new Date() - start_);
console.log(`> ${domains.length} domain${domains.length > 1 ? 's' : ''} found ${chalk.gray(`[${elapsed_}]`)}`);
console.log(`> ${domains.length} domain${domains.length !== 1 ? 's' : ''} found ${chalk.gray(`[${elapsed_}]`)}`);
if (out) console.log('\n' + out + '\n');
break;

Expand Down Expand Up @@ -232,7 +232,7 @@ async function readConfirmation (domain, _domain, list) {
process.stdout.write(' ' + tbl + '\n');
if (_domain.aliases.length) {
process.stdout.write(`> ${chalk.yellow('Warning!')} This domain's `
+ `${chalk.bold(_domain.aliases.length + ' alias' + (_domain.aliases.length > 1 ? 'es': ''))} `
+ `${chalk.bold(_domain.aliases.length + ' alias' + (_domain.aliases.length !== 1 ? 'es': ''))} `
+ `will be removed. Run ${chalk.dim('`now alias ls`')} to list.\n`);
}
process.stdout.write(` ${chalk.bold.red('> Are you sure?')} ${chalk.gray('[yN] ')}`);
Expand Down
2 changes: 1 addition & 1 deletion bin/now-secrets
Expand Up @@ -111,7 +111,7 @@ async function run (token) {
}
const list = await secrets.ls();
const elapsed = ms(new Date() - start);
console.log(`> ${list.length} secret${list.length > 1 ? 's' : ''} found ${chalk.gray(`[${elapsed}]`)}`);
console.log(`> ${list.length} secret${list.length !== 1 ? 's' : ''} found ${chalk.gray(`[${elapsed}]`)}`);
if (0 < list.length) {
const cur = Date.now();
const header = [['', 'id', 'name', 'created'].map(s => chalk.dim(s))];
Expand Down

0 comments on commit 3f78172

Please sign in to comment.