#98 i18n translation changes

master
Agriya Dev5 2021-05-18 17:30:57 +05:30
parent 7fee63d8da
commit 1f800fab38
3 changed files with 12 additions and 9 deletions

View File

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

View File

@ -1,4 +1,5 @@
/* eslint-disable max-len */ /* eslint-disable max-len */
/* globals i18next */
const template = document.createElement('template'); const template = document.createElement('template');
template.innerHTML = ` template.innerHTML = `
@ -51,25 +52,25 @@ template.innerHTML = `
<div id="dialog_container"> <div id="dialog_container">
<div id="dialog_content"> <div id="dialog_content">
<p> <p>
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')}
</p> </p>
<select id="se-storage-pref"> <select id="se-storage-pref">
<option value="prefsAndContent">Store preferences and SVG content locally</option> <option value="prefsAndContent">${i18next.t('properties.prefs_and_content')}</option>
<option value="prefsOnly">Only store preferences locally</option> <option value="prefsOnly">${i18next.t('properties.prefs_only')}</option>
<option value="noPrefsOrContent">Do not store my preferences or SVG content locally</option> <option value="noPrefsOrContent">${i18next.t('properties.no_prefs_or_content')}</option>
</select> </select>
<label title="If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again."> <label title="If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.">
Remember this choice?<input type="checkbox" id="se-remember" value="" checked> ${i18next.t('tools.remember_this_choice')}<input type="checkbox" id="se-remember" value="" checked>
</label> </label>
</div> </div>
<div id="dialog_buttons"> <div id="dialog_buttons">
<button id="storage_ok"> <button id="storage_ok">
<img class="svg_icon" src="./images/ok.svg" alt="icon" width="16" height="16" /> <img class="svg_icon" src="./images/ok.svg" alt="icon" width="16" height="16" />
Ok ${i18next.t('common.ok')}
</button> </button>
<button id="storage_cancel"> <button id="storage_cancel">
<img class="svg_icon" src="./images/cancel.svg" alt="icon" width="16" height="16" /> <img class="svg_icon" src="./images/cancel.svg" alt="icon" width="16" height="16" />
Cancel ${i18next.t('common.cancel')}
</button> </button>
</div> </div>
</div> </div>

View File

@ -163,7 +163,8 @@ export default {
move_back: 'Send to Back', move_back: 'Send to Back',
tool_unlink_use: 'Break link to reference element (make unique)', tool_unlink_use: 'Break link to reference element (make unique)',
ellipse_circle_tool: 'Ellipse/Circle Tool', 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: { layers: {
layer: 'Layer', layer: 'Layer',