also add Tags in extra file without translation
parent
59ccb7ac19
commit
d5636f9026
|
|
@ -520,10 +520,10 @@ onUiUpdate(function () {
|
|||
console.error("Error loading tags file: " + e);
|
||||
return;
|
||||
}
|
||||
if (acConfig.translation.extraTranslationFile) {
|
||||
if (acConfig.extra.extraFile) {
|
||||
try {
|
||||
allTranslations = loadCSV(`file/tags/${acConfig.translation.extraTranslationFile}`);
|
||||
if (acConfig.simpleExtraTranslationFile) {
|
||||
allTranslations = loadCSV(`file/tags/${acConfig.extra.extraFile}`);
|
||||
if (acConfig.onlyTranslationExtraFile) {
|
||||
for (let i = 0; i < allTranslations.length; i++) {
|
||||
if (allTranslations[i][0]) {
|
||||
allTags[i][2] = allTranslations[i][0];
|
||||
|
|
@ -531,17 +531,15 @@ onUiUpdate(function () {
|
|||
}
|
||||
} else {
|
||||
allTranslations.map(x => {
|
||||
if (x[2]) {
|
||||
let i = 0
|
||||
for (; i < allTags.length; i++) {
|
||||
if (x[0] === allTags[i][0] && x[1] === allTags[i][1]) {
|
||||
allTags[i][2] = x[2];
|
||||
}
|
||||
}
|
||||
if (i === allTags.length) {
|
||||
allTags.push(x);
|
||||
let i = 0
|
||||
for (; i < allTags.length; i++) {
|
||||
if (x[2] && x[0] === allTags[i][0] && x[1] === allTags[i][1]) {
|
||||
allTags[i][2] = x[2];
|
||||
}
|
||||
}
|
||||
if (i === allTags.length) {
|
||||
allTags.push(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
|
|||
|
|
@ -13,9 +13,11 @@
|
|||
"showAllResults": false,
|
||||
"translation": {
|
||||
"searchByTranslation": true,
|
||||
"onlyShowTranslation": false,
|
||||
"simpleExtraTranslationFile": false,
|
||||
"extraTranslationFile": ""
|
||||
"onlyShowTranslation": false
|
||||
},
|
||||
"extra": {
|
||||
"extraFile": "",
|
||||
"onlyTranslationExtraFile": false
|
||||
},
|
||||
"colors": {
|
||||
"danbooru": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue