* Fix i18n not working in the Edit Pref Window Fix i18n not working in the Edit Pref Window, added an error message on failure. * réussie -> réussi.
This commit is contained in:
parent
0119cfd0d6
commit
0cf7880391
@ -14,6 +14,7 @@
|
||||
"core-index/value": "Value",
|
||||
"core-index/add-pref": "Add preference",
|
||||
"core-index/pref-key": "Preference key value:",
|
||||
"core-index/prefs-loading-failed": "Failed to load the preferences.",
|
||||
"core-index/edit": "Edit",
|
||||
"core-index/delete": "Delete",
|
||||
"core-index/new-proj-name": "New project name:",
|
||||
|
@ -13,6 +13,7 @@
|
||||
"core-index/version": "Version",
|
||||
"core-index/error-rename": "Échec du renommage du projet :",
|
||||
"core-index/pref-key": "Valeur de la préférence :",
|
||||
"core-index/prefs-loading-failed": "La lecture des préférences n’a pas réussi.",
|
||||
"core-index/change-metadata-value": "Changer la valeur de la clé de métadonnée",
|
||||
"core-index/sample-data": "jeux de données d'exemple",
|
||||
"core-index/description": "Description :",
|
||||
|
@ -71,19 +71,28 @@ Refine.postCSRF = function(url, data, success, dataType, failCallback) {
|
||||
var lang = (navigator.language|| navigator.userLanguage).split("-")[0];
|
||||
var dictionary = "";
|
||||
$.ajax({
|
||||
url : "command/core/load-language?",
|
||||
type : "POST",
|
||||
async : false,
|
||||
data : {
|
||||
module : "core",
|
||||
//lang : lang
|
||||
},
|
||||
success : function(data) {
|
||||
dictionary = data['dictionary'];
|
||||
lang = data['lang'];
|
||||
}
|
||||
url : "command/core/load-language?",
|
||||
type : "POST",
|
||||
async : false,
|
||||
data : {
|
||||
module : "core",
|
||||
//lang : lang
|
||||
},
|
||||
success : function(data) {
|
||||
dictionary = data['dictionary'];
|
||||
lang = data['lang'];
|
||||
}
|
||||
}).fail(function( jqXhr, textStatus, errorThrown ) {
|
||||
var errorMessage = $.i18n('core-index/prefs-loading-failed');
|
||||
if(errorMessage != "" && errorMessage != 'core-index/prefs-loading-failed') {
|
||||
alert(errorMessage);
|
||||
} else {
|
||||
alert( textStatus + ':' + errorThrown );
|
||||
}
|
||||
});
|
||||
|
||||
$.i18n().load(dictionary, lang);
|
||||
$.i18n().locale = lang;
|
||||
//End internationalization
|
||||
|
||||
function deDupUserMetaData(arrObj) {
|
||||
|
Loading…
Reference in New Issue
Block a user