mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-25 21:24:36 +02:00
Imported all zh_CN dialogs and added locale changing support Issue #42
This commit is contained in:
parent
2617357460
commit
cc5466b038
22 changed files with 1693 additions and 222 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue