V7 dev (#499)
* update dependencies * Update .eslintrc.js * Update .gitignore * Create onpush.yml * downgrade 2 packages causing test failure * fix some localizaiton stringsmaster
parent
c75170916f
commit
af3d807505
|
@ -377,7 +377,7 @@ class Editor extends EditorStartup {
|
||||||
this.exportWindow = window.open(blankPageObjectURL || '', exportWindowName); // A hack to get the window via JSON-able name without opening a new one
|
this.exportWindow = window.open(blankPageObjectURL || '', exportWindowName); // A hack to get the window via JSON-able name without opening a new one
|
||||||
|
|
||||||
if (!this.exportWindow || this.exportWindow.closed) {
|
if (!this.exportWindow || this.exportWindow.closed) {
|
||||||
seAlert(this.uiStrings.notification.popupWindowBlocked);
|
seAlert(this.i18next.t('notification.popupWindowBlocked'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ class Editor extends EditorStartup {
|
||||||
// Check if there are issues
|
// Check if there are issues
|
||||||
if (issues.length) {
|
if (issues.length) {
|
||||||
const pre = '\n \u2022 ';
|
const pre = '\n \u2022 ';
|
||||||
note += ('\n\n' + this.uiStrings.notification.noteTheseIssues + pre + issues.join(pre));
|
note += ('\n\n' + this.i18next.t('notification..noteTheseIssues') + pre + issues.join(pre));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that this will also prevent the notice even though new issues may appear later.
|
// Note that this will also prevent the notice even though new issues may appear later.
|
||||||
|
@ -941,7 +941,7 @@ class Editor extends EditorStartup {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!this.svgCanvas.setSvgString(e.detail.value)) {
|
if (!this.svgCanvas.setSvgString(e.detail.value)) {
|
||||||
const ok = await seConfirm(this.uiStrings.notification.QerrorsRevertToSource);
|
const ok = await seConfirm(this.i18next.t('notification.QerrorsRevertToSource'));
|
||||||
if (ok === false || ok === 'Cancel') {
|
if (ok === false || ok === 'Cancel') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -970,7 +970,7 @@ class Editor extends EditorStartup {
|
||||||
if (editingsource) {
|
if (editingsource) {
|
||||||
const origSource = this.svgCanvas.getSvgString();
|
const origSource = this.svgCanvas.getSvgString();
|
||||||
if (origSource !== e.detail.value) {
|
if (origSource !== e.detail.value) {
|
||||||
const ok = seConfirm(this.uiStrings.notification.QignoreSourceChanges);
|
const ok = seConfirm(this.i18next.t('notification.QignoreSourceChanges'));
|
||||||
if (ok) {
|
if (ok) {
|
||||||
this.hideSourceEditor();
|
this.hideSourceEditor();
|
||||||
}
|
}
|
||||||
|
@ -1000,7 +1000,7 @@ class Editor extends EditorStartup {
|
||||||
if (this.svgCanvas.undoMgr.getUndoStackSize() === 0) {
|
if (this.svgCanvas.undoMgr.getUndoStackSize() === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return await seConfirm(this.uiStrings.notification.QwantToOpen);
|
return await seConfirm(this.i18next.t('notification.QwantToOpen'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1052,13 +1052,13 @@ class Editor extends EditorStartup {
|
||||||
const $editDialog = document.getElementById('se-edit-prefs');
|
const $editDialog = document.getElementById('se-edit-prefs');
|
||||||
$editDialog.setAttribute('lang', lang);
|
$editDialog.setAttribute('lang', lang);
|
||||||
const oldLayerName = ($id('#layerlist')) ? $id('#layerlist').querySelector('tr.layersel td.layername').textContent : "";
|
const oldLayerName = ($id('#layerlist')) ? $id('#layerlist').querySelector('tr.layersel td.layername').textContent : "";
|
||||||
const renameLayer = (oldLayerName === this.uiStrings.common.layer + ' 1');
|
const renameLayer = (oldLayerName === this.i18next.t('notification.common.layer') + ' 1');
|
||||||
|
|
||||||
// this.svgCanvas.setUiStrings(allStrings);
|
// this.svgCanvas.setUiStrings(allStrings);
|
||||||
this.setTitles();
|
this.setTitles();
|
||||||
|
|
||||||
if (renameLayer) {
|
if (renameLayer) {
|
||||||
this.svgCanvas.renameCurrentLayer(this.uiStrings.common.layer + ' 1');
|
this.svgCanvas.renameCurrentLayer(this.i18next.t('notification.common.layer') + ' 1');
|
||||||
this.layersPanel.populateLayers();
|
this.layersPanel.populateLayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1151,7 +1151,7 @@ class Editor extends EditorStartup {
|
||||||
dataType: 'text',
|
dataType: 'text',
|
||||||
cache: Boolean(cache),
|
cache: Boolean(cache),
|
||||||
beforeSend() {
|
beforeSend() {
|
||||||
$.process_cancel(this.uiStrings.notification.loadingImage);
|
$.process_cancel(this.i18next.t('notification.loadingImage'));
|
||||||
},
|
},
|
||||||
success(str) {
|
success(str) {
|
||||||
this.loadSvgString(str, { noAlert });
|
this.loadSvgString(str, { noAlert });
|
||||||
|
|
|
@ -165,7 +165,7 @@ class EditorStartup {
|
||||||
this.exportWindow = window.open('', this.exportWindowName); // A hack to get the window via JSON-able name without opening a new one
|
this.exportWindow = window.open('', this.exportWindowName); // A hack to get the window via JSON-able name without opening a new one
|
||||||
}
|
}
|
||||||
if (!this.exportWindow || this.exportWindow.closed) {
|
if (!this.exportWindow || this.exportWindow.closed) {
|
||||||
seAlert(this.uiStrings.notification.popupWindowBlocked);
|
seAlert(this.i18next.t('notification.popupWindowBlocked'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.exportWindow.location.href = data.output;
|
this.exportWindow.location.href = data.output;
|
||||||
|
@ -577,8 +577,8 @@ class EditorStartup {
|
||||||
// showSaveWarning is set to 'false' when the page is saved.
|
// showSaveWarning is set to 'false' when the page is saved.
|
||||||
if (!this.configObj.curConfig.no_save_warning && this.showSaveWarning) {
|
if (!this.configObj.curConfig.no_save_warning && this.showSaveWarning) {
|
||||||
// Browser already asks question about closing the page
|
// Browser already asks question about closing the page
|
||||||
e.returnValue = this.uiStrings.notification.unsavedChanges; // Firefox needs this when beforeunload set by addEventListener (even though message is not used)
|
e.returnValue = this.i18next.t('notification.unsavedChanges'); // Firefox needs this when beforeunload set by addEventListener (even though message is not used)
|
||||||
return this.uiStrings.notification.unsavedChanges;
|
return this.i18next.t('notification.unsavedChanges');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
|
@ -219,7 +219,7 @@ class LayersPanel {
|
||||||
} while (this.editor.svgCanvas.getCurrentDrawing().hasLayer(uniqName));
|
} while (this.editor.svgCanvas.getCurrentDrawing().hasLayer(uniqName));
|
||||||
|
|
||||||
const newName = prompt(
|
const newName = prompt(
|
||||||
this.uiStrings.notification.enterUniqueLayerName,
|
this.i18next.t('notification.enterUniqueLayerName'),
|
||||||
uniqName
|
uniqName
|
||||||
);
|
);
|
||||||
if (!newName) {
|
if (!newName) {
|
||||||
|
@ -263,7 +263,7 @@ class LayersPanel {
|
||||||
this.editor.svgCanvas.getCurrentDrawing().getCurrentLayerName() + " copy";
|
this.editor.svgCanvas.getCurrentDrawing().getCurrentLayerName() + " copy";
|
||||||
|
|
||||||
const newName = prompt(
|
const newName = prompt(
|
||||||
this.uiStrings.notification.enterUniqueLayerName,
|
this.i18next.t('notification.enterUniqueLayerName'),
|
||||||
name
|
name
|
||||||
);
|
);
|
||||||
if (!newName) {
|
if (!newName) {
|
||||||
|
@ -331,7 +331,7 @@ class LayersPanel {
|
||||||
oldName === newName ||
|
oldName === newName ||
|
||||||
this.editor.svgCanvas.getCurrentDrawing().hasLayer(newName)
|
this.editor.svgCanvas.getCurrentDrawing().hasLayer(newName)
|
||||||
) {
|
) {
|
||||||
alert(this.uiStrings.notification.layerHasThatName);
|
alert(this.i18next.t('notification.layerHasThatName'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.editor.svgCanvas.renameCurrentLayer(newName);
|
this.editor.svgCanvas.renameCurrentLayer(newName);
|
||||||
|
|
|
@ -558,7 +558,7 @@ class TopPanel {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
e.target.value = this.editor.selectedElement().getAttribute(attr);
|
e.target.value = this.editor.selectedElement().getAttribute(attr);
|
||||||
// eslint-disable-next-line no-alert
|
// eslint-disable-next-line no-alert
|
||||||
alert(this.uiStrings.notification.invalidAttrValGiven);
|
alert(this.i18next.t('notification.invalidAttrValGiven'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,7 +619,7 @@ class TopPanel {
|
||||||
if (!isNullish(this.editor.selectedElement) || this.multiselected) {
|
if (!isNullish(this.editor.selectedElement) || this.multiselected) {
|
||||||
// eslint-disable-next-line no-alert
|
// eslint-disable-next-line no-alert
|
||||||
const url = prompt(
|
const url = prompt(
|
||||||
this.uiStrings.notification.enterNewLinkURL,
|
this.i18next.t('notification.enterNewLinkURL'),
|
||||||
"http://"
|
"http://"
|
||||||
);
|
);
|
||||||
if (url) {
|
if (url) {
|
||||||
|
|
Loading…
Reference in New Issue