added i18n, refactoring
This commit is contained in:
@@ -50,7 +50,7 @@ module.exports = {
|
||||
// console.log('onreadystatechange', xobj.readyState);
|
||||
switch(xobj.readyState){
|
||||
case 3:
|
||||
console.log('loading');
|
||||
// console.log('loading');
|
||||
break;
|
||||
case 4:
|
||||
if (xobj.status === 200) {
|
||||
@@ -66,12 +66,12 @@ module.exports = {
|
||||
xobj.send(null);
|
||||
},
|
||||
onJSONLoaded(lc, json, callback){
|
||||
console.log('onDBLoaded '+lc);
|
||||
// console.log('onDBLoaded '+lc);
|
||||
this.data[lc] = JSON.parse(json);
|
||||
this.loaded_dbs ++;
|
||||
//
|
||||
if (this.loaded_dbs == this.langs.length) {
|
||||
console.log('All db loaded : data', this.data);
|
||||
// console.log('All db loaded : data', this.data);
|
||||
this.parseByID(callback);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ module.exports = {
|
||||
this.data_strct[tid].from.push(id);
|
||||
}else{
|
||||
// if targets does not exists, the db has an issue, warn about that
|
||||
console.log(`!! warning : ${tid} target id does not exists`);
|
||||
// console.log(`!! warning : ${tid} target id does not exists`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user