mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add types for global translation function
This commit is contained in:
@ -929,8 +929,8 @@ export async function getExpressionLabel(text, expressionsApi = extension_settin
|
||||
return extension_settings.expressions.fallback_expression;
|
||||
}
|
||||
|
||||
if (extension_settings.expressions.translate && typeof window['translate'] === 'function') {
|
||||
text = await window['translate'](text, 'en');
|
||||
if (extension_settings.expressions.translate && typeof globalThis.translate === 'function') {
|
||||
text = await globalThis.translate(text, 'en');
|
||||
}
|
||||
|
||||
text = sampleClassifyText(text);
|
||||
|
Reference in New Issue
Block a user