#98 i18next remove from window and add svgEditor

master
Agriya Dev5 2021-05-19 11:03:33 +05:30
parent 9ca774aea9
commit 299f271d18
3 changed files with 10 additions and 10 deletions

View File

@ -110,6 +110,7 @@ class Editor extends EditorStartup {
this.topPanel = new TopPanel(this);
this.layersPanel = new LayersPanel(this);
this.mainMenu = new MainMenu(this);
window.svgEditor = this;
}
/**
*

View File

@ -68,7 +68,6 @@ class EditorStartup {
const self = this;
const { i18next } = await putLocale(this.configObj.pref('lang'), this.goodLangs);
this.i18next = i18next;
window.i18next = i18next;
// allow to prepare the dom without display
this.$svgEditor.style.visibility = 'hidden';
try {

View File

@ -1,15 +1,15 @@
/* eslint-disable max-len */
/* globals i18next */
/* globals svgEditor */
const template = document.createElement('template');
const notification = i18next.t('notification.editorPreferencesMsg');
const prefs_and_content = i18next.t('properties.prefs_and_content');
const prefs_only = i18next.t('properties.prefs_only');
const no_prefs_or_content = i18next.t('properties.no_prefs_or_content');
const remember_this_choice = i18next.t('tools.remember_this_choice');
const remember_this_choice_title = i18next.t('tools.remember_this_choice_title');
const ok = i18next.t('common.ok');
const cancel = i18next.t('common.cancel');
const notification = svgEditor.i18next.t('notification.editorPreferencesMsg');
const prefs_and_content = svgEditor.i18next.t('properties.prefs_and_content');
const prefs_only = svgEditor.i18next.t('properties.prefs_only');
const no_prefs_or_content = svgEditor.i18next.t('properties.no_prefs_or_content');
const remember_this_choice = svgEditor.i18next.t('tools.remember_this_choice');
const remember_this_choice_title = svgEditor.i18next.t('tools.remember_this_choice_title');
const ok = svgEditor.i18next.t('common.ok');
const cancel = svgEditor.i18next.t('common.cancel');
// eslint-disable-next-line no-unsanitized/property
template.innerHTML = `
<style>