-
+
handleWorktreeBranchChange(e.target.value)}
onKeyDown={(e) => {
@@ -713,11 +747,11 @@ export function BranchDropdown({
/>
-
+
setWorktreePath(e.target.value)}
className="flex-1"
@@ -734,7 +768,7 @@ export function BranchDropdown({
diff --git a/src/components/layout/command-dropdown.tsx b/src/components/layout/command-dropdown.tsx
index 1bcaa43..b5273d5 100644
--- a/src/components/layout/command-dropdown.tsx
+++ b/src/components/layout/command-dropdown.tsx
@@ -3,6 +3,7 @@
import { listen, type UnlistenFn } from "@tauri-apps/api/event"
import { useState, useEffect, useCallback, useMemo, useRef } from "react"
import { ChevronDown, Play, Plus, Square } from "lucide-react"
+import { useTranslations } from "next-intl"
import { Button } from "@/components/ui/button"
import {
DropdownMenu,
@@ -40,6 +41,7 @@ function setSelectedCommandId(folderId: number, cmdId: number) {
}
export function CommandDropdown() {
+ const t = useTranslations("Folder.commandDropdown")
const { folder } = useFolderContext()
const { createTerminalWithCommand } = useTerminalContext()
const [commands, setCommands] = useState
([])
@@ -273,7 +275,7 @@ export function CommandDropdown() {
if (!folder) return null
- // No commands → show "Add Command"
+ // No commands → show add command button
if (commands.length === 0) {
return (
<>
@@ -285,7 +287,7 @@ export function CommandDropdown() {
disabled={bootstrapping}
>
- {bootstrapping ? "Loading..." : "Add Command"}
+ {bootstrapping ? t("loading") : t("addCommand")}
setManageOpen(true)}>
- Manage Commands...
+ {t("manageCommands")}
@@ -341,8 +343,8 @@ export function CommandDropdown() {
onClick={handleRunOrStop}
title={
isActiveCommandRunning
- ? `Stop: ${activeCmd?.command}`
- : `Run: ${activeCmd?.command}`
+ ? t("stopCommandTitle", { command: activeCmd?.command ?? "" })
+ : t("runCommandTitle", { command: activeCmd?.command ?? "" })
}
>
{isActiveCommandRunning ? (
diff --git a/src/components/layout/command-manage-dialog.tsx b/src/components/layout/command-manage-dialog.tsx
index e950abb..b622d89 100644
--- a/src/components/layout/command-manage-dialog.tsx
+++ b/src/components/layout/command-manage-dialog.tsx
@@ -1,6 +1,7 @@
"use client"
import { useState, useEffect } from "react"
+import { useTranslations } from "next-intl"
import {
Dialog,
DialogContent,
@@ -41,6 +42,8 @@ export function CommandManageDialog({
commands,
onSaved,
}: CommandManageDialogProps) {
+ const t = useTranslations("Folder.commandDropdown.manageDialog")
+ const tCommon = useTranslations("Folder.common")
const [drafts, setDrafts] = useState([])
const [saving, setSaving] = useState(false)
@@ -115,13 +118,13 @@ export function CommandManageDialog({
-
提交消息
+
+ {t("commitMessage")}
+
)}
- 提交 ({selected.size})
+ {t("commitButton", { count: selected.size })}
@@ -932,24 +984,24 @@ export function CommitWorkspace({
{!diffFile ? (
<>
- HEAD
+ {t("head")}
↔
- Working Tree
+ {t("workingTree")}
- 点击文件名查看差异
+ {t("clickFileToDiff")}
>
) : loadingDiff ? (
<>
- HEAD
+ {t("head")}
↔
- Working Tree
+ {t("workingTree")}
- 加载差异...
+ {t("loadingDiff")}
>
) : (
@@ -957,8 +1009,8 @@ export function CommitWorkspace({
key={diffFile}
original={diffOriginal}
modified={diffModified}
- originalLabel="HEAD"
- modifiedLabel="Working Tree"
+ originalLabel={t("head")}
+ modifiedLabel={t("workingTree")}
language={diffLanguage}
className="h-full [&>div:first-child]:h-9 [&>div:first-child]:py-0"
/>
@@ -981,14 +1033,14 @@ export function CommitWorkspace({
- 取消
+ {tCommon("cancel")}
- 确认
+ {tCommon("confirm")}
diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json
index 601fff0..c7c24b9 100644
--- a/src/i18n/messages/en.json
+++ b/src/i18n/messages/en.json
@@ -711,6 +711,317 @@
"jumpToLine": "Jump to line {line}",
"noParsedDiffSections": "No parsed diff sections",
"loadingEditor": "Loading editor..."
+ },
+ "branchDropdown": {
+ "toasts": {
+ "commitCodeCompleted": "Code commit completed",
+ "committedFiles": "Committed {count, plural, one {# file} other {# files}}",
+ "taskCompleted": "{label} completed",
+ "taskFailed": "{label} failed",
+ "mergeNoNewCommits": "{branchName} has no new commits",
+ "mergedCommits": "Merged {count, plural, one {# commit} other {# commits}}",
+ "allFilesUpToDate": "All files are up to date",
+ "updatedFiles": "Updated {count, plural, one {# file} other {# files}}",
+ "openCommitWindowFailed": "Failed to open commit window",
+ "upstreamSet": "Upstream branch has been set",
+ "upstreamSetAndPushed": "Upstream branch set and pushed {count, plural, one {# commit} other {# commits}}",
+ "noCommitsToPush": "No commits to push",
+ "pushedCommits": "Pushed {count, plural, one {# commit} other {# commits}}"
+ },
+ "tasks": {
+ "newBranch": "Create branch {name}",
+ "newWorktree": "Create worktree {name}",
+ "checkoutTo": "Checkout to {branchName}",
+ "mergeBranch": "Merge {branchName}",
+ "rebaseTo": "Rebase to {branchName}",
+ "deleteBranch": "Delete branch {branchName}",
+ "initGitRepo": "Initialize Git repository",
+ "pullCode": "Pull code",
+ "fetchInfo": "Fetch info",
+ "pushCode": "Push code",
+ "stashChanges": "Stash changes",
+ "stashPop": "Pop stash"
+ },
+ "confirm": {
+ "mergeTitle": "Merge branch",
+ "rebaseTitle": "Rebase branch",
+ "deleteTitle": "Delete branch",
+ "mergeDescription": "Merge {branchName} into current branch {currentBranch}?",
+ "rebaseDescription": "Rebase current branch {currentBranch} onto {branchName}?",
+ "deleteDescription": "Delete branch {branchName}? This action cannot be undone."
+ },
+ "current": "Current",
+ "switchToBranch": "Switch to this branch",
+ "mergeBranchIntoCurrent": "Merge {branchName} into {currentBranch}",
+ "rebaseCurrentToBranch": "Rebase {currentBranch} onto {branchName}",
+ "deleteBranch": "Delete branch",
+ "versionControl": "Version Control",
+ "initGitRepo": "Initialize Git repository",
+ "pullCode": "Pull code",
+ "fetchRemoteBranches": "Fetch remote branches",
+ "openCommitWindow": "Commit code...",
+ "pushCode": "Push...",
+ "newBranch": "New branch...",
+ "newWorktree": "New worktree...",
+ "stashChanges": "Stash changes",
+ "stashPop": "Pop stash...",
+ "localBranches": "Local branches ({count, plural, one {#} other {#}})",
+ "noLocalBranches": "No local branches",
+ "remoteBranches": "Remote branches ({count, plural, one {#} other {#}})",
+ "noRemoteBranches": "No remote branches",
+ "parentBranchHint": "Current branch was created from {parentBranch}. Click to merge {parentBranch} into current branch.",
+ "dialogs": {
+ "newBranchTitle": "New branch",
+ "newBranchDescription": "Create a new branch from current branch {branch}",
+ "branchNamePlaceholder": "Branch name",
+ "newWorktreeTitle": "New worktree",
+ "newWorktreeDescription": "Create a new worktree from current branch {branch}",
+ "branchNameLabel": "Branch name",
+ "worktreePathLabel": "Worktree path",
+ "worktreePathPlaceholder": "Worktree path"
+ }
+ },
+ "commitDialog": {
+ "toasts": {
+ "commitCompleted": "Code commit completed",
+ "committedFiles": "Committed {count, plural, one {# file} other {# files}}",
+ "addedToVcs": "Added to VCS",
+ "addToVcsFailed": "Failed to add to VCS",
+ "fileDeleted": "File deleted",
+ "deleteFailed": "Delete failed",
+ "fileRolledBack": "File rolled back",
+ "rollbackFailed": "Rollback failed"
+ },
+ "confirm": {
+ "deleteTitle": "Confirm deletion",
+ "deleteDescription": "Delete file \"{file}\"? This action cannot be undone.",
+ "rollbackTitle": "Confirm rollback",
+ "rollbackDescription": "Rollback file \"{file}\" to HEAD? Unsaved changes will be lost."
+ },
+ "actions": {
+ "select": "Select",
+ "unselect": "Unselect",
+ "rollback": "Rollback",
+ "addToVcs": "Add to VCS"
+ },
+ "aria": {
+ "selectFile": "{action} {path}",
+ "unselectAllFiles": "Unselect all files",
+ "selectAllFiles": "Select all files",
+ "unselectTracked": "Unselect tracked changes",
+ "selectTracked": "Select tracked changes",
+ "unselectUntracked": "Unselect untracked files",
+ "selectUntracked": "Select untracked files"
+ },
+ "loading": "Loading...",
+ "selectionCount": "{selected} / {total} files",
+ "emptyFiles": "No changed files",
+ "trackedChanges": "Tracked changes ({count})",
+ "untrackedFiles": "Untracked files ({count})",
+ "commitMessage": "Commit message",
+ "commitMessagePlaceholder": "Enter commit message...",
+ "commitButton": "Commit ({count})",
+ "head": "HEAD",
+ "workingTree": "Working Tree",
+ "clickFileToDiff": "Click a file name to view diff",
+ "loadingDiff": "Loading diff..."
+ },
+ "gitLogTab": {
+ "filesTitle": "Files",
+ "expandAllFiles": "Expand all files",
+ "collapseAllFiles": "Collapse all files",
+ "workspace": "workspace",
+ "retry": "Retry",
+ "noCommitsFound": "No commits found",
+ "hash": "Hash",
+ "copyHash": "Copy hash",
+ "author": "Author",
+ "noFileChangeDetails": "No file change details available.",
+ "branchesTitle": "Branches",
+ "loadingBranches": "Loading branches...",
+ "noContainingBranches": "No containing branches found.",
+ "newBranch": "New branch...",
+ "viewCommitDiffAria": "View diff for commit {hash}",
+ "copyFullCommitHashAria": "Copy full commit hash {hash}",
+ "pushStatus": {
+ "pushed": "Pushed to remote",
+ "notPushed": "Not pushed to remote",
+ "unknown": "Push status unknown (no upstream configured)"
+ },
+ "time": {
+ "monthsAgo": "{count, plural, one {# month ago} other {# months ago}}",
+ "daysAgo": "{count, plural, one {# day ago} other {# days ago}}",
+ "hoursAgo": "{count, plural, one {# hour ago} other {# hours ago}}",
+ "minsAgo": "{count, plural, one {# min ago} other {# mins ago}}",
+ "justNow": "just now"
+ },
+ "toasts": {
+ "createdAndSwitchedNewBranch": "Created and switched to new branch",
+ "newBranchFromCommit": "{name} (from {shortHash})",
+ "createBranchFailed": "Failed to create branch"
+ },
+ "branchSelector": {
+ "selectBranchPlaceholder": "Select branch...",
+ "localBranches": "Local branches",
+ "current": "Current",
+ "remoteBranches": "Remote branches",
+ "refreshCommitHistory": "Refresh commit history"
+ },
+ "dialogs": {
+ "newBranchTitle": "New branch",
+ "newBranchDescription": "Create a new branch with commit {shortHash} as the latest commit.",
+ "branchNamePlaceholder": "Branch name"
+ }
+ },
+ "gitChangesTab": {
+ "workspace": "workspace",
+ "noChanges": "No local changes",
+ "trackedChanges": "Tracked changes ({count})",
+ "untrackedFiles": "Untracked files ({count})",
+ "expandTracked": "Expand tracked changes",
+ "collapseTracked": "Collapse tracked changes",
+ "expandUntracked": "Expand untracked files",
+ "collapseUntracked": "Collapse untracked files",
+ "actions": {
+ "rollback": "Rollback",
+ "addToVcs": "Add to VCS"
+ },
+ "toasts": {
+ "noAddableFilesInDir": "No changed files in this directory can be added to VCS",
+ "noRollbackFilesInDir": "No changed files in this directory can be rolled back",
+ "addedToVcs": "Added {name} to VCS",
+ "addToVcsFailed": "Failed to add to VCS",
+ "rolledBack": "Rolled back {name}",
+ "rollbackFailed": "Rollback failed",
+ "addedFilesToVcs": "Added {count, plural, one {# file} other {# files}} to VCS",
+ "rolledBackFiles": "Rolled back {count, plural, one {# file} other {# files}}"
+ },
+ "directoryDialog": {
+ "descriptionAdd": "Select files under directory {path} to add to VCS.",
+ "descriptionRollback": "Select files under directory {path} to roll back.",
+ "descriptionFallback": "Select files to proceed.",
+ "selectionCount": "Selected {selected} / {total} files",
+ "selectAll": "Select all",
+ "unselectAll": "Unselect all",
+ "loadingCandidates": "Loading directory changes...",
+ "noOperableFiles": "No operable files"
+ },
+ "rollbackConfirm": {
+ "title": "Confirm rollback",
+ "descriptionWithTarget": "Roll back local changes for {kind} \"{name}\"?",
+ "descriptionFallback": "Roll back local changes?",
+ "kindDirectory": "directory",
+ "kindFile": "file"
+ }
+ },
+ "fileTreeTab": {
+ "workspace": "Workspace",
+ "retry": "Retry",
+ "git": "Git",
+ "openInFileManager": "Open in file manager",
+ "openInFinder": "Open in Finder",
+ "openInExplorer": "Open in Explorer",
+ "attachToCurrentSession": "Attach to current session",
+ "compareWithBranch": "Compare with branch...",
+ "reloadFromDisk": "Reload from disk",
+ "openIn": "Open in",
+ "openInTerminal": "Open in terminal",
+ "actions": {
+ "select": "Select",
+ "unselect": "Unselect",
+ "rollback": "Rollback",
+ "addToVcs": "Add to VCS"
+ },
+ "aria": {
+ "selectPath": "{action} {path}"
+ },
+ "toasts": {
+ "openDirectoryFailed": "Failed to open directory",
+ "openBuiltinTerminalFailed": "Unable to open built-in terminal",
+ "noAddableFilesInDir": "No changed files in this directory can be added to VCS",
+ "noRollbackFilesInDir": "No changed files in this directory can be rolled back",
+ "addedToVcs": "Added {name} to VCS",
+ "addToVcsFailed": "Failed to add to VCS",
+ "loadBranchesFailed": "Failed to load branches",
+ "renameFailed": "Rename failed",
+ "deleteFailed": "Delete failed",
+ "rolledBack": "Rolled back {name}",
+ "rollbackFailed": "Rollback failed",
+ "addedFilesToVcs": "Added {count, plural, one {# file} other {# files}} to VCS",
+ "rolledBackFiles": "Rolled back {count, plural, one {# file} other {# files}}",
+ "savedAsCopy": "Saved as a copy",
+ "saveCopyFailed": "Failed to save as copy",
+ "watchStartFailed": "Failed to start file watch"
+ },
+ "renameDialog": {
+ "renameDirectory": "Rename directory",
+ "renameFile": "Rename file",
+ "description": "Enter a new name (name only, no path).",
+ "placeholderDirectory": "new-folder-name",
+ "placeholderFile": "new-file-name.ext"
+ },
+ "directoryDialog": {
+ "descriptionAdd": "Select files under directory {path} to add to VCS.",
+ "descriptionRollback": "Select files under directory {path} to roll back.",
+ "descriptionFallback": "Select files to proceed.",
+ "selectionCount": "Selected {selected} / {total} files",
+ "selectAll": "Select all",
+ "unselectAll": "Unselect all",
+ "loadingCandidates": "Loading directory changes...",
+ "noOperableFiles": "No operable files"
+ },
+ "compareDialog": {
+ "title": "Compare with branch",
+ "descriptionWithTarget": "Select a branch and compare with {kind} {path}",
+ "descriptionFallback": "Select a branch to compare.",
+ "kindDirectory": "directory",
+ "kindFile": "file",
+ "filterPlaceholder": "Filter branches, e.g. main / origin/main",
+ "singleClickHint": "Click a branch to compare directly",
+ "loadingBranches": "Loading branches...",
+ "recentBranches": "Recent branches ({count})",
+ "noCurrentBranch": "No current branch",
+ "localBranches": "Local branches ({count})",
+ "remoteBranches": "Remote branches ({count})",
+ "noMatchingBranches": "No matching branches"
+ },
+ "externalConflictDialog": {
+ "title": "External file changes detected",
+ "descriptionWithPath": "File {path} has changed on disk, and current edits are unsaved.",
+ "descriptionFallback": "Current file has changed on disk, and current edits are unsaved.",
+ "compare": "Compare",
+ "savingCopy": "Saving copy...",
+ "saveAsCopy": "Save as copy",
+ "reload": "Reload"
+ },
+ "deleteConfirm": {
+ "title": "Confirm deletion",
+ "descriptionWithTarget": "Delete {kind} \"{name}\"? This action cannot be undone.",
+ "descriptionFallback": "This action cannot be undone.",
+ "kindDirectory": "directory",
+ "kindFile": "file"
+ },
+ "rollbackConfirm": {
+ "title": "Confirm rollback",
+ "descriptionWithTarget": "Rollback local changes for file \"{name}\"?",
+ "descriptionFallback": "Rollback local changes for this file?"
+ },
+ "terminalTitle": "Terminal · {name}"
+ },
+ "commandDropdown": {
+ "loading": "Loading...",
+ "addCommand": "Add Command",
+ "manageCommands": "Manage Commands...",
+ "runCommandTitle": "Run: {command}",
+ "stopCommandTitle": "Stop: {command}",
+ "manageDialog": {
+ "title": "Manage Commands",
+ "empty": "No commands yet",
+ "namePlaceholder": "Name",
+ "commandPlaceholder": "Command",
+ "add": "Add",
+ "saving": "Saving..."
+ }
}
}
}
diff --git a/src/i18n/messages/zh-CN.json b/src/i18n/messages/zh-CN.json
index 20a5a4b..bde0c4b 100644
--- a/src/i18n/messages/zh-CN.json
+++ b/src/i18n/messages/zh-CN.json
@@ -711,6 +711,317 @@
"jumpToLine": "跳转到第 {line} 行",
"noParsedDiffSections": "未解析到差异区块",
"loadingEditor": "编辑器加载中..."
+ },
+ "branchDropdown": {
+ "toasts": {
+ "commitCodeCompleted": "提交代码完成",
+ "committedFiles": "已提交 {count} 个文件",
+ "taskCompleted": "{label} 完成",
+ "taskFailed": "{label} 失败",
+ "mergeNoNewCommits": "{branchName} 没有新的提交",
+ "mergedCommits": "已合并 {count} 个提交",
+ "allFilesUpToDate": "所有文件均为最新版本",
+ "updatedFiles": "已更新 {count} 个文件",
+ "openCommitWindowFailed": "打开提交窗口失败",
+ "upstreamSet": "已设置远程跟踪分支",
+ "upstreamSetAndPushed": "已设置远程跟踪分支并推送 {count} 个提交",
+ "noCommitsToPush": "没有可推送的提交",
+ "pushedCommits": "已推送 {count} 个提交"
+ },
+ "tasks": {
+ "newBranch": "新建分支 {name}",
+ "newWorktree": "新建工作树 {name}",
+ "checkoutTo": "切换到 {branchName}",
+ "mergeBranch": "合并 {branchName}",
+ "rebaseTo": "变基到 {branchName}",
+ "deleteBranch": "删除分支 {branchName}",
+ "initGitRepo": "初始化 Git 仓库",
+ "pullCode": "更新代码",
+ "fetchInfo": "获取信息",
+ "pushCode": "推送代码",
+ "stashChanges": "贮藏更改",
+ "stashPop": "取消贮藏"
+ },
+ "confirm": {
+ "mergeTitle": "合并分支",
+ "rebaseTitle": "变基分支",
+ "deleteTitle": "删除分支",
+ "mergeDescription": "确定将 {branchName} 合并到当前分支 {currentBranch} 吗?",
+ "rebaseDescription": "确定将当前分支 {currentBranch} 变基到 {branchName} 吗?",
+ "deleteDescription": "确定删除分支 {branchName} 吗?此操作不可恢复。"
+ },
+ "current": "当前",
+ "switchToBranch": "切换到此分支",
+ "mergeBranchIntoCurrent": "将 {branchName} 合并到 {currentBranch}",
+ "rebaseCurrentToBranch": "将 {currentBranch} 变基到 {branchName}",
+ "deleteBranch": "删除分支",
+ "versionControl": "版本控制",
+ "initGitRepo": "初始化 Git 仓库",
+ "pullCode": "更新代码",
+ "fetchRemoteBranches": "提取远程分支",
+ "openCommitWindow": "提交代码...",
+ "pushCode": "推送...",
+ "newBranch": "新建分支...",
+ "newWorktree": "新建工作树...",
+ "stashChanges": "贮藏更改",
+ "stashPop": "取消贮藏...",
+ "localBranches": "本地分支 ({count})",
+ "noLocalBranches": "无本地分支",
+ "remoteBranches": "远程分支 ({count})",
+ "noRemoteBranches": "无远程分支",
+ "parentBranchHint": "当前分支从 {parentBranch} 创建,点击合并 {parentBranch} 到当前分支",
+ "dialogs": {
+ "newBranchTitle": "新建分支",
+ "newBranchDescription": "从当前分支 {branch} 创建新分支",
+ "branchNamePlaceholder": "分支名称",
+ "newWorktreeTitle": "新建工作树",
+ "newWorktreeDescription": "从当前分支 {branch} 创建新的工作树",
+ "branchNameLabel": "分支名称",
+ "worktreePathLabel": "工作树路径",
+ "worktreePathPlaceholder": "工作树路径"
+ }
+ },
+ "commitDialog": {
+ "toasts": {
+ "commitCompleted": "提交代码完成",
+ "committedFiles": "已提交 {count} 个文件",
+ "addedToVcs": "已添加到 VCS",
+ "addToVcsFailed": "添加到 VCS 失败",
+ "fileDeleted": "文件已删除",
+ "deleteFailed": "删除失败",
+ "fileRolledBack": "文件已回滚",
+ "rollbackFailed": "回滚失败"
+ },
+ "confirm": {
+ "deleteTitle": "确认删除",
+ "deleteDescription": "确定要删除文件「{file}」吗?此操作不可恢复。",
+ "rollbackTitle": "确认回滚",
+ "rollbackDescription": "确定要回滚文件「{file}」到 HEAD 版本吗?未保存的修改将丢失。"
+ },
+ "actions": {
+ "select": "选择",
+ "unselect": "取消选择",
+ "rollback": "回滚",
+ "addToVcs": "添加到 VCS"
+ },
+ "aria": {
+ "selectFile": "{action} {path}",
+ "unselectAllFiles": "取消选择全部文件",
+ "selectAllFiles": "选择全部文件",
+ "unselectTracked": "取消选择已跟踪改动",
+ "selectTracked": "选择已跟踪改动",
+ "unselectUntracked": "取消选择未跟踪文件",
+ "selectUntracked": "选择未跟踪文件"
+ },
+ "loading": "加载中...",
+ "selectionCount": "{selected} / {total} 个文件",
+ "emptyFiles": "没有改动的文件",
+ "trackedChanges": "已跟踪改动 ({count})",
+ "untrackedFiles": "未跟踪文件 ({count})",
+ "commitMessage": "提交消息",
+ "commitMessagePlaceholder": "输入提交信息...",
+ "commitButton": "提交 ({count})",
+ "head": "HEAD",
+ "workingTree": "Working Tree",
+ "clickFileToDiff": "点击文件名查看差异",
+ "loadingDiff": "加载差异..."
+ },
+ "gitLogTab": {
+ "filesTitle": "Files",
+ "expandAllFiles": "展开全部文件",
+ "collapseAllFiles": "折叠全部文件",
+ "workspace": "工作区",
+ "retry": "重试",
+ "noCommitsFound": "未找到提交记录",
+ "hash": "Hash",
+ "copyHash": "复制哈希",
+ "author": "作者",
+ "noFileChangeDetails": "暂无文件变更详情。",
+ "branchesTitle": "分支",
+ "loadingBranches": "正在加载分支...",
+ "noContainingBranches": "未找到包含此提交的分支。",
+ "newBranch": "新建分支...",
+ "viewCommitDiffAria": "查看提交 {hash} 的差异",
+ "copyFullCommitHashAria": "复制完整提交哈希 {hash}",
+ "pushStatus": {
+ "pushed": "已推送到远程",
+ "notPushed": "未推送到远程",
+ "unknown": "推送状态未知(未配置上游分支)"
+ },
+ "time": {
+ "monthsAgo": "{count} 个月前",
+ "daysAgo": "{count} 天前",
+ "hoursAgo": "{count} 小时前",
+ "minsAgo": "{count} 分钟前",
+ "justNow": "刚刚"
+ },
+ "toasts": {
+ "createdAndSwitchedNewBranch": "已创建并切换到新分支",
+ "newBranchFromCommit": "{name}(来自 {shortHash})",
+ "createBranchFailed": "新建分支失败"
+ },
+ "branchSelector": {
+ "selectBranchPlaceholder": "选择分支...",
+ "localBranches": "本地分支",
+ "current": "当前",
+ "remoteBranches": "远程分支",
+ "refreshCommitHistory": "刷新提交记录"
+ },
+ "dialogs": {
+ "newBranchTitle": "新建分支",
+ "newBranchDescription": "以提交 {shortHash} 作为最后提交创建新分支。",
+ "branchNamePlaceholder": "分支名称"
+ }
+ },
+ "gitChangesTab": {
+ "workspace": "工作区",
+ "noChanges": "暂无本地改动",
+ "trackedChanges": "本地已跟踪改动 ({count})",
+ "untrackedFiles": "本地未跟踪文件 ({count})",
+ "expandTracked": "展开已跟踪改动",
+ "collapseTracked": "折叠已跟踪改动",
+ "expandUntracked": "展开未跟踪文件",
+ "collapseUntracked": "折叠未跟踪文件",
+ "actions": {
+ "rollback": "回滚",
+ "addToVcs": "添加到 VCS"
+ },
+ "toasts": {
+ "noAddableFilesInDir": "该目录下没有可添加到 VCS 的变更文件",
+ "noRollbackFilesInDir": "该目录下没有可回滚的变更文件",
+ "addedToVcs": "已添加 {name} 到 VCS",
+ "addToVcsFailed": "添加到 VCS 失败",
+ "rolledBack": "已回滚 {name}",
+ "rollbackFailed": "回滚失败",
+ "addedFilesToVcs": "已添加 {count} 个文件到 VCS",
+ "rolledBackFiles": "已回滚 {count} 个文件"
+ },
+ "directoryDialog": {
+ "descriptionAdd": "选择目录 {path} 下要添加到 VCS 的文件。",
+ "descriptionRollback": "选择目录 {path} 下要回滚的文件。",
+ "descriptionFallback": "选择要操作的文件。",
+ "selectionCount": "已选择 {selected} / {total} 个文件",
+ "selectAll": "全选",
+ "unselectAll": "取消全选",
+ "loadingCandidates": "正在加载目录变更...",
+ "noOperableFiles": "没有可操作的文件"
+ },
+ "rollbackConfirm": {
+ "title": "确认回滚",
+ "descriptionWithTarget": "确定回滚{kind}「{name}」的本地修改吗?",
+ "descriptionFallback": "确定回滚本地修改吗?",
+ "kindDirectory": "目录",
+ "kindFile": "文件"
+ }
+ },
+ "fileTreeTab": {
+ "workspace": "工作区",
+ "retry": "重试",
+ "git": "Git",
+ "openInFileManager": "在文件管理器打开",
+ "openInFinder": "在访达打开",
+ "openInExplorer": "在资源管理器打开",
+ "attachToCurrentSession": "附加到当前会话",
+ "compareWithBranch": "与分支比较...",
+ "reloadFromDisk": "从磁盘重新加载",
+ "openIn": "打开于",
+ "openInTerminal": "在终端打开",
+ "actions": {
+ "select": "选择",
+ "unselect": "取消选择",
+ "rollback": "回滚",
+ "addToVcs": "添加到 VCS"
+ },
+ "aria": {
+ "selectPath": "{action} {path}"
+ },
+ "toasts": {
+ "openDirectoryFailed": "打开目录失败",
+ "openBuiltinTerminalFailed": "无法打开内置终端",
+ "noAddableFilesInDir": "该目录下没有可添加到 VCS 的变更文件",
+ "noRollbackFilesInDir": "该目录下没有可回滚的变更文件",
+ "addedToVcs": "已添加 {name} 到 VCS",
+ "addToVcsFailed": "添加到 VCS 失败",
+ "loadBranchesFailed": "加载分支失败",
+ "renameFailed": "重命名失败",
+ "deleteFailed": "删除失败",
+ "rolledBack": "已回滚 {name}",
+ "rollbackFailed": "回滚失败",
+ "addedFilesToVcs": "已添加 {count} 个文件到 VCS",
+ "rolledBackFiles": "已回滚 {count} 个文件",
+ "savedAsCopy": "已另存为副本",
+ "saveCopyFailed": "另存为副本失败",
+ "watchStartFailed": "文件监听启动失败"
+ },
+ "renameDialog": {
+ "renameDirectory": "重命名目录",
+ "renameFile": "重命名文件",
+ "description": "输入新的名称(仅名称,不含路径)。",
+ "placeholderDirectory": "new-folder-name",
+ "placeholderFile": "new-file-name.ext"
+ },
+ "directoryDialog": {
+ "descriptionAdd": "选择目录 {path} 下要添加到 VCS 的文件。",
+ "descriptionRollback": "选择目录 {path} 下要回滚的文件。",
+ "descriptionFallback": "选择要操作的文件。",
+ "selectionCount": "已选择 {selected} / {total} 个文件",
+ "selectAll": "全选",
+ "unselectAll": "取消全选",
+ "loadingCandidates": "正在加载目录变更...",
+ "noOperableFiles": "没有可操作的文件"
+ },
+ "compareDialog": {
+ "title": "与分支比较",
+ "descriptionWithTarget": "选择分支并与{kind} {path} 对比",
+ "descriptionFallback": "选择要比较的分支。",
+ "kindDirectory": "目录",
+ "kindFile": "文件",
+ "filterPlaceholder": "过滤分支,例如 main / origin/main",
+ "singleClickHint": "单击分支即可直接比较",
+ "loadingBranches": "正在加载分支...",
+ "recentBranches": "最近分支 ({count})",
+ "noCurrentBranch": "无当前分支",
+ "localBranches": "本地分支 ({count})",
+ "remoteBranches": "远程分支 ({count})",
+ "noMatchingBranches": "无匹配分支"
+ },
+ "externalConflictDialog": {
+ "title": "检测到外部文件变更",
+ "descriptionWithPath": "文件 {path} 在磁盘已发生变化,当前编辑内容尚未保存。",
+ "descriptionFallback": "当前文件在磁盘已发生变化,当前编辑内容尚未保存。",
+ "compare": "对比",
+ "savingCopy": "另存中...",
+ "saveAsCopy": "另存为副本",
+ "reload": "重载"
+ },
+ "deleteConfirm": {
+ "title": "确认删除",
+ "descriptionWithTarget": "确定删除{kind} \"{name}\" 吗?此操作不可撤销。",
+ "descriptionFallback": "此操作不可撤销。",
+ "kindDirectory": "目录",
+ "kindFile": "文件"
+ },
+ "rollbackConfirm": {
+ "title": "确认回滚",
+ "descriptionWithTarget": "确定回滚文件 \"{name}\" 的本地修改吗?",
+ "descriptionFallback": "确定回滚该文件的本地修改吗?"
+ },
+ "terminalTitle": "终端 · {name}"
+ },
+ "commandDropdown": {
+ "loading": "加载中...",
+ "addCommand": "添加命令",
+ "manageCommands": "管理命令...",
+ "runCommandTitle": "运行:{command}",
+ "stopCommandTitle": "停止:{command}",
+ "manageDialog": {
+ "title": "管理命令",
+ "empty": "暂无命令",
+ "namePlaceholder": "名称",
+ "commandPlaceholder": "命令",
+ "add": "添加",
+ "saving": "保存中..."
+ }
}
}
}
diff --git a/src/i18n/messages/zh-TW.json b/src/i18n/messages/zh-TW.json
index 1eca708..f218879 100644
--- a/src/i18n/messages/zh-TW.json
+++ b/src/i18n/messages/zh-TW.json
@@ -711,6 +711,317 @@
"jumpToLine": "跳到第 {line} 行",
"noParsedDiffSections": "未解析到差異區塊",
"loadingEditor": "編輯器載入中..."
+ },
+ "branchDropdown": {
+ "toasts": {
+ "commitCodeCompleted": "提交程式碼完成",
+ "committedFiles": "已提交 {count} 個檔案",
+ "taskCompleted": "{label} 完成",
+ "taskFailed": "{label} 失敗",
+ "mergeNoNewCommits": "{branchName} 沒有新的提交",
+ "mergedCommits": "已合併 {count} 個提交",
+ "allFilesUpToDate": "所有檔案均為最新版本",
+ "updatedFiles": "已更新 {count} 個檔案",
+ "openCommitWindowFailed": "打開提交視窗失敗",
+ "upstreamSet": "已設定遠端追蹤分支",
+ "upstreamSetAndPushed": "已設定遠端追蹤分支並推送 {count} 個提交",
+ "noCommitsToPush": "沒有可推送的提交",
+ "pushedCommits": "已推送 {count} 個提交"
+ },
+ "tasks": {
+ "newBranch": "新增分支 {name}",
+ "newWorktree": "新增工作樹 {name}",
+ "checkoutTo": "切換到 {branchName}",
+ "mergeBranch": "合併 {branchName}",
+ "rebaseTo": "變基到 {branchName}",
+ "deleteBranch": "刪除分支 {branchName}",
+ "initGitRepo": "初始化 Git 倉庫",
+ "pullCode": "更新程式碼",
+ "fetchInfo": "獲取資訊",
+ "pushCode": "推送程式碼",
+ "stashChanges": "暫存變更",
+ "stashPop": "取消暫存"
+ },
+ "confirm": {
+ "mergeTitle": "合併分支",
+ "rebaseTitle": "變基分支",
+ "deleteTitle": "刪除分支",
+ "mergeDescription": "確定將 {branchName} 合併到目前分支 {currentBranch} 嗎?",
+ "rebaseDescription": "確定將目前分支 {currentBranch} 變基到 {branchName} 嗎?",
+ "deleteDescription": "確定刪除分支 {branchName} 嗎?此操作無法復原。"
+ },
+ "current": "目前",
+ "switchToBranch": "切換到此分支",
+ "mergeBranchIntoCurrent": "將 {branchName} 合併到 {currentBranch}",
+ "rebaseCurrentToBranch": "將 {currentBranch} 變基到 {branchName}",
+ "deleteBranch": "刪除分支",
+ "versionControl": "版本控制",
+ "initGitRepo": "初始化 Git 倉庫",
+ "pullCode": "更新程式碼",
+ "fetchRemoteBranches": "提取遠端分支",
+ "openCommitWindow": "提交程式碼...",
+ "pushCode": "推送...",
+ "newBranch": "新增分支...",
+ "newWorktree": "新增工作樹...",
+ "stashChanges": "暫存變更",
+ "stashPop": "取消暫存...",
+ "localBranches": "本地分支 ({count})",
+ "noLocalBranches": "無本地分支",
+ "remoteBranches": "遠端分支 ({count})",
+ "noRemoteBranches": "無遠端分支",
+ "parentBranchHint": "目前分支從 {parentBranch} 建立,點擊合併 {parentBranch} 到目前分支",
+ "dialogs": {
+ "newBranchTitle": "新增分支",
+ "newBranchDescription": "從目前分支 {branch} 建立新分支",
+ "branchNamePlaceholder": "分支名稱",
+ "newWorktreeTitle": "新增工作樹",
+ "newWorktreeDescription": "從目前分支 {branch} 建立新的工作樹",
+ "branchNameLabel": "分支名稱",
+ "worktreePathLabel": "工作樹路徑",
+ "worktreePathPlaceholder": "工作樹路徑"
+ }
+ },
+ "commitDialog": {
+ "toasts": {
+ "commitCompleted": "提交程式碼完成",
+ "committedFiles": "已提交 {count} 個檔案",
+ "addedToVcs": "已加入到 VCS",
+ "addToVcsFailed": "加入到 VCS 失敗",
+ "fileDeleted": "檔案已刪除",
+ "deleteFailed": "刪除失敗",
+ "fileRolledBack": "檔案已回滾",
+ "rollbackFailed": "回滾失敗"
+ },
+ "confirm": {
+ "deleteTitle": "確認刪除",
+ "deleteDescription": "確定要刪除檔案「{file}」嗎?此操作無法復原。",
+ "rollbackTitle": "確認回滾",
+ "rollbackDescription": "確定要回滾檔案「{file}」到 HEAD 版本嗎?未儲存修改將遺失。"
+ },
+ "actions": {
+ "select": "選擇",
+ "unselect": "取消選擇",
+ "rollback": "回滾",
+ "addToVcs": "加入到 VCS"
+ },
+ "aria": {
+ "selectFile": "{action} {path}",
+ "unselectAllFiles": "取消選擇全部檔案",
+ "selectAllFiles": "選擇全部檔案",
+ "unselectTracked": "取消選擇已追蹤變更",
+ "selectTracked": "選擇已追蹤變更",
+ "unselectUntracked": "取消選擇未追蹤檔案",
+ "selectUntracked": "選擇未追蹤檔案"
+ },
+ "loading": "載入中...",
+ "selectionCount": "{selected} / {total} 個檔案",
+ "emptyFiles": "沒有變更的檔案",
+ "trackedChanges": "已追蹤變更 ({count})",
+ "untrackedFiles": "未追蹤檔案 ({count})",
+ "commitMessage": "提交訊息",
+ "commitMessagePlaceholder": "輸入提交訊息...",
+ "commitButton": "提交 ({count})",
+ "head": "HEAD",
+ "workingTree": "Working Tree",
+ "clickFileToDiff": "點擊檔案名稱查看差異",
+ "loadingDiff": "載入差異中..."
+ },
+ "gitLogTab": {
+ "filesTitle": "Files",
+ "expandAllFiles": "展開全部檔案",
+ "collapseAllFiles": "折疊全部檔案",
+ "workspace": "工作區",
+ "retry": "重試",
+ "noCommitsFound": "未找到提交記錄",
+ "hash": "Hash",
+ "copyHash": "複製雜湊",
+ "author": "作者",
+ "noFileChangeDetails": "暫無檔案變更詳情。",
+ "branchesTitle": "分支",
+ "loadingBranches": "正在載入分支...",
+ "noContainingBranches": "未找到包含此提交的分支。",
+ "newBranch": "新增分支...",
+ "viewCommitDiffAria": "查看提交 {hash} 的差異",
+ "copyFullCommitHashAria": "複製完整提交雜湊 {hash}",
+ "pushStatus": {
+ "pushed": "已推送到遠端",
+ "notPushed": "未推送到遠端",
+ "unknown": "推送狀態未知(未配置上游分支)"
+ },
+ "time": {
+ "monthsAgo": "{count} 個月前",
+ "daysAgo": "{count} 天前",
+ "hoursAgo": "{count} 小時前",
+ "minsAgo": "{count} 分鐘前",
+ "justNow": "剛剛"
+ },
+ "toasts": {
+ "createdAndSwitchedNewBranch": "已建立並切換到新分支",
+ "newBranchFromCommit": "{name}(來自 {shortHash})",
+ "createBranchFailed": "新增分支失敗"
+ },
+ "branchSelector": {
+ "selectBranchPlaceholder": "選擇分支...",
+ "localBranches": "本地分支",
+ "current": "目前",
+ "remoteBranches": "遠端分支",
+ "refreshCommitHistory": "刷新提交記錄"
+ },
+ "dialogs": {
+ "newBranchTitle": "新增分支",
+ "newBranchDescription": "以提交 {shortHash} 作為最後提交建立新分支。",
+ "branchNamePlaceholder": "分支名稱"
+ }
+ },
+ "gitChangesTab": {
+ "workspace": "工作區",
+ "noChanges": "暫無本地變更",
+ "trackedChanges": "本地已追蹤變更 ({count})",
+ "untrackedFiles": "本地未追蹤檔案 ({count})",
+ "expandTracked": "展開已追蹤變更",
+ "collapseTracked": "折疊已追蹤變更",
+ "expandUntracked": "展開未追蹤檔案",
+ "collapseUntracked": "折疊未追蹤檔案",
+ "actions": {
+ "rollback": "回滾",
+ "addToVcs": "加入到 VCS"
+ },
+ "toasts": {
+ "noAddableFilesInDir": "該目錄下沒有可加入到 VCS 的變更檔案",
+ "noRollbackFilesInDir": "該目錄下沒有可回滾的變更檔案",
+ "addedToVcs": "已加入 {name} 到 VCS",
+ "addToVcsFailed": "加入到 VCS 失敗",
+ "rolledBack": "已回滾 {name}",
+ "rollbackFailed": "回滾失敗",
+ "addedFilesToVcs": "已加入 {count} 個檔案到 VCS",
+ "rolledBackFiles": "已回滾 {count} 個檔案"
+ },
+ "directoryDialog": {
+ "descriptionAdd": "選擇目錄 {path} 下要加入到 VCS 的檔案。",
+ "descriptionRollback": "選擇目錄 {path} 下要回滾的檔案。",
+ "descriptionFallback": "選擇要操作的檔案。",
+ "selectionCount": "已選擇 {selected} / {total} 個檔案",
+ "selectAll": "全選",
+ "unselectAll": "取消全選",
+ "loadingCandidates": "正在載入目錄變更...",
+ "noOperableFiles": "沒有可操作的檔案"
+ },
+ "rollbackConfirm": {
+ "title": "確認回滾",
+ "descriptionWithTarget": "確定回滾{kind}「{name}」的本地修改嗎?",
+ "descriptionFallback": "確定回滾本地修改嗎?",
+ "kindDirectory": "目錄",
+ "kindFile": "檔案"
+ }
+ },
+ "fileTreeTab": {
+ "workspace": "工作區",
+ "retry": "重試",
+ "git": "Git",
+ "openInFileManager": "在檔案管理器開啟",
+ "openInFinder": "在 Finder 開啟",
+ "openInExplorer": "在檔案總管開啟",
+ "attachToCurrentSession": "附加到目前會話",
+ "compareWithBranch": "與分支比較...",
+ "reloadFromDisk": "從磁碟重新載入",
+ "openIn": "開啟於",
+ "openInTerminal": "在終端開啟",
+ "actions": {
+ "select": "選擇",
+ "unselect": "取消選擇",
+ "rollback": "回滾",
+ "addToVcs": "加入到 VCS"
+ },
+ "aria": {
+ "selectPath": "{action} {path}"
+ },
+ "toasts": {
+ "openDirectoryFailed": "開啟目錄失敗",
+ "openBuiltinTerminalFailed": "無法開啟內建終端",
+ "noAddableFilesInDir": "該目錄下沒有可加入到 VCS 的變更檔案",
+ "noRollbackFilesInDir": "該目錄下沒有可回滾的變更檔案",
+ "addedToVcs": "已加入 {name} 到 VCS",
+ "addToVcsFailed": "加入到 VCS 失敗",
+ "loadBranchesFailed": "載入分支失敗",
+ "renameFailed": "重新命名失敗",
+ "deleteFailed": "刪除失敗",
+ "rolledBack": "已回滾 {name}",
+ "rollbackFailed": "回滾失敗",
+ "addedFilesToVcs": "已加入 {count} 個檔案到 VCS",
+ "rolledBackFiles": "已回滾 {count} 個檔案",
+ "savedAsCopy": "已另存為副本",
+ "saveCopyFailed": "另存為副本失敗",
+ "watchStartFailed": "檔案監聽啟動失敗"
+ },
+ "renameDialog": {
+ "renameDirectory": "重新命名目錄",
+ "renameFile": "重新命名檔案",
+ "description": "輸入新的名稱(僅名稱,不含路徑)。",
+ "placeholderDirectory": "new-folder-name",
+ "placeholderFile": "new-file-name.ext"
+ },
+ "directoryDialog": {
+ "descriptionAdd": "選擇目錄 {path} 下要加入到 VCS 的檔案。",
+ "descriptionRollback": "選擇目錄 {path} 下要回滾的檔案。",
+ "descriptionFallback": "選擇要操作的檔案。",
+ "selectionCount": "已選擇 {selected} / {total} 個檔案",
+ "selectAll": "全選",
+ "unselectAll": "取消全選",
+ "loadingCandidates": "正在載入目錄變更...",
+ "noOperableFiles": "沒有可操作的檔案"
+ },
+ "compareDialog": {
+ "title": "與分支比較",
+ "descriptionWithTarget": "選擇分支並與{kind} {path} 比對",
+ "descriptionFallback": "選擇要比較的分支。",
+ "kindDirectory": "目錄",
+ "kindFile": "檔案",
+ "filterPlaceholder": "過濾分支,例如 main / origin/main",
+ "singleClickHint": "單擊分支即可直接比較",
+ "loadingBranches": "正在載入分支...",
+ "recentBranches": "最近分支 ({count})",
+ "noCurrentBranch": "無目前分支",
+ "localBranches": "本地分支 ({count})",
+ "remoteBranches": "遠端分支 ({count})",
+ "noMatchingBranches": "無匹配分支"
+ },
+ "externalConflictDialog": {
+ "title": "偵測到外部檔案變更",
+ "descriptionWithPath": "檔案 {path} 在磁碟已發生變化,目前編輯內容尚未儲存。",
+ "descriptionFallback": "目前檔案在磁碟已發生變化,目前編輯內容尚未儲存。",
+ "compare": "比較",
+ "savingCopy": "另存中...",
+ "saveAsCopy": "另存為副本",
+ "reload": "重載"
+ },
+ "deleteConfirm": {
+ "title": "確認刪除",
+ "descriptionWithTarget": "確定刪除{kind} \"{name}\" 嗎?此操作不可撤銷。",
+ "descriptionFallback": "此操作不可撤銷。",
+ "kindDirectory": "目錄",
+ "kindFile": "檔案"
+ },
+ "rollbackConfirm": {
+ "title": "確認回滾",
+ "descriptionWithTarget": "確定回滾檔案 \"{name}\" 的本地修改嗎?",
+ "descriptionFallback": "確定回滾該檔案的本地修改嗎?"
+ },
+ "terminalTitle": "終端 · {name}"
+ },
+ "commandDropdown": {
+ "loading": "載入中...",
+ "addCommand": "新增命令",
+ "manageCommands": "管理命令...",
+ "runCommandTitle": "執行:{command}",
+ "stopCommandTitle": "停止:{command}",
+ "manageDialog": {
+ "title": "管理命令",
+ "empty": "暫無命令",
+ "namePlaceholder": "名稱",
+ "commandPlaceholder": "命令",
+ "add": "新增",
+ "saving": "儲存中..."
+ }
}
}
}