From 1f800fab38aadb73ba4ca234815afa227fa57797 Mon Sep 17 00:00:00 2001 From: Agriya Dev5 Date: Tue, 18 May 2021 17:30:57 +0530 Subject: [PATCH] #98 i18n translation changes --- src/editor/EditorStartup.js | 1 + .../extensions/ext-storage/storageDialog.js | 17 +++++++++-------- src/editor/locale/lang.en.js | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/editor/EditorStartup.js b/src/editor/EditorStartup.js index 7042b873..446b8572 100644 --- a/src/editor/EditorStartup.js +++ b/src/editor/EditorStartup.js @@ -68,6 +68,7 @@ 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 { diff --git a/src/editor/extensions/ext-storage/storageDialog.js b/src/editor/extensions/ext-storage/storageDialog.js index b224f7d7..4063dd5e 100644 --- a/src/editor/extensions/ext-storage/storageDialog.js +++ b/src/editor/extensions/ext-storage/storageDialog.js @@ -1,4 +1,5 @@ /* eslint-disable max-len */ +/* globals i18next */ const template = document.createElement('template'); template.innerHTML = ` @@ -50,26 +51,26 @@ template.innerHTML = `
-

- By default and where supported, SVG-Edit can store your editor preferences and SVG content locally on your machine so you do not need to add these back each time you load SVG-Edit. If, for privacy reasons, you do not wish to store this information on your machine, you can change away from the default option below. +

+ ${i18next.t('notification.editorPreferencesMsg')}

diff --git a/src/editor/locale/lang.en.js b/src/editor/locale/lang.en.js index a88a6603..3b8f9eff 100644 --- a/src/editor/locale/lang.en.js +++ b/src/editor/locale/lang.en.js @@ -163,7 +163,8 @@ export default { move_back: 'Send to Back', tool_unlink_use: 'Break link to reference element (make unique)', ellipse_circle_tool: 'Ellipse/Circle Tool', - square_rect_tool: 'Square/Rect Tool' + square_rect_tool: 'Square/Rect Tool', + remember_this_choice: 'Remember this choice?' }, layers: { layer: 'Layer',