diff --git a/source/components/conversation/IndicationSalaireEquivalentTempsPlein.js b/source/components/conversation/IndicationSalaireEquivalentTempsPlein.js index a08aa61a1..d86296db2 100644 --- a/source/components/conversation/IndicationSalaireEquivalentTempsPlein.js +++ b/source/components/conversation/IndicationSalaireEquivalentTempsPlein.js @@ -1,20 +1,35 @@ -import { React } from 'Components' +import { React, T } from 'Components' import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors' import { connect } from 'react-redux' +import withLanguage from 'Components/utils/withLanguage' export default connect(state => ({ analysis: analysisWithDefaultsSelector(state) -}))(({ analysis }) => { - let cache = analysis.cache - let salaire = cache['contrat salarié . salaire . brut de base'], - quotité = cache['contrat salarié . quotité de travail'], - équivalentTempsPlein = Math.round(salaire.nodeValue / quotité.nodeValue) - if (quotité.nodeValue === 1) return null - return ( -
- Soit {équivalentTempsPlein} € bruts par mois en équivalent temps plein -
- ) -}) +}))( + withLanguage(({ language, analysis }) => { + let cache = analysis.cache + let salaire = cache['contrat salarié . salaire . brut de base'], + quotité = cache['contrat salarié . quotité de travail'], + équivalentTempsPlein = salaire.nodeValue / quotité.nodeValue, + formattedFigure = Intl.NumberFormat(language, { + style: 'currency', + currency: 'EUR', + maximumFractionDigits: 0, + minimumFractionDigits: 0 + }).format(équivalentTempsPlein) + + if (quotité.nodeValue === 1) return null + return ( +
+ {formattedFigure}{' '} + en équivalent temps plein brut +
+ ) + }) +) diff --git a/source/locales/en.yaml b/source/locales/en.yaml index 9ec549e64..46448a807 100644 --- a/source/locales/en.yaml +++ b/source/locales/en.yaml @@ -593,3 +593,5 @@ newsletter: description2: 'Register to our <1>monthly newsletter by leaving your email:' S'inscrire: Register simulationWarning: This is an estimate based on <2>purely theoretical data on turnover, charges and the single tax base without children, excluding any other income, which <5>cannot be the responsibility of the social security bodies concerned with regard to the actual declarations and calculations. + +indicationTempsPlein: in full-time gross salary equivalent