👽 Nombre de composantes en texte humain traduit

pull/400/head
Mael 2018-10-12 09:56:46 +00:00
parent bd97129210
commit 4f0d919bb9
2 changed files with 33 additions and 3 deletions

View File

@ -4,16 +4,19 @@ import { makeJsx } from '../evaluation'
import './Composantes.css'
import { Trans } from 'react-i18next'
import { toPairs } from 'ramda'
import writtenNumbers from '../../locales/writtenNumbers.yaml'
import withLanguage from 'Components/utils/withLanguage'
export default function Variations(nodeValue, explanation) {
return (
let Comp = withLanguage(({ language }) => (
<Node
classes="mecanism composantes"
value={nodeValue}
child={
<>
<p>
Cette règle est la somme de deux{' '}
Cette règle est la somme de{' '}
{writtenNumbers[language][explanation.length]}{' '}
<InlineMecanism name="composantes" /> :
</p>
<ol>
@ -38,5 +41,6 @@ export default function Variations(nodeValue, explanation) {
</>
}
/>
)
))
return <Comp />
}

View File

@ -0,0 +1,26 @@
en:
- zero
- one
- two
- three
- four
- five
- six
- seven
- eight
- nine
- ten
fr:
- zéro
- un
- deux
- trois
- quatre
- cinq
- six
- sept
- huit
- neuf
- dix