mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-21 03:05:31 +02:00
[Flux] Locale data flow converted to Flux
This commit is contained in:
parent
b4a6ac3784
commit
1afd48bb39
8 changed files with 45 additions and 69 deletions
|
@ -8,6 +8,7 @@ var assign = require('object-assign');
|
|||
|
||||
var ActionTypes = AppConstants.ActionTypes;
|
||||
var CHANGE_EVENT = 'change';
|
||||
var DEFAULT_LOCALE = 'en_US';
|
||||
|
||||
// resolve the messy mapping between browser language
|
||||
// and our supported locales
|
||||
|
@ -48,9 +49,13 @@ function _getLocaleFromHeader(langString) {
|
|||
return desiredLocale;
|
||||
}
|
||||
|
||||
var _locale = 'en_US';
|
||||
var _locale = DEFAULT_LOCALE;
|
||||
var LocaleStore = assign({}, EventEmitter.prototype, {
|
||||
|
||||
getDefaultLocale: function() {
|
||||
return DEFAULT_LOCALE;
|
||||
},
|
||||
|
||||
getLangLocaleMap: function() {
|
||||
return assign({}, langLocaleMap);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue