feat: mutual translation effect with the target language

This commit is contained in:
Gabe Yuan
2023-12-11 15:54:54 +08:00
parent 95d19417c3
commit bdd5ed7fc7
5 changed files with 54 additions and 2 deletions

View File

@@ -44,6 +44,7 @@ export default function Tranbox() {
translator,
fromLang,
toLang,
toLang2 = "en",
tranboxShortcut,
btnOffsetX,
btnOffsetY,
@@ -112,6 +113,22 @@ export default function Tranbox() {
))}
</TextField>
<TextField
select
size="small"
name="toLang2"
value={toLang2}
label={i18n("to_lang2")}
helperText={i18n("to_lang2_helper")}
onChange={handleChange}
>
{[["none", "None"], ...OPT_LANGS_TO].map(([lang, name]) => (
<MenuItem key={lang} value={lang}>
{name}
</MenuItem>
))}
</TextField>
<TextField
size="small"
label={i18n("tranbtn_offset_x")}