コード例 #1
0
ファイル: EntityDetails.js プロジェクト: mathjazz/pontoon
const mapStateToProps = (state: Object): Props => {
    return {
        activeTranslation: selectors.getTranslationForSelectedEntity(state),
        editor: state[editor.NAME],
        history: state[history.NAME],
        isReadOnlyEditor: selectors.isReadOnlyEditor(state),
        isTranslator: user.selectors.isTranslator(state),
        locale: locales.selectors.getCurrentLocaleData(state),
        machinery: state[machinery.NAME],
        nextEntity: entitieslist.selectors.getNextEntity(state),
        previousEntity: entitieslist.selectors.getPreviousEntity(state),
        otherlocales: state[otherlocales.NAME],
        orderedOtherLocales: otherlocales.selectors.getOrderedOtherLocales(state),
        preferredLocalesCount: otherlocales.selectors.getPreferredLocalesCount(state),
        parameters: navigation.selectors.getNavigationParams(state),
        pluralForm: plural.selectors.getPluralForm(state),
        router: state.router,
        selectedEntity: entitieslist.selectors.getSelectedEntity(state),
        user: state[user.NAME],
    };
};
コード例 #2
0
ファイル: PluralSelector.js プロジェクト: mathjazz/pontoon
const mapStateToProps = (state: Object): Props => {
    return {
        pluralForm: selectors.getPluralForm(state),
        locale: locales.selectors.getCurrentLocaleData(state),
    };
};