-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change utils from electron that detects device locale
- Loading branch information
1 parent
4804957
commit 6efae22
Showing
5 changed files
with
20 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
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