mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
level builderINTL alware
This commit is contained in:
parent
e4cf2f6faa
commit
77e7cf9cfc
3 changed files with 30 additions and 12 deletions
|
@ -14246,12 +14246,17 @@ var LevelBuilder = Level.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
defineName: function(command, deferred) {
|
defineName: function(command, deferred) {
|
||||||
this.level.name = prompt(intl.str('prompt-name'));
|
this.level.name = {
|
||||||
|
'en_US': prompt(intl.str('prompt-name'))
|
||||||
|
};
|
||||||
|
|
||||||
if (command) { command.finishWith(deferred); }
|
if (command) { command.finishWith(deferred); }
|
||||||
},
|
},
|
||||||
|
|
||||||
defineHint: function(command, deferred) {
|
defineHint: function(command, deferred) {
|
||||||
this.level.hint = prompt(intl.str('prompt-hint'));
|
this.level.hint = {
|
||||||
|
'en_US': prompt(intl.str('prompt-hint'))
|
||||||
|
};
|
||||||
if (command) { command.finishWith(deferred); }
|
if (command) { command.finishWith(deferred); }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -14308,7 +14313,7 @@ var LevelBuilder = Level.extend({
|
||||||
askForHintView.getPromise()
|
askForHintView.getPromise()
|
||||||
.then(_.bind(this.defineHint, this))
|
.then(_.bind(this.defineHint, this))
|
||||||
.fail(_.bind(function() {
|
.fail(_.bind(function() {
|
||||||
this.level.hint = '';
|
this.level.hint = {'en_US': ''};
|
||||||
}, this))
|
}, this))
|
||||||
.done(function() {
|
.done(function() {
|
||||||
askForHintDeferred.resolve();
|
askForHintDeferred.resolve();
|
||||||
|
@ -14362,7 +14367,7 @@ var LevelBuilder = Level.extend({
|
||||||
// the start dialog now is just our help intro thing
|
// the start dialog now is just our help intro thing
|
||||||
delete compiledLevel.startDialog;
|
delete compiledLevel.startDialog;
|
||||||
if (this.startDialog) {
|
if (this.startDialog) {
|
||||||
compiledLevel.startDialog = this.startDialog;
|
compiledLevel.startDialog = {'en_US': this.startDialog};
|
||||||
}
|
}
|
||||||
return compiledLevel;
|
return compiledLevel;
|
||||||
},
|
},
|
||||||
|
@ -14952,6 +14957,7 @@ var Q = require('q');
|
||||||
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
||||||
|
|
||||||
var util = require('../util');
|
var util = require('../util');
|
||||||
|
var intl = require('../intl');
|
||||||
var KeyboardListener = require('../util/keyboard').KeyboardListener;
|
var KeyboardListener = require('../util/keyboard').KeyboardListener;
|
||||||
|
|
||||||
var Views = require('../views');
|
var Views = require('../views');
|
||||||
|
@ -23894,12 +23900,17 @@ var LevelBuilder = Level.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
defineName: function(command, deferred) {
|
defineName: function(command, deferred) {
|
||||||
this.level.name = prompt(intl.str('prompt-name'));
|
this.level.name = {
|
||||||
|
'en_US': prompt(intl.str('prompt-name'))
|
||||||
|
};
|
||||||
|
|
||||||
if (command) { command.finishWith(deferred); }
|
if (command) { command.finishWith(deferred); }
|
||||||
},
|
},
|
||||||
|
|
||||||
defineHint: function(command, deferred) {
|
defineHint: function(command, deferred) {
|
||||||
this.level.hint = prompt(intl.str('prompt-hint'));
|
this.level.hint = {
|
||||||
|
'en_US': prompt(intl.str('prompt-hint'))
|
||||||
|
};
|
||||||
if (command) { command.finishWith(deferred); }
|
if (command) { command.finishWith(deferred); }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -23956,7 +23967,7 @@ var LevelBuilder = Level.extend({
|
||||||
askForHintView.getPromise()
|
askForHintView.getPromise()
|
||||||
.then(_.bind(this.defineHint, this))
|
.then(_.bind(this.defineHint, this))
|
||||||
.fail(_.bind(function() {
|
.fail(_.bind(function() {
|
||||||
this.level.hint = '';
|
this.level.hint = {'en_US': ''};
|
||||||
}, this))
|
}, this))
|
||||||
.done(function() {
|
.done(function() {
|
||||||
askForHintDeferred.resolve();
|
askForHintDeferred.resolve();
|
||||||
|
@ -24010,7 +24021,7 @@ var LevelBuilder = Level.extend({
|
||||||
// the start dialog now is just our help intro thing
|
// the start dialog now is just our help intro thing
|
||||||
delete compiledLevel.startDialog;
|
delete compiledLevel.startDialog;
|
||||||
if (this.startDialog) {
|
if (this.startDialog) {
|
||||||
compiledLevel.startDialog = this.startDialog;
|
compiledLevel.startDialog = {'en_US': this.startDialog};
|
||||||
}
|
}
|
||||||
return compiledLevel;
|
return compiledLevel;
|
||||||
},
|
},
|
||||||
|
@ -26050,6 +26061,7 @@ var Q = require('q');
|
||||||
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
||||||
|
|
||||||
var util = require('../util');
|
var util = require('../util');
|
||||||
|
var intl = require('../intl');
|
||||||
var KeyboardListener = require('../util/keyboard').KeyboardListener;
|
var KeyboardListener = require('../util/keyboard').KeyboardListener;
|
||||||
|
|
||||||
var Views = require('../views');
|
var Views = require('../views');
|
||||||
|
|
|
@ -190,12 +190,17 @@ var LevelBuilder = Level.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
defineName: function(command, deferred) {
|
defineName: function(command, deferred) {
|
||||||
this.level.name = prompt(intl.str('prompt-name'));
|
this.level.name = {
|
||||||
|
'en_US': prompt(intl.str('prompt-name'))
|
||||||
|
};
|
||||||
|
|
||||||
if (command) { command.finishWith(deferred); }
|
if (command) { command.finishWith(deferred); }
|
||||||
},
|
},
|
||||||
|
|
||||||
defineHint: function(command, deferred) {
|
defineHint: function(command, deferred) {
|
||||||
this.level.hint = prompt(intl.str('prompt-hint'));
|
this.level.hint = {
|
||||||
|
'en_US': prompt(intl.str('prompt-hint'))
|
||||||
|
};
|
||||||
if (command) { command.finishWith(deferred); }
|
if (command) { command.finishWith(deferred); }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -252,7 +257,7 @@ var LevelBuilder = Level.extend({
|
||||||
askForHintView.getPromise()
|
askForHintView.getPromise()
|
||||||
.then(_.bind(this.defineHint, this))
|
.then(_.bind(this.defineHint, this))
|
||||||
.fail(_.bind(function() {
|
.fail(_.bind(function() {
|
||||||
this.level.hint = '';
|
this.level.hint = {'en_US': ''};
|
||||||
}, this))
|
}, this))
|
||||||
.done(function() {
|
.done(function() {
|
||||||
askForHintDeferred.resolve();
|
askForHintDeferred.resolve();
|
||||||
|
@ -306,7 +311,7 @@ var LevelBuilder = Level.extend({
|
||||||
// the start dialog now is just our help intro thing
|
// the start dialog now is just our help intro thing
|
||||||
delete compiledLevel.startDialog;
|
delete compiledLevel.startDialog;
|
||||||
if (this.startDialog) {
|
if (this.startDialog) {
|
||||||
compiledLevel.startDialog = this.startDialog;
|
compiledLevel.startDialog = {'en_US': this.startDialog};
|
||||||
}
|
}
|
||||||
return compiledLevel;
|
return compiledLevel;
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,7 @@ var Q = require('q');
|
||||||
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
|
||||||
|
|
||||||
var util = require('../util');
|
var util = require('../util');
|
||||||
|
var intl = require('../intl');
|
||||||
var KeyboardListener = require('../util/keyboard').KeyboardListener;
|
var KeyboardListener = require('../util/keyboard').KeyboardListener;
|
||||||
|
|
||||||
var Views = require('../views');
|
var Views = require('../views');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue