feat: localize journal components to Chinese

This commit is contained in:
2026-07-07 23:51:35 +08:00
parent 9a41f541e9
commit 1ef41f04fc
12 changed files with 58 additions and 64 deletions
+10 -10
View File
@@ -31,7 +31,7 @@ export const ConnectionBar: Component = () => {
};
const handleDeleteSession = (id: string) => {
if (confirm(`Delete session "${id}"? This cannot be undone.`)) {
if (confirm(`确定要删除会话 "${id}"?此操作不可撤销。`)) {
deleteSession(id);
}
};
@@ -41,7 +41,7 @@ export const ConnectionBar: Component = () => {
await hydrateFromServer(id);
setSessionId(id);
} catch (e) {
setError("Failed to load session");
setError("无法加载会话");
}
};
@@ -54,7 +54,7 @@ export const ConnectionBar: Component = () => {
{/* Status row */}
<div class="flex items-center gap-2">
<span class="w-2 h-2 rounded-full bg-green-500" />
<span class="text-xs text-gray-500">connected</span>
<span class="text-xs text-gray-500"></span>
<Show when={stream.sessionId}>
<span class="text-xs font-mono bg-gray-100 px-1.5 py-0.5 rounded">
{stream.sessionName || stream.sessionId}
@@ -62,12 +62,12 @@ export const ConnectionBar: Component = () => {
</Show>
<div class="flex-1" />
<Show when={stream.myName !== "gm"}>
<span class="text-xs text-gray-400">Playing as {stream.myName}</span>
<span class="text-xs text-gray-400"> {stream.myName}</span>
</Show>
<button
onClick={handleDisconnect}
class="text-xs text-gray-400 hover:text-red-500"
title="Disconnect"
title="断开连接"
>
</button>
@@ -77,12 +77,12 @@ export const ConnectionBar: Component = () => {
<Show when={stream.myName === "gm"}>
<div class="space-y-1">
<div class="flex items-center gap-1">
<span class="text-xs text-gray-500">Sessions:</span>
<span class="text-xs text-gray-500"></span>
<button
onClick={() => setShowNewSession((v) => !v)}
class="text-xs text-blue-600 hover:underline"
>
+ new
+
</button>
</div>
@@ -92,7 +92,7 @@ export const ConnectionBar: Component = () => {
type="text"
value={newSessionName()}
onInput={(e) => setNewSessionName(e.currentTarget.value)}
placeholder="Session name"
placeholder="会话名称"
class="flex-1 border border-gray-300 rounded px-2 py-0.5 text-xs"
onKeyDown={(e) => e.key === "Enter" && handleCreateSession()}
/>
@@ -100,7 +100,7 @@ export const ConnectionBar: Component = () => {
onClick={handleCreateSession}
class="bg-green-600 text-white rounded px-2 py-0.5 text-xs hover:bg-green-700"
>
Create
Create Create
</button>
</div>
</Show>
@@ -126,7 +126,7 @@ export const ConnectionBar: Component = () => {
handleDeleteSession(id);
}}
class="text-gray-400 hover:text-red-500 text-xs"
title="Delete session"
title="删除会话"
>
</button>