Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
//
//
// );
// addDecorator(bootstrapWrapperDecorator);
addDecorator(withInfo);
// Option defaults:
setOptions({
name: 'Assembl',
url: '#',
hierarchySeparator: /\//,
hierarchyRootSeparator: /\|/
});
I18n.setTranslations(messages);
I18n.setLocale('fr');
function loadStories() {
require('../js/app/integration/101/components/button101/button101.stories.jsx');
require('../js/app/integration/101/components/checkbox101/checkbox101.stories.jsx');
require('../js/app/integration/101/components/checkboxList101/checkboxList101.stories.jsx');
require('../js/app/stories/components/common/menu/menu.stories.jsx');
require('../js/app/stories/components/debate/common/toggleCommentButton.stories.jsx');
require('../js/app/stories/components/debate/common/replyToCommentButton.stories.jsx');
require('../js/app/stories/components/debate/common/sharePostButton.stories.jsx');
require('../js/app/stories/components/debate/common/commentHelperButton.stories.jsx');
require('../js/app/stories/components/debate/brightMirror/fictionPreview.stories.jsx');
require('../js/app/stories/components/debate/brightMirror/fictionsList.stories.jsx');
require('../js/app/stories/components/debate/brightMirror/instructionsText.stories.jsx');
}).catch((error) => {
I18n.setTranslations(this.props.languageDefault)
this.forceUpdate()
})
}
constructor(props) {
super(props)
I18n.setTranslations({
[this.props.languageDefault]: source_file_translation
})
}
import React from 'react'
import ReactDOM from 'react-dom'
import ReactGA from 'react-ga'
import { I18n } from 'react-i18nify'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import translations from '../assets/translations/translations'
import Home from './containers/Home'
import reducer from './reducer'
import './index.css'
I18n.setTranslations(translations)
I18n.setLocale(
(localStorage.getItem('motada_language') || navigator.language || navigator.userLanguage || 'en').substring(0,2)
)
if(window.location.href.indexOf('localhost') === -1) {
ReactGA.initialize('UA-127688890-1')
ReactGA.pageview(window.location.pathname + window.location.search)
}
ReactDOM.render(
,
document.getElementById('root'),
)
}).catch((error) => {
I18n.setTranslations(this.props.languageDefault)
this.forceUpdate()
})
}
import React from 'react';
import '../polyfills';
import AirstoreUploader from './AirstoreUploader';
import AppState from './AppState';
import { ThemeProvider } from 'styled-components';
import { I18n } from 'react-i18nify';
import * as translations from '../assets/translations';
import theme, { colorSchemes } from '../assets/styles/colorScheme';
I18n.setTranslations(translations);
export default (props) => {
const {
config = {}, opened = false, onClose = () => {}, initialTab = null, onUpload = () => {}, ...otherProps
} = props;
config.colorScheme = config.colorScheme || {};
const colorTheme = config.colorScheme.active;
const colors = colorTheme === 'custom' ?
config.colorScheme[colorTheme] : colorSchemes[colorTheme || 'solarized'];
return (
.then((jsonModule) => {
I18n.setTranslations({
[i18nConvention]: jsonModule,
})
I18n.setLocale(i18nConvention)
this.forceUpdate()
}).catch((error) => {
I18n.setTranslations(this.props.languageDefault)
import React from 'react';
import AirstoreUploader from './AirstoreUploader';
import AppState from './AppState';
import { ThemeProvider } from 'styled-components';
import { I18n } from 'react-i18nify';
import * as translations from '../assets/translations';
import '../assets/fonts/scaleflex-icon-font.css';
import theme, { colorSchemes } from '../assets/styles/colorScheme';
import '../utils/md5';
I18n.setTranslations(translations);
export default (props) => {
const {
config = {}, opened = false, onClose = () => {}, initialTab = null, onUpload = () => {}, ...otherProps
} = props;
config.colorScheme = config.colorScheme || {};
const colorTheme = config.colorScheme.active;
const colors = colorTheme === 'custom' ?
config.colorScheme[colorTheme] : colorSchemes[colorTheme || 'default'];
return (
export const loadLocaleTranslations = (locale: string) => {
const translationFile = require(`./../../../config/locales/${locale}.yml`);
const translations = Object.keys(translationFile).reduce((acc: any, key: string) => {
acc[locale] = translationFile[locale].decidim;
return acc;
}, {});
I18n.setTranslations(translations);
};