From 8654958aba0ce128e84fd1a0aec06119a51c7be4 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Thu, 21 Sep 2023 18:18:44 +0530 Subject: [PATCH] use i18n --- src/components/MermaidToExcalidraw.tsx | 23 +++++++++++++---------- src/locales/en.json | 7 +++++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/components/MermaidToExcalidraw.tsx b/src/components/MermaidToExcalidraw.tsx index 53e26f7f9..09b153b5c 100644 --- a/src/components/MermaidToExcalidraw.tsx +++ b/src/components/MermaidToExcalidraw.tsx @@ -17,6 +17,8 @@ import "./MermaidToExcalidraw.scss"; import { MermaidToExcalidrawResult } from "@excalidraw/mermaid-to-excalidraw/dist/interfaces"; import { MermaidOptions } from "@excalidraw/mermaid-to-excalidraw"; +import { t } from "../i18n"; +import Trans from "./Trans"; const LOCAL_STORAGE_KEY_MERMAID_TO_EXCALIDRAW = "mermaid-to-excalidraw"; const MERMAID_EXAMPLE = @@ -197,17 +199,18 @@ const MermaidToExcalidraw = ({ title={ <>

- Mermaid to Excalidraw + {t("mermaid.title")}

- Currently only{" "} - - flowcharts - {" "} - are supported. The other types will be rendered as image in - Excalidraw.
+ ( + {el} + )} + /> +
} @@ -217,7 +220,7 @@ const MermaidToExcalidraw = ({ className="mermaid-to-excalidraw-wrapper-text" style={{ display: "flex", flexDirection: "column" }} > - +