Browse Source

only consider 1 result for the "single" verbage (#170)

English is hard… 0 uses the "multiple" verbage. We want:

  0 domains
  1 domain
  2 domains
  3 domains
  …etc.
master
Nathan Rajlich 8 years ago
committed by Olli Vanhoja
parent
commit
3f78172428
  1. 2
      bin/now-alias
  2. 2
      bin/now-certs
  3. 4
      bin/now-domains
  4. 2
      bin/now-secrets

2
bin/now-alias

@ -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;

2
bin/now-certs

@ -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();

4
bin/now-domains

@ -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;
@ -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] ')}`);

2
bin/now-secrets

@ -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))];

Loading…
Cancel
Save