-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8511 from LedgerHQ/fix/LIVE-15090-earn-label-for-…
…non-uk LIVE-15090: change utils from electron that detects device locale
- Loading branch information
Showing
6 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"ledger-live-desktop": minor | ||
--- | ||
|
||
Changed the Electron util that detects the locale for swapping Yield-Earn labels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
apps/ledger-live-desktop/src/renderer/hooks/useGetStakeLabelLocaleBased.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { getSystemLocale } from "~/helpers/systemLocale"; | ||
import { getParsedSystemDeviceLocale } from "~/helpers/systemLocale"; | ||
|
||
export const useGetStakeLabelLocaleBased = () => { | ||
const locale = getSystemLocale(); | ||
const { region } = getParsedSystemDeviceLocale(); | ||
const { t } = useTranslation(); | ||
return locale === "en-GB" ? t("accounts.contextMenu.yield") : t("accounts.contextMenu.earn"); | ||
|
||
return region === "GB" ? t("accounts.contextMenu.yield") : t("accounts.contextMenu.earn"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters