From b27afd3f1b5f4dad97e3bb47fd6b7d6f1e340ce0 Mon Sep 17 00:00:00 2001 From: Kresna Date: Sun, 2 Aug 2026 17:52:06 +0700 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20search=20(=E2=8C=98K)=20now=20open?= =?UTF-8?q?s=20the=20tool=20in=20the=20current=20locale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CommandPalette navigated to the raw tool.route, dropping the /id/ prefix — so searching from an Indonesian page and clicking a result landed on the English tool. Now localizes via localizePath(tool.route, useLang()). Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01Ubfx4XocHcECaL8twp9zsr --- src/components/shell/CommandPalette.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/shell/CommandPalette.tsx b/src/components/shell/CommandPalette.tsx index c8bea87..0afb900 100644 --- a/src/components/shell/CommandPalette.tsx +++ b/src/components/shell/CommandPalette.tsx @@ -3,8 +3,11 @@ import { Command } from 'cmdk'; import { searchTools } from '@/registry/tools'; import { categories } from '@/registry/categories'; import { isTauri } from '@/services/platform'; +import { localizePath } from '@/i18n/config'; +import { useLang } from '@/i18n/shared'; export function CommandPalette() { + const lang = useLang(); const [open, setOpen] = useState(false); const [search, setSearch] = useState(''); const [isDesktop, setIsDesktop] = useState(false); @@ -75,7 +78,7 @@ export function CommandPalette() { key={tool.id} value={tool.name} onSelect={() => { - window.location.href = tool.route; + window.location.href = localizePath(tool.route, lang); }} className="flex cursor-pointer items-center gap-3 border-2 border-transparent px-3 py-2 data-[selected=true]:border-border data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground" >