Imported all zh_CN dialogs and added locale changing support Issue #42

This commit is contained in:
Peter Cottle 2013-02-23 14:31:40 -08:00
parent 2617357460
commit cc5466b038
22 changed files with 1693 additions and 222 deletions

View file

@ -1,6 +1,8 @@
var _ = require('underscore');
var util = require('../util');
var constants = require('../util/constants');
var Errors = require('../util/errors');
var CommandProcessError = Errors.CommandProcessError;
var GitError = Errors.GitError;
@ -18,6 +20,19 @@ var instantCommands = [
msg: "Directory Changed to '/directories/dont/matter/in/this/demo'"
});
}],
[/^(locale|locale reset)$/, function(bits) {
constants.GLOBAL.locale = util.getDefaultLocale();
throw new CommandResult({
msg: 'Locale reset to default, which is ' + util.getDefaultLocale()
});
}],
[/^locale (\w+)$/, function(bits) {
constants.GLOBAL.locale = bits[1];
throw new CommandResult({
msg: "Locale set to " + bits[1]
});
}],
[/^refresh$/, function() {
var events = require('../app').getEvents();