diff --git a/editor/locale/locale.js b/editor/locale/locale.js index 24770067..94efab03 100644 --- a/editor/locale/locale.js +++ b/editor/locale/locale.js @@ -8,6 +8,7 @@ */ var put_locale = function(svgCanvas, given_param){ var lang_param; + var good_langs = ['cs','nl','en','es','fr','ro','sk']; if(given_param) { lang_param = given_param; } else { @@ -20,8 +21,14 @@ var put_locale = function(svgCanvas, given_param){ if (lang_param == "") return; } - // don't bother on first run if language is English lang_param = String(lang_param); + + // Set to English if language is not in list of good langs + if($.inArray(lang_param, good_langs) == -1) { + lang_param = "en"; + } + + // don't bother on first run if language is English if(lang_param.indexOf("en") == 0) return; } diff --git a/editor/svg-editor.html b/editor/svg-editor.html index 8f53d49f..da7ff59e 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -427,11 +427,11 @@ script type="text/javascript" src="locale/locale.min.js"> diff --git a/editor/svg-editor.js b/editor/svg-editor.js index ecc8aa82..2b2b9b26 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -2131,9 +2131,7 @@ function svg_edit_setup() { var t = this.title.split(' [')[0]; var key_str = ''; // Shift+Up - console.log('keyval',keyval) $.each(keyval.split('/'), function(i, key) { - console.log('key',key); var mod_bits = key.split('+'), mod = ''; if(mod_bits.length > 1) { mod = mod_bits[0] + '+';