From 34aced8eb82273fefe4caebc9223b45477966b5f Mon Sep 17 00:00:00 2001 From: meriadec Date: Mon, 5 Mar 2018 17:40:10 +0100 Subject: [PATCH] Re-write "since" translations to make it work in FR --- src/components/BalanceSummary/BalanceInfos.js | 4 ++-- static/i18n/en/time.yml | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/BalanceSummary/BalanceInfos.js b/src/components/BalanceSummary/BalanceInfos.js index 78dd2c6c..1435b3c9 100644 --- a/src/components/BalanceSummary/BalanceInfos.js +++ b/src/components/BalanceSummary/BalanceInfos.js @@ -46,7 +46,7 @@ export function BalanceSincePercent(props: BalanceSinceProps) { alwaysShowSign fontSize={7} /> - {t('time:since', { since: t(`time:${since}`) })} + {t(`time:since.${since}`)} ) } @@ -62,7 +62,7 @@ export function BalanceSinceDiff(props: Props) { val={totalBalance - sinceBalance} fontSize={7} /> - {t('time:since', { since: t(`time:${since}`) })} + {t(`time:since.${since}`)} ) } diff --git a/static/i18n/en/time.yml b/static/i18n/en/time.yml index 2cf41275..ce60c898 100644 --- a/static/i18n/en/time.yml +++ b/static/i18n/en/time.yml @@ -3,4 +3,8 @@ week: Week month: Month year: Year -since: since one {{since}} +since: + day: since a day + week: since a week + month: since a month + year: since a year