diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-27 22:13:24 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-27 22:13:24 +0100 |
commit | d57b6a4bcc595aee990b8e1c63e786e7796b737b (patch) | |
tree | 9d5341a94d5b6f4c337b55617d534f9d0301e9a8 /src/renderHtml.tsx | |
parent | f72af162a00d1d0eb9dced873fd1fbdf4d0975a2 (diff) | |
download | wallet-core-d57b6a4bcc595aee990b8e1c63e786e7796b737b.tar.xz |
modularize i18n
Diffstat (limited to 'src/renderHtml.tsx')
-rw-r--r-- | src/renderHtml.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/renderHtml.tsx b/src/renderHtml.tsx index c858a8842..40b48094e 100644 --- a/src/renderHtml.tsx +++ b/src/renderHtml.tsx @@ -22,6 +22,7 @@ import {AmountJson, Contract, Amounts} from "./types"; +import * as i18n from "src/i18n"; export function prettyAmount(amount: AmountJson) { let v = amount.value + amount.fraction / Amounts.fractionalBase; @@ -34,12 +35,12 @@ export function renderContract(contract: Contract): JSX.Element { return ( <div> - <p> - The merchant {merchantName} - wants to enter a contract over {amount}{" "} + <i18n.Translate wrap="p"> + The merchant <span>{merchantName}</span> + wants to enter a contract over <span>{amount}</span>{" "} with you. - </p> - <p>{i18n`You are about to purchase:`}</p> + </i18n.Translate> + <p>{i18n.str`You are about to purchase:`}</p> <ul> {contract.products.map( (p: any, i: number) => (<li key={i}>{`${p.description}: ${prettyAmount(p.price)}`}</li>)) |