feat: support custom terms

This commit is contained in:
Gabe Yuan
2024-01-19 16:02:53 +08:00
parent 59f9dd697f
commit d5fc69e210
13 changed files with 85 additions and 32 deletions

View File

@@ -23,6 +23,12 @@ export function useTranslate(q, rule, setting) {
try {
setLoading(true);
if (!q.replace(/\[(\d+)\]/g, "").trim()) {
setText(q);
setSamelang(false);
return;
}
const deLang = await tryDetectLang(q, setting.detectRemote);
const disableLangs = setting.disableLangs || [];
if (