Skip to content

Commit

Permalink
Merge pull request #5200 from LedgerHQ/bugfix/placeholder-text-when-c…
Browse files Browse the repository at this point in the history
…hanging-device-language-from-Settings

🐛 [BUGFIX] : Fix Placeholder for language in changeLanguagePrompt
  • Loading branch information
sshmaxime authored Oct 26, 2023
2 parents 3dc4937 + e72ed60 commit 63657e5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-windows-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Fix placeholder text when changing device language from Settings
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ const ChangeDeviceLanguagePromptDrawer: React.FC<Props> = ({
[onError, analyticsContext],
);

const getTextToDisplay = (key: "description" | "title") =>
t(`deviceLocalization.changeDeviceLanguagePrompt.${key}`, {
deviceName,
language: t(
`deviceLocalization.languages.${Languages[currentLanguage].deviceSupport?.label}`,
),
});

return (
<Flex
flexDirection="column"
Expand Down Expand Up @@ -107,15 +115,8 @@ const ChangeDeviceLanguagePromptDrawer: React.FC<Props> = ({
});
setInstallingLanguage(true);
}}
titleWording={t("deviceLocalization.changeDeviceLanguagePrompt.title", {
language: t(
`deviceLocalization.languages.${Languages[currentLanguage].deviceSupport?.label}`,
),
deviceName,
})}
descriptionWording={t("deviceLocalization.changeDeviceLanguagePrompt.description", {
deviceName,
})}
titleWording={getTextToDisplay("title")}
descriptionWording={getTextToDisplay("description")}
/>
)}
</Flex>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 63657e5

Please sign in to comment.