From 9c577840ccccbb262973383c6a4c377c0726f80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=B4=E7=8C=AB?= Date: Sun, 15 Mar 2026 10:06:44 +0900 Subject: [PATCH] fix: update package dependencies and improve language handling in the header component --- dashboard/package.json | 4 ++-- dashboard/src/components/layout/Header.tsx | 9 +++++--- .../src/components/tour/tour-renderer.tsx | 1 - dashboard/src/i18n/locales/en.json | 1 - dashboard/src/i18n/locales/ja.json | 21 +++++++++---------- dashboard/src/i18n/locales/ko.json | 1 - dashboard/src/i18n/locales/zh.json | 1 - 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/dashboard/package.json b/dashboard/package.json index 63417a2c..042d95a3 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -146,7 +146,7 @@ "react-day-picker": "^9.12.0", "react-dom": "^19.2.1", "react-i18next": "^16.5.4", - "react-joyride": "^2.9.3", + "react-joyride": "3.0.0-7", "react-markdown": "^10.1.0", "reactflow": "^11.11.4", "recharts": "3.5.1", @@ -155,7 +155,7 @@ "remark-math": "^6.0.0", "smol-toml": "^1.5.2", "tailwind-merge": "^3.4.0", - "@react-spring/web": "^9.7.5", + "@react-spring/web": "10.0.3", "@use-gesture/react": "^10.3.1" }, "devDependencies": { diff --git a/dashboard/src/components/layout/Header.tsx b/dashboard/src/components/layout/Header.tsx index eb99d5fc..735a6683 100644 --- a/dashboard/src/components/layout/Header.tsx +++ b/dashboard/src/components/layout/Header.tsx @@ -20,6 +20,7 @@ import { isElectron } from '@/lib/runtime' import { cn } from '@/lib/utils' const LANGUAGE_CODES = ['zh', 'en', 'ja', 'ko'] as const +const LANGUAGE_NAMES: Record = { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" } interface HeaderProps { sidebarOpen: boolean @@ -138,12 +139,14 @@ export function Header({ - {LANGUAGE_CODES.map((code) => ( + { + + LANGUAGE_CODES.map((code) => ( i18nInstance.changeLanguage(code)} @@ -155,7 +158,7 @@ export function Header({ {currentLang.split('-')[0] === code && ( )} - {t(`language.${code}`)} + {LANGUAGE_NAMES[code]} ))} diff --git a/dashboard/src/components/tour/tour-renderer.tsx b/dashboard/src/components/tour/tour-renderer.tsx index c015e6c6..8ec07103 100644 --- a/dashboard/src/components/tour/tour-renderer.tsx +++ b/dashboard/src/components/tour/tour-renderer.tsx @@ -203,7 +203,6 @@ export function TourRenderer() { zIndex: 99999, }, }, - disableAnimation: true, }} /> ) diff --git a/dashboard/src/i18n/locales/en.json b/dashboard/src/i18n/locales/en.json index d6b26595..9ed66798 100644 --- a/dashboard/src/i18n/locales/en.json +++ b/dashboard/src/i18n/locales/en.json @@ -1,5 +1,4 @@ { - "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, "header": { "collapseSidebar": "Collapse sidebar", "expandSidebar": "Expand sidebar", diff --git a/dashboard/src/i18n/locales/ja.json b/dashboard/src/i18n/locales/ja.json index 5aa4afe2..6da99281 100644 --- a/dashboard/src/i18n/locales/ja.json +++ b/dashboard/src/i18n/locales/ja.json @@ -1,5 +1,4 @@ { - "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, "header": { "collapseSidebar": "サイドバーを折りたたむ", "expandSidebar": "サイドバーを展開する", @@ -89,7 +88,7 @@ "animationSpeed": "アニメーション速度", "backgroundImage": "背景画像", "backgroundBlur": "背景ぼかし", - "backgroundOpacity": "背景透明度", + "backgroundOpacity": "背景の透明度", "lightDesc": "常にライトテーマを使用", "darkDesc": "常にダークテーマを使用", "systemDesc": "システム設定に従って自動切り替え", @@ -119,7 +118,7 @@ "fontFamilySerif": "セリフ (Serif)", "fontFamilyMono": "等幅 (Monospace)", "baseFontSize": "基準フォントサイズ (Base Size)", - "lineHeight": "行高 (Line Height)", + "lineHeight": "行の高さ (Line Height)", "lineHeightPlaceholder": "行高を選択", "lineHeightCompact": "コンパクト (1.2)", "lineHeightNormal": "標準 (1.5)", @@ -186,7 +185,7 @@ "hide": "非表示", "show": "表示", "copyTip": "クリップボードにコピー", - "regenerateShort": "生成", + "regenerateShort": "生成する", "confirmRegenerateFullDesc": "新しい 64 桁のセキュアトークンを生成し、現在の Token を即座に無効にします。新しい Token で再ログインが必要です。この操作は元に戻せません。続けますか?", "confirmGenerate": "生成を確認", "tokenStorePlaceholder": "Token はセキュアな Cookie に保存されています", @@ -196,7 +195,7 @@ "tokenReqTitle": "Token セキュリティ要件:", "tokenValid": "Token のフォーマットは正しく使用できます", "updateBtn": "カスタム Token を更新", - "updating": "更新中...", + "updating": "更新しています...", "dialogTitle": "新しい Access Token", "dialogDesc": "これが新しい Token です。すぐに保存してください。このウィンドウを閉じるとログインページにリダイレクトされます。", "dialogTokenLabel": "新しい Token (64 桁セキュアトークン)", @@ -247,10 +246,10 @@ "logCacheSizeDesc": "ログビューアがキャッシュする最大ログ数を制御します。大きい値はより多くのメモリを使用します。", "logCacheSizeUnit": "件", "dataSyncIntervalLabel": "ホームデータ更新間隔", - "dataSyncIntervalUnit": "秒", + "dataSyncIntervalUnit": "秒間", "dataSyncIntervalDesc": "ホーム画面の統計データの自動更新間隔を制御します", "wsReconnectLabel": "WebSocket 再接続間隔", - "wsReconnectUnit": "秒", + "wsReconnectUnit": "秒間", "wsReconnectDesc": "ログ WebSocket 切断後の再接続基本間隔", "wsMaxReconnectLabel": "WebSocket 最大再接続回数", "wsMaxReconnectUnit": "回", @@ -294,7 +293,7 @@ "openSource": "オープンソース", "aboutApp": "MaiBot Dashboard について", "version": "バージョン:", - "author": "作者", + "author": "開発者", "techStack": "技術スタック", "frontendFramework": "フロントエンドフレームワーク", "uiComponents": "UI コンポーネント", @@ -384,7 +383,7 @@ "loading": "読み込み中...", "error": "エラー", "retry": "再試行", - "save": "保存", + "save": "保存する", "cancel": "キャンセル", "confirm": "確認", "delete": "削除", @@ -392,7 +391,7 @@ "close": "閉じる", "search": "検索", "noData": "データなし", - "success": "成功", + "success": "成功しました", "failed": "失敗" }, "restart": { @@ -519,7 +518,7 @@ "noData": "データなし", "replied": "返信 {{num}} 件", "per100Messages": "100メッセージあたり", - "seconds": "秒", + "seconds": "秒間", "hours": "時間", "days": "日" }, diff --git a/dashboard/src/i18n/locales/ko.json b/dashboard/src/i18n/locales/ko.json index f6221cc9..bacaab72 100644 --- a/dashboard/src/i18n/locales/ko.json +++ b/dashboard/src/i18n/locales/ko.json @@ -1,5 +1,4 @@ { - "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, "header": { "collapseSidebar": "사이드바 접기", "expandSidebar": "사이드바 펼치기", diff --git a/dashboard/src/i18n/locales/zh.json b/dashboard/src/i18n/locales/zh.json index c618b0ed..9feb7bfe 100644 --- a/dashboard/src/i18n/locales/zh.json +++ b/dashboard/src/i18n/locales/zh.json @@ -1,5 +1,4 @@ { - "language": { "zh": "中文", "en": "English", "ja": "日本語", "ko": "한국어" }, "header": { "collapseSidebar": "收起侧边栏", "expandSidebar": "展开侧边栏",