🐛 Correction suite au rebase redesign sur traduction

pull/206/head
Mael 2018-04-12 18:25:30 +02:00 committed by Laurent Bossavit
parent 9f7f07f17f
commit 51d271265a
6 changed files with 19 additions and 20 deletions

View File

@ -8,10 +8,10 @@ import './Explanation.css'
import { pluck } from 'ramda'
import { connect } from 'react-redux'
@translate()
import SearchButton from './SearchButton'
import withColours from './withColours'
@translate()
@withColours
@connect(state => ({
analysis: state.analysis
@ -27,8 +27,7 @@ export default class Explanation extends Component {
className="scrollIndication down"
style={{
color: this.props.colours.textColourOnWhite
}}
>
}}>
<i className="fa fa-long-arrow-down" aria-hidden="true" /> Comprendre
mes résultats
</h3>

View File

@ -87,7 +87,8 @@ export default class ResultsGrid extends Component {
situationGate,
targetNames,
inversions,
flatRules
flatRules,
parsedRules
} = this.props,
rules = flatRules

View File

@ -71,7 +71,7 @@ export default class TargetSelection extends Component {
renderOutputList() {
let popularTargets = popularTargetNames.map(
curry(findRuleByName)(flatRules)
curry(findRuleByName)(this.props.flatRules)
),
{
missingVariablesByTarget,

View File

@ -95,7 +95,7 @@ export var FormDecorator = formType => RenderField =>
// color: this.props.themeColours.textColourOnWhite,
maxWidth: wideQuestion ? '95%' : ''
}}>
{inversionQ ? i18n.t(inversionQ) : this.props.question}
{this.props.question}
</h1>
)
return (

View File

@ -5,7 +5,7 @@ import HoverDecorator from '../HoverDecorator'
import Explicable from './Explicable'
import { Field, formValueSelector } from 'redux-form'
import './InversionInput.css'
import { Input } from './Input'
import Input from './Input'
import { connect } from 'react-redux'
import { path, last } from 'ramda'
import { change } from 'redux-form'
@ -63,8 +63,7 @@ class Fields extends Component {
className={classNames({
selected: value === activeInversion,
unselected: activeInversion && value !== activeInversion
})}
>
})}>
<Field
name={'inversions.' + dottedName}
component="input"

View File

@ -14,14 +14,12 @@ import { Redirect } from 'react-router-dom'
import Highlighter from 'react-highlight-words'
import { pick } from 'ramda'
@connect(
state => ({
flatRules: state.flatRules
})
)
@connect(state => ({
flatRules: state.flatRules
}))
export default class RulesList extends Component {
render() {
let { flatRules } = this.props;
let { flatRules } = this.props
return (
<div id="RulesList" className="page">
<h1>Explorez notre base de règles</h1>
@ -34,8 +32,8 @@ export default class RulesList extends Component {
@translate()
export class SearchBar extends React.Component {
static contextTypes = {
i18n: PropTypes.object.isRequired
}
i18n: PropTypes.object.isRequired
}
componentDidMount() {
this.inputElement.focus()
}
@ -89,9 +87,9 @@ export class SearchBar extends React.Component {
)
filterOptions = (options, filter) => this.fuse.search(filter)
render() {
let { rules, finish = () => null } = this.props,
let { rules, finish = () => null } = this.props,
{ i18n } = this.context,
{ selectedOption } = this.state,
{ selectedOption } = this.state
if (selectedOption != null) {
this.props.finally && this.props.finally()
@ -111,7 +109,9 @@ export class SearchBar extends React.Component {
filterOptions={this.filterOptions}
optionRenderer={this.renderOption}
placeholder={i18n.t('Entrez des mots clefs ici')}
noResultsText={i18n.t("noresults",{defaultValue:"Nous n'avons rien trouvé…"})}
noResultsText={i18n.t('noresults', {
defaultValue: "Nous n'avons rien trouvé…"
})}
ref={el => {
this.inputElement = el
}}