feat: add i18n

This commit is contained in:
Henry Li
2026-01-24 22:19:37 +08:00
parent 2bdda01657
commit 869af570c9
5 changed files with 5 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ export function SkillSettingsPage() {
description={t.settings.skills.description} description={t.settings.skills.description}
> >
{isLoading ? ( {isLoading ? (
<div>Loading...</div> <div className="text-muted-foreground text-sm">{t.common.loading}</div>
) : error ? ( ) : error ? (
<div>Error: {error.message}</div> <div>Error: {error.message}</div>
) : ( ) : (

View File

@@ -24,7 +24,7 @@ export function ToolSettingsPage() {
description={t.settings.tools.description} description={t.settings.tools.description}
> >
{isLoading ? ( {isLoading ? (
<div>Loading...</div> <div className="text-muted-foreground text-sm">{t.common.loading}</div>
) : error ? ( ) : error ? (
<div>Error: {error.message}</div> <div>Error: {error.message}</div>
) : ( ) : (

View File

@@ -21,6 +21,7 @@ export const enUS: Translations = {
public: "Public", public: "Public",
custom: "Custom", custom: "Custom",
notAvailableInDemoMode: "Not available in demo mode", notAvailableInDemoMode: "Not available in demo mode",
loading: "Loading...",
}, },
// Welcome // Welcome

View File

@@ -19,6 +19,7 @@ export interface Translations {
public: string; public: string;
custom: string; custom: string;
notAvailableInDemoMode: string; notAvailableInDemoMode: string;
loading: string;
}; };
// Welcome // Welcome

View File

@@ -21,6 +21,7 @@ export const zhCN: Translations = {
public: "公共", public: "公共",
custom: "自定义", custom: "自定义",
notAvailableInDemoMode: "在演示模式下不可用", notAvailableInDemoMode: "在演示模式下不可用",
loading: "加载中...",
}, },
// Welcome // Welcome