From bebc71358c2d731cb5b0aca147e9c65de37794b7 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Fri, 21 May 2021 23:12:44 +0200 Subject: [PATCH] fix i18 issue --- src/editor/panels/TopPanel.js | 4 ++-- src/svgcanvas/draw.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/editor/panels/TopPanel.js b/src/editor/panels/TopPanel.js index 0de43c49..d9e5783b 100644 --- a/src/editor/panels/TopPanel.js +++ b/src/editor/panels/TopPanel.js @@ -557,7 +557,7 @@ class TopPanel { if (!valid) { e.target.value = this.selectedElement.getAttribute(attr); // eslint-disable-next-line no-alert - alert(this.i18next.t('notification.invalidAttrValGiven')); + alert(this.editor.i18next.t('notification.invalidAttrValGiven')); return false; } @@ -618,7 +618,7 @@ class TopPanel { if (!isNullish(this.editor.selectedElement) || this.multiselected) { // eslint-disable-next-line no-alert const url = prompt( - this.i18next.t('notification.enterNewLinkURL'), + this.editor.i18next.t('notification.enterNewLinkURL'), "http://" ); if (url) { diff --git a/src/svgcanvas/draw.js b/src/svgcanvas/draw.js index d534eadf..a910989a 100644 --- a/src/svgcanvas/draw.js +++ b/src/svgcanvas/draw.js @@ -9,7 +9,6 @@ import Layer from './layer.js'; import HistoryRecordingService from './historyrecording.js'; import { NS } from '../common/namespaces.js'; -import { isOpera } from '../common/browser.js'; import { toXml, getElem } from './utilities.js';