Skip to content

"Vibe-Trading: Your Personal Trading Agent"

fix(i18n): polish language switcher semantics

digger yub17ad7176123
diff --git a/frontend/src/components/layout/Layout.tsx b/frontend/src/components/layout/Layout.tsx
index 3838a0be9..5559f418d 100644
--- a/frontend/src/components/layout/Layout.tsx
+++ b/frontend/src/components/layout/Layout.tsx
@@ -276,7 +276,7 @@ export function Layout() {
// the trigger with getBoundingClientRect() and update on resize/scroll.
// ---------------------------------------------------------------------------
function LanguageSwitcher() {
- const { i18n } = useTranslation();
+ const { i18n, t } = useTranslation();
const [open, setOpen] = useState(false);
const triggerRef = useRef<HTMLButtonElement | null>(null);
const [menuStyle, setMenuStyle] = useState<{ left: number; bottom: number; minWidth: number } | null>(null);
@@ -353,7 +353,7 @@ function LanguageSwitcher() {
onClick={() => setOpen((v) => !v)}
aria-haspopup="menu"
aria-expanded={open}
- aria-label="Language"
+ aria-label={t("layout.language")}
className="flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors"
>
<Languages className="h-3.5 w-3.5 shrink-0" />
@@ -385,7 +385,7 @@ function LanguageSwitcher() {
}}
aria-current={active || undefined}
className={cn(
- "w-full flex items-center gap-2 px-2.5 py-1.5 text-xs hover:bg-accent hover:text-accent-foreground transition-colors",
+ "w-full flex items-center gap-2 px-2.5 py-1.5 text-xs hover:bg-muted hover:text-foreground transition-colors",
active && "text-foreground",
)}
>
diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.json
index 64c662720..fd9b94eb5 100644
--- a/frontend/src/i18n/locales/ar.json
+++ b/frontend/src/i18n/locales/ar.json
@@ -19,6 +19,7 @@
"delete": "حذف",
"light": "فاتح",
"dark": "داكن",
+ "language": "اللغة",
"collapse": "طي",
"expand": "توسيع"
},
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json
index 3ceca0194..d92d38955 100644
--- a/frontend/src/i18n/locales/en.json
+++ b/frontend/src/i18n/locales/en.json
@@ -24,6 +24,7 @@
"delete": "Delete",
"light": "Light",
"dark": "Dark",
+ "language": "Language",
"collapse": "Collapse",
"expand": "Expand"
},
diff --git a/frontend/src/i18n/locales/ja.json b/frontend/src/i18n/locales/ja.json
index 3f552d1bb..8ff741a91 100644
--- a/frontend/src/i18n/locales/ja.json
+++ b/frontend/src/i18n/locales/ja.json
@@ -19,6 +19,7 @@
"delete": "削除",
"light": "ライト",
"dark": "ダーク",
+ "language": "言語",
"collapse": "折りたたむ",
"expand": "展開"
},
diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json
index dc08376a9..9e1a38c3a 100644
--- a/frontend/src/i18n/locales/ko.json
+++ b/frontend/src/i18n/locales/ko.json
@@ -19,6 +19,7 @@
"delete": "삭제",
"light": "라이트",
"dark": "다크",
+ "language": "언어",
"collapse": "접기",
"expand": "펼치기"
},
diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json
index 106952d7b..70871c492 100644
--- a/frontend/src/i18n/locales/zh-CN.json
+++ b/frontend/src/i18n/locales/zh-CN.json
@@ -19,6 +19,7 @@
"delete": "删除",
"light": "亮色",
"dark": "暗色",
+ "language": "语言",
"collapse": "收起",
"expand": "展开"
},