From b7f4ecc76a1dd751fd579bb92b5aff49780ec27d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 26 Nov 2016 17:27:33 +0100 Subject: remove i18n.parts and switch fully to JSX syntax --- src/popup/popup.tsx | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'src/popup/popup.tsx') diff --git a/src/popup/popup.tsx b/src/popup/popup.tsx index b97a361e9..bd93f54f2 100644 --- a/src/popup/popup.tsx +++ b/src/popup/popup.tsx @@ -336,20 +336,20 @@ function formatHistoryItem(historyItem: HistoryRecord) { switch (historyItem.type) { case "create-reserve": return ( -

- {i18n.parts`Bank requested reserve (${abbrev(d.reservePub)}) for ${prettyAmount( - d.requestedAmount)}.`} -

+ + Bank requested reserve ({abbrev(d.reservePub)}) for {prettyAmount(d.requestedAmount)}. + ); case "confirm-reserve": { // FIXME: eventually remove compat fix let exchange = d.exchangeBaseUrl ? URI(d.exchangeBaseUrl).host() : "??"; - let amount = prettyAmount(d.requestedAmount); let pub = abbrev(d.reservePub); return ( -

- {i18n.parts`Started to withdraw ${amount} from ${exchange} (${pub}).`} -

+ + Started to withdraw + {" "}{prettyAmount(d.requestedAmount)}{" "} + from {exchange} ({pub}). + ); } case "offer-contract": { @@ -357,9 +357,9 @@ function formatHistoryItem(historyItem: HistoryRecord) { let linkElem = {abbrev(d.contractHash)}; let merchantElem = {abbrev(d.merchantName, 15)}; return ( -

- {i18n.parts`Merchant ${merchantElem} offered contract ${linkElem}.`} -

+ + Merchant {abbrev(d.merchantName, 15)} offered contract {abbrev(d.contractHash)}; + ); } case "depleted-reserve": { @@ -367,9 +367,9 @@ function formatHistoryItem(historyItem: HistoryRecord) { let amount = prettyAmount(d.requestedAmount); let pub = abbrev(d.reservePub); return ( -

- {i18n.parts`Withdrew ${amount} from ${exchange} (${pub}).`} -

+ + Withdrew {amount} from {exchange} ({pub}). + ); } case "pay": { @@ -378,12 +378,13 @@ function formatHistoryItem(historyItem: HistoryRecord) { let merchantElem = {abbrev(d.merchantName, 15)}; let fulfillmentLinkElem = view product; return ( -

- {i18n.parts`Paid ${prettyAmount(d.amount)} to merchant ${merchantElem}. (${fulfillmentLinkElem})`} -

); + + Paid {prettyAmount(d.amount)} to merchant {merchantElem}. ({fulfillmentLinkElem}) + + ); } default: - return (

i18n`Unknown event (${historyItem.type})`

); + return (

{i18n`Unknown event (${historyItem.type})`}

); } } @@ -513,8 +514,8 @@ function WalletDebug(props: any) { function openExtensionPage(page: string) { return function() { chrome.tabs.create({ - "url": chrome.extension.getURL(page) - }); + "url": chrome.extension.getURL(page) + }); } } @@ -522,7 +523,7 @@ function openExtensionPage(page: string) { function openTab(page: string) { return function() { chrome.tabs.create({ - "url": page - }); + "url": page + }); } } -- cgit v1.2.3