Language selection.

Gulpfile
This commit is contained in:
firebingo 2018-04-21 12:53:55 -07:00
parent 5b5f3d83c2
commit 5ed031cb6a
9 changed files with 135 additions and 32 deletions

View file

@ -13,6 +13,7 @@ class UtageInfo {
this.paramInfo = {};
this.soundInfo = {};
this.textureInfo = {};
this.translations = {};
this.currentTranslation = {};
this.bgmLoopData = {};
}
@ -77,16 +78,24 @@ class UtageInfo {
});
}
loadMissionTranslation(file) {
loadMissionTranslation(file, key) {
return new Promise((resolve, reject) => {
commonFunctions.getFileJson(file)
.then((success) => {
this.currentTranslation = success;
if(this.translations[key]) {
debugger;
this.currentTranslation = this.translations[key];
resolve();
}, (failure) => {
this.currentTranslation = {};
resolve();
});
} else {
commonFunctions.getFileJson(file)
.then((success) => {
debugger;
this.translations[key] = success;
this.currentTranslation = success;
resolve();
}, (failure) => {
this.currentTranslation = {};
resolve();
});
}
});
}
@ -229,4 +238,9 @@ class UtageInfo {
}
}
}
resetTranslations() {
this.translations = {};
this.currentTranslation = {};
}
}