mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-30 17:54:28 +02:00
Basic dialog intl support for level dialogs, Issue #42
This commit is contained in:
parent
2837315c7d
commit
2617357460
21 changed files with 1716 additions and 1388 deletions
|
@ -1,10 +1,19 @@
|
|||
var _ = require('underscore');
|
||||
var constants = require('../util/constants');
|
||||
|
||||
exports.isBrowser = function() {
|
||||
var inBrowser = String(typeof window) !== 'undefined';
|
||||
return inBrowser;
|
||||
};
|
||||
|
||||
exports.getLocale = function() {
|
||||
if (constants.GLOBAL.locale) {
|
||||
return constants.GLOBAL.locale;
|
||||
}
|
||||
console.warn('No locale found...');
|
||||
return 'en';
|
||||
};
|
||||
|
||||
exports.splitTextCommand = function(value, func, context) {
|
||||
func = _.bind(func, context);
|
||||
_.each(value.split(';'), function(command, index) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue