Skip to content

Commit

Permalink
Use localized tab names on Home screen (#8784)
Browse files Browse the repository at this point in the history
The tab names on the Home screen are now localized messages, rather
than being hard-coded as English.
  • Loading branch information
Gudahtt authored Jun 11, 2020
1 parent 71e7966 commit 058c63c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@
"asset": {
"message": "Asset"
},
"assets": {
"message": "Assets"
},
"attemptingConnect": {
"message": "Attempting to connect to blockchain."
},
Expand Down
5 changes: 3 additions & 2 deletions ui/app/pages/home/home.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export default class Home extends PureComponent {
}

render () {
const { t } = this.context
const {
defaultHomeActiveTabName,
onTabClick,
Expand Down Expand Up @@ -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')}
>
<AssetList
onClickAsset={(asset) => history.push(`${ASSET_ROUTE}/${asset}`)}
Expand All @@ -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')}
>
<TransactionList />
</Tab>
Expand Down

0 comments on commit 058c63c

Please sign in to comment.