mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-21 13:49:00 +02:00
Merge pull request #38 from Josso/patch-1
Added pluralization to NextLevelConfirm
This commit is contained in:
commit
a794ee43a3
1 changed files with 4 additions and 2 deletions
|
@ -426,11 +426,13 @@ var NextLevelConfirm = ConfirmCancelTerminal.extend({
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var nextLevelName = (options.nextLevel) ? options.nextLevel.name : '';
|
var nextLevelName = (options.nextLevel) ? options.nextLevel.name : '';
|
||||||
|
var pluralNumCommands = (options.numCommands == 1) ? '' : 's';
|
||||||
|
var pluralBest = (options.best == 1) ? '' : 's';
|
||||||
|
|
||||||
var markdowns = [
|
var markdowns = [
|
||||||
'## Great Job!!',
|
'## Great Job!!',
|
||||||
'',
|
'',
|
||||||
'You solved the level in **' + options.numCommands + '** command(s); ',
|
'You solved the level in **' + options.numCommands + '** command' + pluralNumCommands + '; ',
|
||||||
'our solution uses ' + options.best + '. '
|
'our solution uses ' + options.best + '. '
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -440,7 +442,7 @@ var NextLevelConfirm = ConfirmCancelTerminal.extend({
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
markdowns.push(
|
markdowns.push(
|
||||||
'See if you can whittle it down to ' + options.best + ' command(s) :D '
|
'See if you can whittle it down to ' + options.best + ' command' + pluralBest + ' :D '
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue