From a08c42db8b83103477f347f7c12da9702a175a6f Mon Sep 17 00:00:00 2001 From: Gabe Date: Wed, 1 Oct 2025 12:08:10 +0800 Subject: [PATCH] feat: add button tips --- src/config/i18n.js | 15 +++++++++++++++ src/views/Selection/TranBox.js | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/src/config/i18n.js b/src/config/i18n.js index cecc5b9..cc1bf02 100644 --- a/src/config/i18n.js +++ b/src/config/i18n.js @@ -1478,4 +1478,19 @@ export const I18N = { en: `To import vocabulary, please use a txt file with one word per line.`, zh_TW: `匯入詞彙請使用txt文件,每一行一個單字。`, }, + btn_tip_click_away: { + zh: `失焦隐藏/显示`, + en: `Loss of focus hide/show`, + zh_TW: `失焦隱藏/顯示`, + }, + btn_tip_follow_selection: { + zh: `跟随/固定模式`, + en: `Follow/Fixed Mode`, + zh_TW: `跟隨/固定模式`, + }, + btn_tip_simple_style: { + zh: `迷你/常规模式`, + en: `Mini/Regular Mode`, + zh_TW: `迷你/常規模式`, + }, }; diff --git a/src/views/Selection/TranBox.js b/src/views/Selection/TranBox.js index cf1e9e7..223dcf9 100644 --- a/src/views/Selection/TranBox.js +++ b/src/views/Selection/TranBox.js @@ -38,6 +38,8 @@ function Header({ setFollowSelection, mouseHover, }) { + const i18n = useI18n(); + if (!isMobile && simpleStyle && !mouseHover) { return; } @@ -66,6 +68,7 @@ function Header({ { setHideClickAway((pre) => !pre); }} @@ -78,6 +81,7 @@ function Header({ { setFollowSelection((pre) => !pre); }} @@ -90,6 +94,7 @@ function Header({ { setSimpleStyle((pre) => !pre); }}