Don't continue processing if previous translation exists

This commit is contained in:
Vortrex
2022-03-28 19:48:12 -05:00
parent 684056f5c7
commit 416bbc3bce

View File

@@ -189,6 +189,7 @@ async function translateMessage(messageText, translateFrom = getGlobalConfig().l
if(cachedTranslations[translateFrom][translateTo][i][0] == messageText) {
logToConsole(LOG_DEBUG, `[Translate]: Using existing translation for ${getGlobalConfig().locale.locales[translateFrom][0]} to ${getGlobalConfig().locale.locales[translateTo][0]} - (${messageText}), (${cachedTranslations[translateFrom][translateTo][i][1]})`);
resolve(cachedTranslations[translateFrom][translateTo][i][1]);
return true;
}
}