diff --git a/source/components/Explanation.js b/source/components/Explanation.js
index 0ef892c5f..5cb4a008c 100644
--- a/source/components/Explanation.js
+++ b/source/components/Explanation.js
@@ -1,4 +1,5 @@
import React, { Component } from 'react'
+import { Trans } from 'react-i18next'
import ResultsGrid from 'Components/ResultsGrid'
import { salaries } from 'Components/TargetSelection'
import { isEmpty, intersection, head } from 'ramda'
@@ -17,10 +18,12 @@ export default class Explanation extends Component {
{this.renderExplanation(targetRules)}
- Le calcul ne
- prend pas en compte les conventions et accords collectifs, et n'est
- pas opposable à un bulletin de paie. En cas d'écart, vous pouvez en
- discuter avec votre responsable.
+
+
+ Le calcul ne prend pas en compte les conventions et accords collectifs,
+ et n'est pas opposable à un bulletin de paie. En cas d'écart, vous pouvez
+ en discuter avec votre responsable.
+
@@ -32,7 +35,7 @@ export default class Explanation extends Component {
if (targetRules.length > 1)
return (
- Cliquez sur les lignes de résultat ci-dessus pour les comprendre
+ Cliquez sur les lignes de résultat ci-dessus pour les comprendre
)
return
diff --git a/source/components/ResultsGrid.js b/source/components/ResultsGrid.js
index 6d8858c21..e274c3111 100644
--- a/source/components/ResultsGrid.js
+++ b/source/components/ResultsGrid.js
@@ -1,10 +1,13 @@
import {
+ curry,
+ evolve,
path,
propEq,
pathEq,
groupBy,
prop,
map,
+ mapObjIndexed,
sum,
filter,
concat,
@@ -15,6 +18,8 @@ import {
find
} from 'ramda'
import React, { Component } from 'react'
+import { Trans } from 'react-i18next'
+import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { withRouter } from 'react-router'
import { Link } from 'react-router-dom'
@@ -23,7 +28,7 @@ import './Results.css'
import '../engine/mecanismViews/Somme.css'
import { capitalise0, humanFigure } from '../utils'
-import { nameLeaf, encodeRuleName } from 'Engine/rules'
+import { nameLeaf, encodeRuleName, rules, findRuleByDottedName } from 'Engine/rules'
// Filtered variables and rules can't be filtered in a uniform way, for now
let paidBy = payer => item =>
@@ -109,7 +114,7 @@ export default class ResultsGrid extends Component {
id="sommeBase"
>
{humanFigure(2)(brut)}{' '}
- Salaire brut
+ Salaire brut
@@ -137,7 +142,7 @@ export default class ResultsGrid extends Component {
{humanFigure(2)(net)}{' '}
- Salaire net
+ Salaire net
|
>
)}
@@ -147,7 +152,7 @@ export default class ResultsGrid extends Component {
,
{humanFigure(2)(total)}{' '}
- Salaire total
+ Salaire total
|
]}
@@ -159,16 +164,21 @@ export default class ResultsGrid extends Component {
}
class Row extends Component {
+ static contextTypes = {
+ i18n: PropTypes.object.isRequired
+ }
state = {
folded: true
}
render() {
let { branch, values, analysis, relevantSalaries } = this.props,
- detail = byName(values)
+ detail = byName(values),
+ ruleData = mapObjIndexed((v,k,o) => findRuleByDottedName(rules,k), detail),
+ { i18n } = this.context
let title = name => {
- let node = head(detail[name])
- return node.title || capitalise0(node.name)
+ let node = ruleData[name]
+ return node.title || capitalise0(i18n.t(node.name))
}
let aggregateRow = (
@@ -177,8 +187,8 @@ class Row extends Component {
onClick={() => this.setState({ folded: !this.state.folded })}
>
- {capitalise0(branch)}
- {this.state.folded ? 'déplier >' : 'replier'}
+ {capitalise0(i18n.t(branch))}
+ {this.state.folded ? i18n.t('déplier')+' >' : i18n.t('replier')}
|
{this.state.folded ? (
diff --git a/source/locales/en.yaml b/source/locales/en.yaml
index 18fbd60d9..0da949f1d 100644
--- a/source/locales/en.yaml
+++ b/source/locales/en.yaml
@@ -23,3 +23,16 @@ questionsLeft: Fewer than <1>{{nbQuestions}}1> questions to go…
radio_Oui: Yes
radio_Non: No
radio_Aucun: None
+déplier: show more
+replier: show less
+santé: healthcare
+retraite: pensions
+famille: family allowances
+chômage: unemployment
+autre: other
+Salaire brut: Gross salary
+Salaire net: Net salary
+Salaire total: Total salary
+Salaire de base: Base salary
+disclaimer: This estimate takes into account national law but not union negotiated rules, and should not be used as a pay slip. If results differ from a pay slip, we refer you to an accountant or HR expert.
+clickForMore: You can click the results below for detailed explanations.