From a09182f47bd903cde59e71508782525d5d1e2bed Mon Sep 17 00:00:00 2001 From: skywalker Date: Fri, 30 Aug 2024 19:14:41 +0300 Subject: [PATCH] fix(i18n): localize instrument card --- .../instrument-card-actions/ui/ShowInstrument.button.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/shared/instrument-card-actions/ui/ShowInstrument.button.tsx b/client/src/shared/instrument-card-actions/ui/ShowInstrument.button.tsx index 70171b7b..6ac46721 100644 --- a/client/src/shared/instrument-card-actions/ui/ShowInstrument.button.tsx +++ b/client/src/shared/instrument-card-actions/ui/ShowInstrument.button.tsx @@ -5,12 +5,15 @@ import { useNavigate } from "react-router-dom"; import { InstrumentDetail } from "generated/model"; import { useDarkMode } from "shared/dark-mode/use-dark-mode"; +import { useTranslation } from "react-i18next"; +import { I18N_INSTRUMENT_CARD_SHOW_BUTTON } from "../../../i18n"; interface Props { instrument: InstrumentDetail; } export const ShowInstrumentButton = (props: Props) => { + const { t } = useTranslation(); const { darkMode } = useDarkMode(); const navigate = useNavigate(); @@ -27,7 +30,7 @@ export const ShowInstrumentButton = (props: Props) => { `} onClick={handleOnClick} > - Show + {t(I18N_INSTRUMENT_CARD_SHOW_BUTTON)} ); };