Traduction et formattage de l'indication temps plein

pull/449/head
Mael 2019-03-19 17:28:13 +01:00
parent ca39277492
commit d1b69171ae
2 changed files with 32 additions and 15 deletions

View File

@ -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 (
<div
id="indication"
style={{ fontStyle: 'italic', textAlign: 'right', margin: '0.6em 0 0' }}>
Soit {équivalentTempsPlein} bruts par mois en équivalent temps plein
</div>
)
})
}))(
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 (
<div
id="indication"
style={{
fontStyle: 'italic',
textAlign: 'right',
margin: '0.6em 0 0'
}}>
{formattedFigure}{' '}
<T k="indicationTempsPlein">en équivalent temps plein brut</T>
</div>
)
})
)

View File

@ -593,3 +593,5 @@ newsletter:
description2: 'Register to our <1>monthly newsletter</1> by leaving your email:'
S'inscrire: Register
simulationWarning: This is an estimate based on <2>purely theoretical data</2> 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.</5>
indicationTempsPlein: in full-time gross salary equivalent