mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-03-13 09:10:26 +00:00
also add Tags in extra file without translation
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user