From d05c95ff9ac19e852d7d35e59da6f25d555675cc Mon Sep 17 00:00:00 2001 From: adammino-ledger Date: Mon, 18 Nov 2024 17:02:30 +0000 Subject: [PATCH] change all labels from stake to yield, earn --- .../src/renderer/components/MainSideBar/index.tsx | 4 +++- .../src/renderer/screens/dashboard/FeaturedButtons.tsx | 5 +++-- apps/ledger-live-desktop/static/i18n/en/app.json | 2 +- .../src/components/TabBar/TransferDrawer.tsx | 4 +++- apps/ledger-live-mobile/src/locales/en/common.json | 2 +- .../src/screens/Portfolio/PortfolioQuickActionsBar.tsx | 4 +++- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/ledger-live-desktop/src/renderer/components/MainSideBar/index.tsx b/apps/ledger-live-desktop/src/renderer/components/MainSideBar/index.tsx index c8a0d0745c4a..96eb19fecd91 100644 --- a/apps/ledger-live-desktop/src/renderer/components/MainSideBar/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/MainSideBar/index.tsx @@ -35,6 +35,7 @@ import TopGradient from "./TopGradient"; import Hide from "./Hide"; import { track } from "~/renderer/analytics/segment"; import { useAccountPath } from "@ledgerhq/live-common/hooks/recoverFeatureFlag"; +import { useGetStakeLabelLocaleBased } from "~/renderer/hooks/useGetStakeLabelLocaleBased"; type Location = Parameters>[0]; @@ -238,6 +239,7 @@ const MainSideBar = () => { const location = useLocation(); const dispatch = useDispatch(); const { t } = useTranslation(); + const earnLabel = useGetStakeLabelLocaleBased(); const manifest = useRemoteLiveAppManifest(BAANX_APP_ID); const isCardDisabled = !manifest; @@ -456,7 +458,7 @@ const MainSideBar = () => { /> ({ columns: 3, @@ -19,7 +20,7 @@ const ButtonGrid = styled(Grid).attrs(() => ({ const FeaturedButtons = () => { const history = useHistory(); const { t } = useTranslation(); - + const stakeLabel = useGetStakeLabelLocaleBased(); const bannerFeatureFlag = useFeature("portfolioExchangeBanner"); const stakeProgramsFeatureFlag = useFeature("stakePrograms"); @@ -67,7 +68,7 @@ const FeaturedButtons = () => { } disabled={stakeDisabled} - title={t("dashboard.featuredButtons.earn.title")} + title={stakeLabel} body={t("dashboard.featuredButtons.earn.description")} onClick={handleClickStake} entryButtonTestId="stake-entry-button" diff --git a/apps/ledger-live-desktop/static/i18n/en/app.json b/apps/ledger-live-desktop/static/i18n/en/app.json index 6aba11e3f95a..2f4429528ffb 100644 --- a/apps/ledger-live-desktop/static/i18n/en/app.json +++ b/apps/ledger-live-desktop/static/i18n/en/app.json @@ -1486,7 +1486,7 @@ }, "earn": { "title": "Stake", - "description": "Stake your crypto with Ledger" + "description": "Get rewards on your crypto" } }, "recoverBanner": { diff --git a/apps/ledger-live-mobile/src/components/TabBar/TransferDrawer.tsx b/apps/ledger-live-mobile/src/components/TabBar/TransferDrawer.tsx index 474842bdf4fd..f657077f300e 100644 --- a/apps/ledger-live-mobile/src/components/TabBar/TransferDrawer.tsx +++ b/apps/ledger-live-mobile/src/components/TabBar/TransferDrawer.tsx @@ -22,6 +22,7 @@ import { PTX_SERVICES_TOAST_ID } from "~/utils/constants"; import { useQuickAccessURI } from "@ledgerhq/live-common/hooks/recoverFeatureFlag"; import { EntryOf } from "~/types/helpers"; import { BaseNavigatorStackParamList } from "../RootNavigator/types/BaseNavigator"; +import { getStakeLabelLocaleBased } from "~/helpers/getStakeLabelLocaleBased"; type ButtonItem = { title: string; @@ -42,6 +43,7 @@ export default function TransferDrawer({ onClose }: Omit onNavigate(STAKE.route), diff --git a/apps/ledger-live-mobile/src/locales/en/common.json b/apps/ledger-live-mobile/src/locales/en/common.json index c2f01bf87449..1331a9de44a7 100644 --- a/apps/ledger-live-mobile/src/locales/en/common.json +++ b/apps/ledger-live-mobile/src/locales/en/common.json @@ -3271,7 +3271,7 @@ }, "stake": { "title": "Stake", - "description": "Stake your crypto holdings." + "description": "Get rewards on your crypto." }, "swap": { "title": "Swap", diff --git a/apps/ledger-live-mobile/src/screens/Portfolio/PortfolioQuickActionsBar.tsx b/apps/ledger-live-mobile/src/screens/Portfolio/PortfolioQuickActionsBar.tsx index 1faf8339dd05..6c5132e63533 100644 --- a/apps/ledger-live-mobile/src/screens/Portfolio/PortfolioQuickActionsBar.tsx +++ b/apps/ledger-live-mobile/src/screens/Portfolio/PortfolioQuickActionsBar.tsx @@ -9,6 +9,7 @@ import { track } from "~/analytics"; import { useRoute } from "@react-navigation/native"; import { BaseNavigatorStackParamList } from "~/components/RootNavigator/types/BaseNavigator"; import { EntryOf } from "~/types/helpers"; +import { getStakeLabelLocaleBased } from "~/helpers/getStakeLabelLocaleBased"; const SHARED_CONFIG = { variant: "small" as const, @@ -17,6 +18,7 @@ const SHARED_CONFIG = { function PortfolioQuickActionsBar() { const navigation = useNavigation>(); const router = useRoute(); + const stakeLabel = getStakeLabelLocaleBased(); const { t } = useTranslation(); const { quickActionsList: { SEND, RECEIVE, BUY, SWAP, STAKE }, @@ -62,7 +64,7 @@ function PortfolioQuickActionsBar() { STAKE && { ...SHARED_CONFIG, Icon: STAKE.icon, - children: t("portfolio.quickActions.stake"), + children: t(stakeLabel), onPress: () => onNavigate(STAKE.route, "quick_action_stake"), disabled: STAKE.disabled, },