From 865b9c8664572b2c9f63cb90b0e2a34d6adf322f Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Sat, 28 Apr 2018 12:20:46 +0200 Subject: [PATCH] :alien: Traduit Destinataire --- source/components/rule/Destinataire.js | 17 +++++++++++------ source/locales/en.yaml | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/components/rule/Destinataire.js b/source/components/rule/Destinataire.js index 2697a0a19..8590dea15 100644 --- a/source/components/rule/Destinataire.js +++ b/source/components/rule/Destinataire.js @@ -1,12 +1,16 @@ -import React from 'react' +import React, { Component } from 'react' +import { Trans, translate } from 'react-i18next' import possiblesDestinataires from 'Règles/ressources/destinataires/destinataires.yaml' -export default ({ destinataire }) => - do { - let destinataireData = possiblesDestinataires[destinataire] - destinataire ? ( +@translate() +export default class Rule extends Component { + render() { + let { destinataire } = this.props, + destinataireData = possiblesDestinataires[destinataire] + + return destinataire ? (
-

Destinataire

+

Destinataire

{!destinataireData ? (

Non renseigné

) : ( @@ -30,3 +34,4 @@ export default ({ destinataire }) =>
) : null } +} diff --git a/source/locales/en.yaml b/source/locales/en.yaml index efe77c45e..f2d58f834 100644 --- a/source/locales/en.yaml +++ b/source/locales/en.yaml @@ -72,3 +72,4 @@ envoyer: send Recherche: Search Règle non applicable: Not applicable Situation incomplète: More information needed +Destinataire: Levied by