Skip to content

Commit

Permalink
fix(discover): Add support for translates (#4261)
Browse files Browse the repository at this point in the history
  • Loading branch information
ComradeAERGO authored Aug 8, 2023
1 parent cbb8a42 commit 13bb4b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/moody-ants-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Adding translates support for discover v2 manifests
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import { PropsRaw } from "./types";
import { useCard } from "./hooks";
import { Container, Subtitle } from "./Layout";
import { useTranslation } from "react-i18next";
import { useSelector } from "react-redux";
import { languageSelector } from "~/renderer/reducers/settings";

export function FullCard(props: PropsRaw) {
const language = useSelector(languageSelector);
const { t } = useTranslation();
const { hostname, disabled, onClick } = useCard(props);
const { manifest } = props;
Expand Down Expand Up @@ -44,7 +47,7 @@ export function FullCard(props: PropsRaw) {
</Flex>

<Text fontSize={13} color="opacityDefault.c70">
{manifest.content.description.en}
{manifest.content.description[language] ?? manifest.content.description.en}
</Text>
</Container>
);
Expand Down

0 comments on commit 13bb4b1

Please sign in to comment.