level builderINTL alware

This commit is contained in:
Peter Cottle 2013-03-02 13:59:41 -08:00
parent e4cf2f6faa
commit 77e7cf9cfc
3 changed files with 30 additions and 12 deletions

View file

@ -190,12 +190,17 @@ var LevelBuilder = Level.extend({
},
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); }
},
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); }
},
@ -252,7 +257,7 @@ var LevelBuilder = Level.extend({
askForHintView.getPromise()
.then(_.bind(this.defineHint, this))
.fail(_.bind(function() {
this.level.hint = '';
this.level.hint = {'en_US': ''};
}, this))
.done(function() {
askForHintDeferred.resolve();
@ -306,7 +311,7 @@ var LevelBuilder = Level.extend({
// the start dialog now is just our help intro thing
delete compiledLevel.startDialog;
if (this.startDialog) {
compiledLevel.startDialog = this.startDialog;
compiledLevel.startDialog = {'en_US': this.startDialog};
}
return compiledLevel;
},