mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
mysterious error with process require
This commit is contained in:
parent
811b9c1b0e
commit
b4a6ac3784
4 changed files with 9 additions and 5 deletions
|
@ -23,6 +23,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"backbone": "~0.9.9",
|
||||
"events": "^1.0.2",
|
||||
"flux": "^2.0.1",
|
||||
"jquery": "~1.7.3",
|
||||
"markdown": "~0.4.0",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
//var LocaleStore = require('../../js/stores/LocaleStore');
|
||||
var CasperUtils = require('./casperUtils').CasperUtils;
|
||||
|
||||
var intl = require('../../js/intl/index.js');
|
||||
|
@ -28,11 +29,11 @@ casper.start(
|
|||
);
|
||||
|
||||
this.test.assertEvalEquals(function(lang) {
|
||||
debug_App_changeLocaleFromHeaders(lang);
|
||||
return debug_Intl_getLocale();
|
||||
debug_LocaleActions_changeLocaleFromHeader(lang);
|
||||
return debug_LocaleStore_getLocale();
|
||||
},
|
||||
locale,
|
||||
'Testing changing the locale from ' + lang +
|
||||
'Testing changing store locale from ' + lang +
|
||||
' to ' + locale,
|
||||
{ lang: lang }
|
||||
);
|
||||
|
|
|
@ -44,7 +44,7 @@ var init = function() {
|
|||
wait: true
|
||||
});
|
||||
|
||||
LocaleStore.subscribe('change', intlRefresh);
|
||||
LocaleStore.subscribe(intlRefresh);
|
||||
events.on('localeChanged', intlRefresh);
|
||||
events.on('vcsModeChange', vcsModeRefresh);
|
||||
|
||||
|
@ -68,6 +68,7 @@ var vcsModeRefresh = function(eventData) {
|
|||
};
|
||||
|
||||
var intlRefresh = function() {
|
||||
console.log('refreshing inlt');
|
||||
if (!window.$) { return; }
|
||||
$('span.intl-aware').each(function(i, el) {
|
||||
var intl = require('../intl');
|
||||
|
@ -253,7 +254,7 @@ function tryLocaleDetect() {
|
|||
}
|
||||
|
||||
function changeLocaleFromHeaders(langString) {
|
||||
LocaleActions.changeLocaleFromHeaders(langString);
|
||||
LocaleActions.changeLocaleFromHeader(langString);
|
||||
GlobalState.locale = LocaleStore.getLocale();
|
||||
events.trigger('localeChanged');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ var toGlobalize = {
|
|||
Visuals: require('../visuals'),
|
||||
Git: require('../git'),
|
||||
CommandModel: require('../models/commandModel'),
|
||||
LocaleActions: require('../actions/LocaleActions'),
|
||||
LocaleStore: require('../stores/LocaleStore'),
|
||||
Levels: require('../graph/treeCompare'),
|
||||
Constants: require('../util/constants'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue