From 058c63cf80b11b20e375adbf9aa3ef51a7e66325 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 11 Jun 2020 15:19:13 -0300 Subject: [PATCH] Use localized tab names on Home screen (#8784) The tab names on the Home screen are now localized messages, rather than being hard-coded as English. --- app/_locales/en/messages.json | 3 +++ ui/app/pages/home/home.component.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 86238554a..b5a61c18e 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -242,6 +242,9 @@ "asset": { "message": "Asset" }, + "assets": { + "message": "Assets" + }, "attemptingConnect": { "message": "Attempting to connect to blockchain." }, diff --git a/ui/app/pages/home/home.component.js b/ui/app/pages/home/home.component.js index b8ddaa539..81e583985 100644 --- a/ui/app/pages/home/home.component.js +++ b/ui/app/pages/home/home.component.js @@ -204,6 +204,7 @@ export default class Home extends PureComponent { } render () { + const { t } = this.context const { defaultHomeActiveTabName, onTabClick, @@ -237,7 +238,7 @@ export default class Home extends PureComponent { activeClassName="home__tab--active" className="home__tab" data-testid="home__asset-tab" - name="Assets" + name={t('assets')} > history.push(`${ASSET_ROUTE}/${asset}`)} @@ -247,7 +248,7 @@ export default class Home extends PureComponent { activeClassName="home__tab--active" className="home__tab" data-testid="home__history-tab" - name="History" + name={t('history')} >