Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var _reducer = require('./reducer');
Object.defineProperty(exports, 'i18nReducer', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_reducer).default;
}
});
exports.syncTranslationWithStore = syncTranslationWithStore;
var _reactI18nify = require('react-i18nify');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.I18n = _reactI18nify.I18n;
exports.Translate = _reactI18nify.Translate;
exports.Localize = _reactI18nify.Localize;
function syncTranslationWithStore(store) {
_reactI18nify.I18n.setTranslationsGetter(function () {
try {
return store.getState().i18n.translations;
} catch (e) {
console.error('Error getting translations from store!');
}
});
_reactI18nify.I18n.setLocaleGetter(function () {
try {
return store.getState().i18n.locale;
} catch (e) {
console.error('Error getting locale from store!');
}
});