Made auto-language-picker only use full translations

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1083 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-12-22 21:24:58 +00:00
parent ba800c4d41
commit 732155a028
3 changed files with 10 additions and 5 deletions

View File

@ -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;
}

View File

@ -427,11 +427,11 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
<!-- Source: http://en.wikipedia.org/wiki/Language_names -->
<select id="lang_select">
<option id="lang_cs" value="cs">Čeština</option>
<option id="lang_nl" value="nl">Nederlands</option>
<!-- <option id="lang_de" value="de">Deutsch</option> -->
<option id="lang_en" value="en" selected="selected">English</option>
<option id="lang_es" value="es">Español</option>
<option id="lang_fr" value="fr">Français</option>
<!-- <option id="lang_de" value="de">Deutsch</option> -->
<option id="lang_nl" value="nl">Nederlands</option>
<option id="lang_ro" value="ro">Româneşte</option>
<option id="lang_sk" value="sk">Slovenčina</option>
</select>

View File

@ -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] + '+';