mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
mysterious casperjs errors....
This commit is contained in:
parent
1afd48bb39
commit
8493b51ec2
7 changed files with 80 additions and 18 deletions
|
@ -1,10 +1,6 @@
|
|||
var AppConstants = require('../constants/AppConstants');
|
||||
var AppDispatcher = require('../dispatcher/AppDispatcher');
|
||||
var LocaleActions = require('../actions/LocaleActions');
|
||||
var LocaleStore = require('../stores/LocaleStore');
|
||||
|
||||
var ActionTypes = AppConstants.ActionTypes;
|
||||
|
||||
describe('LocaleStore', function() {
|
||||
|
||||
it('has default locale', function() {
|
||||
|
|
|
@ -14,6 +14,13 @@ var LocaleActions = {
|
|||
});
|
||||
},
|
||||
|
||||
changeLocaleFromURI: function(newLocale) {
|
||||
AppDispatcher.handleURIAction({
|
||||
type: ActionTypes.CHANGE_LOCALE,
|
||||
locale: newLocale
|
||||
});
|
||||
},
|
||||
|
||||
changeLocaleFromHeader: function(header) {
|
||||
AppDispatcher.handleViewAction({
|
||||
type: ActionTypes.CHANGE_LOCALE_FROM_HEADER,
|
||||
|
|
|
@ -217,7 +217,7 @@ var initDemo = function(sandbox) {
|
|||
}
|
||||
|
||||
if (params.locale !== undefined && params.locale.length) {
|
||||
LocaleActions.changeLocale(params.locale);
|
||||
LocaleActions.changeLocaleFromURI(params.locale);
|
||||
} else {
|
||||
tryLocaleDetect();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue