From 2975b830573f52260daafdd78a7e4c0f730b7da0 Mon Sep 17 00:00:00 2001 From: fAnselmi-Ledger Date: Wed, 23 Oct 2024 15:51:54 +0200 Subject: [PATCH] fix(lld): localised string in CLS --- .changeset/healthy-houses-smell.md | 5 +++++ .../src/renderer/components/CustomImage/ImageCropper.tsx | 5 ++++- apps/ledger-live-desktop/static/i18n/en/app.json | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/healthy-houses-smell.md diff --git a/.changeset/healthy-houses-smell.md b/.changeset/healthy-houses-smell.md new file mode 100644 index 000000000000..f6a17f392bf3 --- /dev/null +++ b/.changeset/healthy-houses-smell.md @@ -0,0 +1,5 @@ +--- +"ledger-live-desktop": patch +--- + +Localised CLS string diff --git a/apps/ledger-live-desktop/src/renderer/components/CustomImage/ImageCropper.tsx b/apps/ledger-live-desktop/src/renderer/components/CustomImage/ImageCropper.tsx index 27358b09e5c7..725a2056b99e 100644 --- a/apps/ledger-live-desktop/src/renderer/components/CustomImage/ImageCropper.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/CustomImage/ImageCropper.tsx @@ -6,6 +6,7 @@ import Cropper, { Area, CropperProps } from "react-easy-crop"; import { createCanvas, getRadianAngle, rotateSize } from "./imageUtils"; import { ImageCropError } from "@ledgerhq/live-common/customImage/errors"; import { useTrack } from "~/renderer/analytics/segment"; +import { useTranslation } from "react-i18next"; export type CropResult = ImageDimensions & ImageBase64Data; @@ -159,6 +160,8 @@ const ImageCropper: React.FC = props => { const aspect = targetDimensions.width / targetDimensions.height; const debouncedCompleteCropPixel = useDebounce(completeCropPixel, 500); + const { t } = useTranslation(); + useEffect(() => { let dead = false; if (!imageRef.current) return; @@ -267,7 +270,7 @@ const ImageCropper: React.FC = props => { Icon={IconsLegacy.ReverseMedium} data-testid="custom-image-crop-rotate-button" > - Rotate + {t("customImage.rotate")} diff --git a/apps/ledger-live-desktop/static/i18n/en/app.json b/apps/ledger-live-desktop/static/i18n/en/app.json index 9692ec5cd408..be4dde9c6138 100644 --- a/apps/ledger-live-desktop/static/i18n/en/app.json +++ b/apps/ledger-live-desktop/static/i18n/en/app.json @@ -6418,6 +6418,7 @@ "cta": "Custom lock screen", "managerCTA": "Lock screen picture", "managerCTARemove": "Remove", + "rotate": "Rotate", "steps": { "choose": { "stepLabel": "Choose picture",