feat: lang detector can be selected
This commit is contained in:
@@ -17,6 +17,8 @@ import {
|
||||
UI_LANGS,
|
||||
TRANS_NEWLINE_LENGTH,
|
||||
CACHE_NAME,
|
||||
OPT_TRANS_MICROSOFT,
|
||||
OPT_LANGDETECTOR_ALL,
|
||||
OPT_SHORTCUT_TRANSLATE,
|
||||
OPT_SHORTCUT_STYLE,
|
||||
OPT_SHORTCUT_POPUP,
|
||||
@@ -113,6 +115,7 @@ export default function Settings() {
|
||||
blacklist = DEFAULT_BLACKLIST.join(",\n"),
|
||||
csplist = DEFAULT_CSPLIST.join(",\n"),
|
||||
transInterval = 500,
|
||||
langDetector = OPT_TRANS_MICROSOFT,
|
||||
} = setting;
|
||||
const { isHide = false } = fab || {};
|
||||
|
||||
@@ -231,6 +234,22 @@ export default function Settings() {
|
||||
</Select>
|
||||
</FormControl>
|
||||
|
||||
<FormControl size="small">
|
||||
<InputLabel>{i18n("detect_lang_remote")}</InputLabel>
|
||||
<Select
|
||||
name="langDetector"
|
||||
value={langDetector}
|
||||
label={i18n("detect_lang_remote")}
|
||||
onChange={handleChange}
|
||||
>
|
||||
{OPT_LANGDETECTOR_ALL.map((item) => (
|
||||
<MenuItem value={item} key={item}>
|
||||
{item}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</FormControl>
|
||||
|
||||
{isExt ? (
|
||||
<>
|
||||
<FormControl size="small">
|
||||
|
||||
Reference in New Issue
Block a user