From 7a182418a7f443851c8b2a9e688b24ad16b88b09 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 25 Feb 2022 12:29:17 -0800 Subject: [PATCH] Compiles. --- packages/editor/src/index.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/editor/src/index.tsx b/packages/editor/src/index.tsx index e9388163..bf5d4dad 100644 --- a/packages/editor/src/index.tsx +++ b/packages/editor/src/index.tsx @@ -13,6 +13,7 @@ import { } from '@wisemapping/mindplot'; import './global-styled.css'; import I18nMsg from './classes/i18n-msg'; +import Messages from '@wisemapping/mindplot/src/components/Messages'; declare global { // used in mindplot @@ -75,6 +76,9 @@ const Editor = ({ } }, [options.enableKeyboardEvents]); + useEffect(() => { + Messages.init(options.locale); + }, [options.locale]); const onLoadDesigner = (mapId: string, options: EditorOptions, persistenceManager: PersistenceManager): Designer => { const buildOptions = DesignerOptionsBuilder.buildOptions({ @@ -94,12 +98,14 @@ const Editor = ({ const msg = I18nMsg.loadLocaleData(locale); return ( - + {(options.mode !== 'viewonly') && + + }
-