Skip to content

CodexBar 是一个 macOS 菜单栏应用,用于查看本机 Codex 账号状态、额度、Token 用量、详细统计信息

refactor: 统一多语言资源与调用方式

Bobfd38e5dec33b
diff --git a/CodexBar/App/CodexBarApp.swift b/CodexBar/App/CodexBarApp.swift
index 7f9cb65..931a592 100644
--- a/CodexBar/App/CodexBarApp.swift
+++ b/CodexBar/App/CodexBarApp.swift
@@ -23,7 +23,7 @@ struct CodexBarApp: App {
}
.commands {
CommandGroup(replacing: .appSettings) {
- Button(.appCommandSettings) {
+ Button("app.command.settings") {
appDelegate.openSettingsFromCommand()
}
.keyboardShortcut(",", modifiers: .command)
diff --git a/CodexBar/Controllers/LogWindowController.swift b/CodexBar/Controllers/LogWindowController.swift
index 644ca52..8a3bb90 100644
--- a/CodexBar/Controllers/LogWindowController.swift
+++ b/CodexBar/Controllers/LogWindowController.swift
@@ -18,7 +18,7 @@ final class LogWindowController: HostingWindowController {
let hostingController = NSHostingController(rootView: LogView(store: store))
let window = AuxiliaryHostingWindow(contentViewController: hostingController)
- window.title = String(localized: "CodexBar 日志")
+ window.title = String(localized: "log.window.title")
window.styleMask = [.titled, .closable, .miniaturizable, .resizable]
window.contentMinSize = Metrics.minimumContentSize
window.setContentSize(Metrics.defaultContentSize)
diff --git a/CodexBar/Controllers/SettingsWindowController.swift b/CodexBar/Controllers/SettingsWindowController.swift
index 5614a7c..658447b 100644
--- a/CodexBar/Controllers/SettingsWindowController.swift
+++ b/CodexBar/Controllers/SettingsWindowController.swift
@@ -88,7 +88,7 @@ final class SettingsWindowController: HostingWindowController {
hostingController.sizingOptions = []
let window = AuxiliaryHostingWindow(contentViewController: hostingController)
- window.title = String(localized: "CodexBar 设置")
+ window.title = String(localized: "settings.window.title")
window.styleMask = [.titled, .closable, .miniaturizable]
window.contentMinSize = Metrics.minimumContentSize
window.setContentSize(Metrics.initialContentSize)
diff --git a/CodexBar/Controllers/StatusItemController.swift b/CodexBar/Controllers/StatusItemController.swift
index de8a4ae..aa592eb 100644
--- a/CodexBar/Controllers/StatusItemController.swift
+++ b/CodexBar/Controllers/StatusItemController.swift
@@ -337,7 +337,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {
func toolTip(at now: Date) -> String? {
var lines: [String] = []
if usesErrorImage {
- lines.append(String(localized: "Codex 账号异常"))
+ lines.append(String(localized: "codex-status.account.unavailable"))
}
if let activityText = activityToolTip(at: now) {
@@ -345,7 +345,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {
}
if activity.activeCount > 1 {
lines.append(
- String(localized: "等待 \(activity.waitingCount) • 运行 \(activity.runningCount)")
+ String(localized: "status-item.activity-summary", defaultValue: "\(activity.waitingCount, specifier: "%lld")\(activity.runningCount, specifier: "%lld")")
)
}
if let progress {
@@ -357,7 +357,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {
private func activityToolTip(at now: Date) -> String? {
switch activity.primaryActivity {
case let .waiting(task):
- var text = String(localized: "Codex 等待批准")
+ var text = String(localized: "activity.status.codex-waiting-for-approval")
if let projectName = task.projectName {
text += " • \(projectName)"
}
@@ -367,7 +367,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {
text += " • \(CodexActivityDisplayFormat.waitingDurationFragment(since: task.stateChangedAt, now: now))"
return text
case let .running(task):
- var text = String(localized: "Codex 正在运行")
+ var text = String(localized: "activity.status.codex-running")
if let projectName = task.projectName {
text += " • \(projectName)"
}
@@ -376,7 +376,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {
}
return text
case .completed(let completion, highlighted: true):
- var text = String(localized: "Codex 刚刚完成")
+ var text = String(localized: "activity.status.codex-just-completed")
if let projectName = completion.projectName {
text += " • \(projectName)"
}
@@ -418,7 +418,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {
var toolTip: String {
let percentText = CodexPercentageFormat.string(from: percent)
- return String(localized: "\(label) 剩余 \(percentText)")
+ return String(localized: "quota.status.remaining", defaultValue: "\(label)\(percentText)")
}
init?(snapshot: CodexQuotaSnapshot?, selection: MenuBarQuotaSelection) {
@@ -674,10 +674,10 @@ final class StatusItemController: NSObject, NSMenuDelegate {
private func hotKeyConflictMessage(for shortcut: GlobalHotKeyShortcut) -> String {
if shortcut == .default {
- return String(localized: "默认快捷键 \(shortcut.label) 已被占用")
+ return String(localized: "hotkey.error.default-in-use", defaultValue: "\(shortcut.label)")
}
- return String(localized: "快捷键已被占用")
+ return String(localized: "hotkey.error.in-use")
}
// MARK: - 菜单栏图标
@@ -975,14 +975,14 @@ final class StatusItemController: NSObject, NSMenuDelegate {
let menu = NSMenu()
menu.addItem(menuItem(
- title: "设置",
+ title: "app.menu.settings",
action: #selector(openSettings),
keyEquivalent: ",",
symbolName: "gearshape"
))
menu.addItem(menuItem(
- title: "日志",
+ title: "app.menu.log",
action: #selector(openLog),
keyEquivalent: "l",
symbolName: "doc.text.magnifyingglass"
@@ -991,7 +991,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {
menu.addItem(.separator())
menu.addItem(menuItem(
- title: "退出",
+ title: "common.action.quit",
action: #selector(quit),
keyEquivalent: "q",
symbolName: "power"
diff --git a/CodexBar/Models/CodexActivityModels.swift b/CodexBar/Models/CodexActivityModels.swift
index 7f153d4..24475a6 100644
--- a/CodexBar/Models/CodexActivityModels.swift
+++ b/CodexBar/Models/CodexActivityModels.swift
@@ -202,23 +202,23 @@ nonisolated enum CodexActivityDisplayFormat {
static func eventText(for task: CodexActivityTaskSnapshot) -> String {
switch task.latestEvent {
case .promptSubmitted:
- String(localized: "正在思考")
+ String(localized: "activity.event.thinking")
case .toolStarted:
- task.toolName.map { String(localized: "调用工具 \($0)") }
- ?? String(localized: "调用工具")
+ task.toolName.map { String(localized: "activity.event.using-named-tool", defaultValue: "\($0)") }
+ ?? String(localized: "activity.event.using-tool")
case .toolFinished:
- task.toolName.map { String(localized: "调用工具 \($0) 完成") }
- ?? String(localized: "调用工具完成")
+ task.toolName.map { String(localized: "activity.event.finished-using-tool", defaultValue: "\($0)") }
+ ?? String(localized: "activity.event.tool-completed")
case .compactionStarted:
- String(localized: "压缩上下文")
+ String(localized: "activity.event.compacting-context")
case .compactionFinished:
- String(localized: "上下文压缩完成")
+ String(localized: "activity.event.context-compaction-completed")
case .subagentStarted:
- String(localized: "启动子智能体")
+ String(localized: "activity.event.starting-subagent")
case .subagentFinished:
- String(localized: "子智能体完成")
+ String(localized: "activity.event.subagent-completed")
case .approvalRequested:
- String(localized: "等待批准")
+ String(localized: "activity.status.waiting-for-approval")
}
}
@@ -233,17 +233,17 @@ nonisolated enum CodexActivityDisplayFormat {
/// 活动卡片, 任务中心, 菜单栏 tooltip 和系统通知共用的时长片段
static func waitingDurationFragment(since stateChangedAt: Date, now: Date) -> String {
let duration = CodexDurationFormat.activityText(for: now.timeIntervalSince(stateChangedAt))
- return String(localized: "已等待 \(duration)")
+ return String(localized: "activity.duration.waiting", defaultValue: "\(duration)")
}
static func runningDurationFragment(since startedAt: Date, now: Date) -> String {
let duration = CodexDurationFormat.activityText(for: now.timeIntervalSince(startedAt))
- return String(localized: "已运行 \(duration)")
+ return String(localized: "activity.duration.running", defaultValue: "\(duration)")
}
static func elapsedDurationFragment(for duration: TimeInterval) -> String {
let durationText = CodexDurationFormat.activityText(for: duration)
- return String(localized: "耗时 \(durationText)")
+ return String(localized: "activity.duration.elapsed", defaultValue: "\(durationText)")
}
/// 活动卡片和任务中心共用同一份文案片段
@@ -252,7 +252,7 @@ nonisolated enum CodexActivityDisplayFormat {
now: Date
) -> [String] {
[
- task.toolName ?? String(localized: "等待下一步操作"),
+ task.toolName ?? String(localized: "activity.event.waiting-next-action"),
waitingDurationFragment(since: task.stateChangedAt, now: now)
]
}
@@ -264,7 +264,7 @@ nonisolated enum CodexActivityDisplayFormat {
let duration = if task.showsPreciseDuration, let startedAt = task.startedAt {
runningDurationFragment(since: startedAt, now: now)
} else {
- String(localized: "正在运行")
+ String(localized: "activity.status.running")
}
return [duration, eventText(for: task)]
}
@@ -285,17 +285,17 @@ nonisolated enum CodexActivityDisplayFormat {
let seconds = max(0, Int(now.timeIntervalSince(date)))
switch (action, seconds) {
case (.completed, ..<10):
- return String(localized: "刚刚完成")
+ return String(localized: "activity.relative.just-completed")
case (.terminated, ..<10):
- return String(localized: "刚刚终止")
+ return String(localized: "activity.relative.just-stopped")
case (.completed, ..<60):
- return String(localized: "\(seconds) 秒前完成")
+ return String(localized: "activity.relative.completed-seconds-ago", defaultValue: "\(seconds, specifier: "%lld")")
case (.terminated, ..<60):
- return String(localized: "\(seconds) 秒前终止")
+ return String(localized: "activity.relative.stopped-seconds-ago", defaultValue: "\(seconds, specifier: "%lld")")
case (.completed, _):
- return String(localized: "\(seconds / 60) 分钟前完成")
+ return String(localized: "activity.relative.completed-minutes-ago", defaultValue: "\(seconds / 60, specifier: "%lld")")
case (.terminated, _):
- return String(localized: "\(seconds / 60) 分钟前终止")
+ return String(localized: "activity.relative.stopped-minutes-ago", defaultValue: "\(seconds / 60, specifier: "%lld")")
}
}
diff --git a/CodexBar/Models/CodexQuotaModels.swift b/CodexBar/Models/CodexQuotaModels.swift
index 0d8e498..b8477f0 100644
--- a/CodexBar/Models/CodexQuotaModels.swift
+++ b/CodexBar/Models/CodexQuotaModels.swift
@@ -121,7 +121,7 @@ nonisolated struct QuotaWindow: Equatable, Identifiable {
private static func windowLabel(for minutes: Int?) -> String {
guard let minutes, minutes > 0 else {
- return String(localized: "quota.window.fallback", defaultValue: "额度")
+ return String(localized: "quota.window.fallback")
}
if minutes.isMultiple(of: 1440) {
diff --git a/CodexBar/Models/CodexStatusError.swift b/CodexBar/Models/CodexStatusError.swift
index b32f6fc..2ba94c5 100644
--- a/CodexBar/Models/CodexStatusError.swift
+++ b/CodexBar/Models/CodexStatusError.swift
@@ -14,39 +14,21 @@ nonisolated enum CodexStatusError: LocalizedError {
var errorDescription: String? {
switch self {
case .executableNotFound:
- String(
- localized: "codex-status.error.executable-not-found",
- defaultValue: "找不到 Codex CLI 或 Codex APP"
- )
+ String(localized: "codex-status.error.executable-not-found")
case .serverTimeout:
- String(
- localized: "codex-status.error.server-timeout",
- defaultValue: "Codex app-server 等待响应超时"
- )
+ String(localized: "codex-status.error.server-timeout")
case .serverConnectionClosed:
- String(
- localized: "codex-status.error.connection-closed",
- defaultValue: "Codex app-server 连接已经断开"
- )
+ String(localized: "codex-status.error.connection-closed")
case .invalidServerResponse:
- String(
- localized: "codex-status.error.invalid-response",
- defaultValue: "Codex app-server 无法解析响应"
- )
+ String(localized: "codex-status.error.invalid-response")
case let .serverError(message):
message
case .unsupportedMethod:
- String(
- localized: "codex-status.error.unsupported-method",
- defaultValue: "Codex app-server 不支持该接口"
- )
+ String(localized: "codex-status.error.unsupported-method")
case let .unsupportedVersion(minimum):
- String(localized: "需要 Codex \(minimum) 或更高版本")
+ String(localized: "codex-version.requirement", defaultValue: "\(minimum)")
case .notLoggedIn:
- String(
- localized: "codex-status.error.not-logged-in",
- defaultValue: "Codex 未登录"
- )
+ String(localized: "codex-status.error.not-logged-in")
}
}
diff --git a/CodexBar/Models/GlobalHotKeyShortcut.swift b/CodexBar/Models/GlobalHotKeyShortcut.swift
index 525e5c7..26619fb 100644
--- a/CodexBar/Models/GlobalHotKeyShortcut.swift
+++ b/CodexBar/Models/GlobalHotKeyShortcut.swift
@@ -39,17 +39,11 @@ nonisolated struct GlobalHotKeyShortcut: Codable, Equatable {
var validationError: String? {
if modifierCount < 2 {
- return String(
- localized: "hotkey.validation.minimum-modifiers",
- defaultValue: "至少需要两个修饰键"
- )
+ return String(localized: "hotkey.validation.minimum-modifiers")
}
if isReservedSystemShortcut {
- return String(
- localized: "hotkey.validation.system-reserved",
- defaultValue: "不可使用系统快捷键"
- )
+ return String(localized: "hotkey.validation.system-reserved")
}
return nil
diff --git a/CodexBar/Resources/Localizable.xcstrings b/CodexBar/Resources/Localizable.xcstrings
index 7d08aa3..e41f109 100644
--- a/CodexBar/Resources/Localizable.xcstrings
+++ b/CodexBar/Resources/Localizable.xcstrings
@@ -1,616 +1,615 @@
{
"sourceLanguage" : "zh-Hans",
"strings" : {
- " 等" : {
+ "activity-center.section.recent-completions" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : ", etc."
+ "value" : "Recent Completions"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : " 等"
+ "value" : "最近完成"
}
}
}
},
- ", 开启 CodexBar Hook 后会自动重试" : {
+ "activity-center.section.recent-terminations" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : ", will retry automatically after CodexBar Hook is enabled"
+ "value" : "Recently Stopped"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : ", 开启 CodexBar Hook 后会自动重试"
+ "value" : "最近终止"
}
}
}
},
- ", 稍后会自动重试" : {
+ "activity-center.section.running" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : ", will retry automatically"
+ "value" : "Running"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : ", 稍后会自动重试"
+ "value" : "运行中"
}
}
}
},
- ", 跳过 %lld 条无效数据" : {
+ "activity-center.section.waiting" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "; skipped %lld invalid events"
+ "value" : "Waiting for Approval"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : ", 跳过 %lld 条无效数据"
+ "value" : "等待确认"
}
}
}
},
- "; %lld 天未完成 (%@)" : {
+ "activity-center.summary.recent-completions" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "; dates not rebuilt (%1$lld): %2$@"
+ "value" : "Completed: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "; %1$lld 天未完成 (%2$@)"
+ "value" : "最近完成 %lld"
}
}
}
},
- "; 云端替换将在同步可用后继续" : {
+ "activity-center.summary.recent-terminations" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "; cloud data will be replaced when sync becomes available"
+ "value" : "Stopped: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "; 云端替换将在同步可用后继续"
+ "value" : "最近终止 %lld"
}
}
}
},
- "%@ ~" : {
+ "activity-center.summary.running" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%@ –"
+ "value" : "Running: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%@ ~"
+ "value" : "运行 %lld"
}
}
}
},
- "%@ ~ %@" : {
+ "activity-center.summary.waiting" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ – %2$@"
+ "value" : "Waiting: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ ~ %2$@"
+ "value" : "等待 %lld"
}
}
}
},
- "%@ 剩余 %@" : {
+ "activity-center.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@: %2$@ remaining"
+ "value" : "Task Center"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ 剩余 %2$@"
+ "value" : "任务中心"
}
}
}
},
- "%lld 个子 Agent" : {
+ "activity-protection.caption" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Subagents: %lld"
+ "value" : "Hide inactive tasks and exclude them from keep-awake"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 个子 Agent"
+ "value" : "长时间没有进展时隐藏任务并停止参与防睡眠"
}
}
}
},
- "%lld 分钟" : {
+ "activity-protection.duration.hours" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld min"
+ "value" : "%lld hr"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 分钟"
+ "value" : "%lld 小时"
}
}
}
},
- "%lld 分钟前完成" : {
+ "activity-protection.duration.thirty-minutes" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Completed %lld min ago"
+ "value" : "30 min"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 分钟前完成"
+ "value" : "30 分钟"
}
}
}
},
- "%lld 分钟前终止" : {
+ "activity-protection.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Stopped %lld min ago"
+ "value" : "Stalled Task Protection"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 分钟前终止"
+ "value" : "异常会话保护"
}
}
}
},
- "%lld 秒" : {
+ "activity.anonymous.keep-awake-exclusion" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld sec"
+ "value" : "Anonymous tasks do not prevent sleep"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 秒"
+ "value" : "匿名任务不参与防睡眠"
}
}
}
},
- "%lld 秒前完成" : {
+ "activity.duration.elapsed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Completed %lld sec ago"
+ "value" : "Duration: %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 秒前完成"
+ "value" : "耗时 %@"
}
}
}
},
- "%lld 秒前终止" : {
+ "activity.duration.running" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Stopped %lld sec ago"
+ "value" : "Running for %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 秒前终止"
+ "value" : "已运行 %@"
}
}
}
},
- "%lld天" : {
+ "activity.duration.waiting" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lldd"
+ "value" : "Waiting for %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld天"
+ "value" : "已等待 %@"
}
}
}
},
- "1 小时" : {
+ "activity.empty.no-activity" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "1 Hour"
+ "value" : "No Codex activity"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "1 小时"
+ "value" : "暂无 Codex 活动"
}
}
}
},
- "2 小时" : {
+ "activity.event.compacting-context" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "2 Hours"
+ "value" : "Compacting context"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "2 小时"
+ "value" : "压缩上下文"
}
}
}
},
- "4 小时" : {
+ "activity.event.context-compaction-completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "4 Hours"
+ "value" : "Context compacted"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "4 小时"
+ "value" : "上下文压缩完成"
}
}
}
},
- "6 小时" : {
+ "activity.event.finished-using-tool" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "6 Hours"
+ "value" : "Finished using %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "6 小时"
+ "value" : "调用工具 %@ 完成"
}
}
}
},
- "15 分钟" : {
+ "activity.event.starting-subagent" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "15 Minutes"
+ "value" : "Starting subagent"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "15 分钟"
+ "value" : "启动子智能体"
}
}
}
},
- "30 分钟" : {
+ "activity.event.subagent-completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "30 Minutes"
+ "value" : "Subagent completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "30 分钟"
+ "value" : "子智能体完成"
}
}
}
},
- "activity-protection.duration.hours" : {
+ "activity.event.thinking" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld hr"
+ "value" : "Thinking"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 小时"
+ "value" : "正在思考"
}
}
}
},
- "activity-protection.duration.thirty-minutes" : {
+ "activity.event.tool-completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "30 min"
+ "value" : "Tool call completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "30 分钟"
+ "value" : "调用工具完成"
}
}
}
},
- "APP 快捷键" : {
+ "activity.event.using-named-tool" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "App Shortcut"
+ "value" : "Using %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "APP 快捷键"
+ "value" : "调用工具 %@"
}
}
}
},
- "app.command.settings" : {
- "extractionState" : "manual",
+ "activity.event.using-tool" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Settings…"
+ "value" : "Using tool"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "设置..."
+ "value" : "调用工具"
}
}
}
},
- "Codex" : {
+ "activity.event.waiting-next-action" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex"
+ "value" : "Waiting for the next action"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex"
+ "value" : "等待下一步操作"
}
}
}
},
- "Codex app-server 日志" : {
+ "activity.relative.completed-minutes-ago" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex app-server Log"
+ "value" : "Completed %lld min ago"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex app-server 日志"
+ "value" : "%lld 分钟前完成"
}
}
}
},
- "Codex TUI 通知" : {
+ "activity.relative.completed-seconds-ago" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex TUI Notifications"
+ "value" : "Completed %lld sec ago"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex TUI 通知"
+ "value" : "%lld 秒前完成"
}
}
}
},
- "Codex TUI 通知, 独立于 CodexBar 通知" : {
+ "activity.relative.just-completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Separate from CodexBar notifications"
+ "value" : "Just completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex TUI 通知, 独立于 CodexBar 通知"
+ "value" : "刚刚完成"
}
}
}
},
- "Codex TUI 通知状态与设置不一致" : {
+ "activity.relative.just-stopped" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex TUI notification status does not match the setting"
+ "value" : "Just stopped"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex TUI 通知状态与设置不一致"
+ "value" : "刚刚终止"
}
}
}
},
- "Codex 任务已完成" : {
+ "activity.relative.stopped-minutes-ago" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex task completed"
+ "value" : "Stopped %lld min ago"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 任务已完成"
+ "value" : "%lld 分钟前终止"
}
}
}
},
- "Codex 任务已终止" : {
+ "activity.relative.stopped-seconds-ago" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex task stopped"
+ "value" : "Stopped %lld sec ago"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 任务已终止"
+ "value" : "%lld 秒前终止"
}
}
}
},
- "Codex 刚刚完成" : {
+ "activity.status.codex-completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex just completed"
+ "value" : "Codex task completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 刚刚完成"
+ "value" : "Codex 任务已完成"
}
}
}
},
- "Codex 正在运行" : {
+ "activity.status.codex-just-completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex is running"
+ "value" : "Codex just completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 正在运行"
+ "value" : "Codex 刚刚完成"
}
}
}
},
- "Codex 没有返回任何结果" : {
+ "activity.status.codex-running" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex returned no results"
+ "value" : "Codex is running"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 没有返回任何结果"
+ "value" : "Codex 正在运行"
}
}
}
},
- "Codex 版本" : {
+ "activity.status.codex-stopped" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex Versions"
+ "value" : "Codex task stopped"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 版本"
+ "value" : "Codex 任务已终止"
}
}
}
},
- "Codex 等待批准" : {
+ "activity.status.codex-waiting-for-approval" : {
"localizations" : {
"en" : {
"stringUnit" : {
@@ -626,4194 +625,4194 @@
}
}
},
- "Codex 账号异常" : {
+ "activity.status.running" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex account unavailable"
+ "value" : "Running"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 账号异常"
+ "value" : "正在运行"
}
}
}
},
- "Codex 返回警告" : {
+ "activity.status.waiting-for-approval" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex returned a warning"
+ "value" : "Waiting for approval"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 返回警告"
+ "value" : "等待批准"
}
}
}
},
- "Codex 返回错误" : {
+ "activity.summary.other-task-count" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex returned an error"
+ "value" : "Other tasks: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 返回错误"
+ "value" : "另有 %lld 个任务"
}
}
}
},
- "Codex 配置已禁用 Hook" : {
+ "activity.summary.subagent-count" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex Hook is disabled in Codex settings"
+ "value" : "Subagents: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 配置已禁用 Hook"
+ "value" : "%lld 个子 Agent"
}
}
}
},
- "codex-cli.version.launch-failed" : {
+ "app.action.quit" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Failed to launch"
+ "value" : "Quit CodexBar"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "启动失败"
+ "value" : "退出 CodexBar"
}
}
}
},
- "codex-cli.version.not-found" : {
+ "app.command.settings" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%@ not found"
+ "value" : "Settings…"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "未找到 %@"
+ "value" : "设置…"
}
}
}
},
- "codex-cli.version.parse-failed" : {
+ "app.menu.log" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Version not recognized"
+ "value" : "Log"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "版本未知"
+ "value" : "日志"
}
}
}
},
- "codex-cli.version.read-failed" : {
+ "app.menu.settings" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Failed to read version"
+ "value" : "Settings"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "读取失败"
+ "value" : "设置"
}
}
}
},
- "codex-cli.version.read-timeout" : {
+ "auto-reset.confirmation.message" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Version check timed out"
+ "value" : "When enabled, CodexBar automatically uses a manual reset credit at the configured time before it expires and may briefly wake your Mac."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "读取超时"
+ "value" : "开启后, CodexBar 在手动重置临近过期时, 按设置的临期时间提前自动使用重置; 并可能短暂唤醒 Mac"
}
}
}
},
- "codex-cli.version.unknown" : {
+ "auto-reset.confirmation.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Unknown version"
+ "value" : "Enable Automatic Reset?"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "未知版本"
+ "value" : "开启自动重置?"
}
}
}
},
- "codex-hook.version.unavailable" : {
+ "auto-reset.lead-time.fifteen-minutes" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Enabling CodexBar Hook requires Codex %@ or later"
+ "value" : "15 Minutes"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "启用 CodexBar Hook 需要 Codex %@ 或更高版本"
+ "value" : "15 分钟"
}
}
}
},
- "codex-hook.version.unsupported" : {
+ "auto-reset.lead-time.four-hours" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Enabling CodexBar Hook requires Codex %@ or later"
+ "value" : "4 Hours"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "启用 CodexBar Hook 需要 Codex %@ 或更高版本"
+ "value" : "4 小时"
}
}
}
},
- "codex-status.error.connection-closed" : {
+ "auto-reset.lead-time.one-hour" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "The Codex app-server connection closed"
+ "value" : "1 Hour"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex app-server 连接已经断开"
+ "value" : "1 小时"
}
}
}
},
- "codex-status.error.executable-not-found" : {
+ "auto-reset.lead-time.six-hours" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not find the Codex CLI or app"
+ "value" : "6 Hours"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "找不到 Codex CLI 或 Codex APP"
+ "value" : "6 小时"
}
}
}
},
- "codex-status.error.invalid-response" : {
+ "auto-reset.lead-time.thirty-minutes" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not parse the Codex app-server response"
+ "value" : "30 Minutes"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex app-server 无法解析响应"
+ "value" : "30 分钟"
}
}
}
},
- "codex-status.error.not-logged-in" : {
+ "auto-reset.lead-time.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex is not signed in"
+ "value" : "Time Before Expiration"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 未登录"
+ "value" : "临期时间"
}
}
}
},
- "codex-status.error.server-timeout" : {
+ "auto-reset.lead-time.two-hours" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Timed out waiting for a Codex app-server response"
+ "value" : "2 Hours"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex app-server 等待响应超时"
+ "value" : "2 小时"
}
}
}
},
- "codex-status.error.unsupported-method" : {
+ "codex-cli.version.launch-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "The Codex app-server does not support this method"
+ "value" : "Failed to launch"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex app-server 不支持该接口"
+ "value" : "启动失败"
}
}
}
},
- "CodexBar Hook" : {
+ "codex-cli.version.not-found" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook"
+ "value" : "%@ not found"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook"
+ "value" : "未找到 %@"
}
}
}
},
- "CodexBar Hook 已不完整" : {
+ "codex-cli.version.parse-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook is incomplete"
+ "value" : "Version not recognized"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook 已不完整"
+ "value" : "版本未知"
}
}
}
},
- "CodexBar Hook 已被禁用" : {
+ "codex-cli.version.read-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook is disabled"
+ "value" : "Failed to read version"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook 已被禁用"
+ "value" : "读取失败"
}
}
}
},
- "CodexBar Hook 意外来源" : {
+ "codex-cli.version.read-timeout" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Unexpected CodexBar Hook source"
+ "value" : "Version check timed out"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook 意外来源"
+ "value" : "读取超时"
}
}
}
},
- "CodexBar Hook 未生效" : {
+ "codex-cli.version.unknown" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook is not working"
+ "value" : "Unknown version"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook 未生效"
+ "value" : "未知版本"
}
}
}
},
- "CodexBar Hook 未被信任" : {
+ "codex-hook.version.unavailable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook is not trusted"
+ "value" : "Enabling CodexBar Hook requires Codex %@ or later"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Hook 未被信任"
+ "value" : "启用 CodexBar Hook 需要 Codex %@ 或更高版本"
}
}
}
},
- "CodexBar 日志" : {
+ "codex-hook.version.unsupported" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Log"
+ "value" : "Enabling CodexBar Hook requires Codex %@ or later"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar 日志"
+ "value" : "启用 CodexBar Hook 需要 Codex %@ 或更高版本"
}
}
}
},
- "CodexBar 版本" : {
+ "codex-status.account.not-signed-in" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Version"
+ "value" : "Not signed in"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar 版本"
+ "value" : "未登录"
}
}
}
},
- "CodexBar 设置" : {
+ "codex-status.account.unavailable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Settings"
+ "value" : "Codex account unavailable"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar 设置"
+ "value" : "Codex 账号异常"
}
}
}
},
- "CodexBarHelper 尚未注册" : {
+ "codex-status.error.connection-closed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBarHelper is not registered"
+ "value" : "The Codex app-server connection closed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBarHelper 尚未注册"
+ "value" : "Codex app-server 连接已经断开"
}
}
}
},
- "GitHub 项目" : {
+ "codex-status.error.executable-not-found" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "GitHub Project"
+ "value" : "Could not find the Codex CLI or app"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "GitHub 项目"
+ "value" : "找不到 Codex CLI 或 Codex APP"
}
}
}
},
- "hooks.json 文件格式错误" : {
+ "codex-status.error.invalid-response" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Invalid hooks.json format"
+ "value" : "Could not parse the Codex app-server response"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "hooks.json 文件格式错误"
+ "value" : "Codex app-server 响应无法解析"
}
}
}
},
- "hotkey.validation.minimum-modifiers" : {
+ "codex-status.error.not-logged-in" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Use at least two modifier keys"
+ "value" : "Codex is not signed in"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "至少需要两个修饰键"
+ "value" : "Codex 未登录"
}
}
}
},
- "hotkey.validation.system-reserved" : {
+ "codex-status.error.server-timeout" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "This shortcut is reserved by the system"
+ "value" : "Timed out waiting for a Codex app-server response"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "不可使用系统快捷键"
+ "value" : "Codex app-server 等待响应超时"
}
}
}
},
- "keep-alive.duration.hours" : {
+ "codex-status.error.unsupported-method" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld hr"
+ "value" : "The Codex app-server does not support this method"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld 小时"
+ "value" : "Codex app-server 不支持该接口"
}
}
}
},
- "keep-alive.duration.unlimited" : {
+ "codex-status.result.empty" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Unlimited"
+ "value" : "Codex returned no results"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "无限制"
+ "value" : "Codex 没有返回任何结果"
}
}
}
},
- "keep-alive.error.auto-reset-wake-schedule-failed" : {
+ "codex-status.result.error" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not schedule a wake event for Automatic Reset"
+ "value" : "Codex returned an error"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "设置自动重置唤醒计划失败"
+ "value" : "Codex 返回错误"
}
}
}
},
- "keep-alive.error.connection-failed" : {
+ "codex-status.result.warning" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not connect to the service"
+ "value" : "Codex returned a warning"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "连接服务失败"
+ "value" : "Codex 返回警告"
}
}
}
},
- "keep-alive.error.connection-interrupted" : {
+ "codex-tui-notifications.error.read-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "The service connection was interrupted"
+ "value" : "Could not read Codex TUI notification settings"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "服务连接中断"
+ "value" : "读取 Codex TUI 通知设置失败"
}
}
}
},
- "keep-alive.error.helper-assets-missing" : {
+ "codex-tui-notifications.error.state-mismatch" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Service unavailable; reinstall CodexBar"
+ "value" : "Codex TUI notification status does not match the setting"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "服务异常, 请重新安装 CodexBar"
+ "value" : "Codex TUI 通知状态与设置不一致"
}
}
}
},
- "keep-alive.error.invalid-helper-interface" : {
+ "codex-tui-notifications.error.write-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Invalid service interface"
+ "value" : "Could not update Codex TUI notification settings"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "服务接口无效"
+ "value" : "写入 Codex TUI 通知设置失败"
}
}
}
},
- "keep-alive.error.no-response" : {
+ "codex-version.requirement" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "The service is not responding"
+ "value" : "Codex %@ or later is required"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "服务无响应"
+ "value" : "需要 Codex %@ 或更高版本"
}
}
}
},
- "keep-alive.error.prevent-idle-sleep-failed" : {
+ "common.action.cancel" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not prevent idle sleep"
+ "value" : "Cancel"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "防止空闲睡眠失败"
+ "value" : "取消"
}
}
}
},
- "keep-alive.error.registration-failed" : {
+ "common.action.clear" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not register the service"
+ "value" : "Clear"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "注册服务失败"
+ "value" : "清空"
}
}
}
},
- "keep-alive.error.request-system-sleep-failed" : {
+ "common.action.click-to-copy" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not request system sleep"
+ "value" : "Click to Copy"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "请求系统睡眠失败"
+ "value" : "点击复制"
}
}
}
},
- "keep-alive.error.restore-idle-sleep-failed" : {
+ "common.action.close" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not restore the idle sleep policy"
+ "value" : "Close"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "恢复空闲睡眠策略失败"
+ "value" : "关闭"
}
}
}
},
- "keep-alive.error.retry-limit-reached" : {
+ "common.action.copy" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Keep-awake failed repeatedly; retries stopped"
+ "value" : "Copy"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "防睡眠多次失败, 已停止重试"
+ "value" : "复制"
}
}
}
},
- "keep-alive.error.toggle-sleep-failed" : {
+ "common.action.enable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not change the system sleep state"
+ "value" : "Enable"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "切换睡眠状态失败"
+ "value" : "开启"
}
}
}
},
- "keep-alive.error.update-failed" : {
+ "common.action.open-system-settings" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not update the service"
+ "value" : "Open System Settings"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "更新服务失败"
+ "value" : "打开系统设置"
}
}
}
},
- "keep-alive.low-battery.off" : {
+ "common.action.preview" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Off"
+ "value" : "Preview"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "关闭"
+ "value" : "预览"
}
}
}
},
- "menu-bar-quota.selection.off" : {
+ "common.action.quit" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Off"
+ "value" : "Quit"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "关闭"
+ "value" : "退出"
}
}
}
},
- "menu-bar-quota.selection.primary" : {
+ "common.action.restore-default" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Primary"
+ "value" : "Restore Default"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "主额度"
+ "value" : "恢复默认"
}
}
}
},
- "menu-bar-quota.selection.secondary" : {
+ "common.codex" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Secondary"
+ "value" : "Codex"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "次额度"
+ "value" : "Codex"
}
}
}
},
- "notification.activity-protection.body.codex" : {
+ "common.empty.no-data" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No progress on the Codex task for %@; hidden and excluded from keep-awake"
+ "value" : "No data"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 任务已静默 %@, 已隐藏并停止参与防睡眠"
+ "value" : "暂无数据"
}
}
}
},
- "notification.activity-protection.body.project" : {
+ "common.status.available" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No progress in “%1$@” for %2$@; hidden and excluded from keep-awake"
+ "value" : "Available"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ 已静默 %2$@, 已隐藏并停止参与防睡眠"
+ "value" : "可用"
}
}
}
},
- "notification.activity-protection.title" : {
+ "common.status.completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex Task Stalled"
+ "value" : "Completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 任务长时间无进展"
+ "value" : "完成"
}
}
}
},
- "notification.auto-reset-failed.body.authentication" : {
+ "common.status.copied" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex sign-in has expired"
+ "value" : "Copied"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 登录状态已失效"
+ "value" : "已复制"
}
}
}
},
- "notification.auto-reset-failed.body.expired" : {
+ "common.status.not-set" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Expired before Automatic Reset could complete"
+ "value" : "Not set"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "重置已过期, 自动重置未完成"
+ "value" : "未设置"
}
}
}
},
- "notification.auto-reset-failed.body.permanent" : {
+ "date-picker.next-month" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "The request could not be completed"
+ "value" : "Next Month"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "请求无法完成"
+ "value" : "下个月"
}
}
}
},
- "notification.auto-reset-failed.title" : {
+ "date-picker.previous-month" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Automatic Reset Failed"
+ "value" : "Previous Month"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "自动重置失败"
+ "value" : "上个月"
}
}
}
},
- "notification.auto-reset.body.count" : {
+ "date-picker.select-end" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Reset credits remaining: %lld"
+ "value" : "Select an end date"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "剩余重置次数: %lld"
+ "value" : "选择结束日期"
}
}
}
},
- "notification.auto-reset.title" : {
+ "date-picker.select-range" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Automatic Reset"
+ "value" : "Select Date Range"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "自动重置"
+ "value" : "选择日期范围"
}
}
}
},
- "notification.credit-expiry.body" : {
+ "date-picker.select-start" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Reset credits expiring on %2$@: %1$lld"
+ "value" : "Select a start date"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "有 %1$lld 个重置次数将于 %2$@ 过期"
+ "value" : "选择开始日期"
}
}
}
},
- "notification.credit-expiry.title" : {
+ "date-range.closed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Reset Credits Expiring Soon"
+ "value" : "%1$@ – %2$@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "重置即将过期"
+ "value" : "%1$@ ~ %2$@"
}
}
}
},
- "notification.keep-alive-ended.duration-limit" : {
+ "date-range.open-ended" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Keep-awake stopped after %@"
+ "value" : "%@ –"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已达防睡眠上限 %@, 已停止防睡眠"
+ "value" : "%@ ~"
}
}
}
},
- "notification.keep-alive-ended.low-battery" : {
+ "duration.days-compact" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Battery at %@; keep-awake stopped"
+ "value" : "%lldd"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "电量剩余 %@, 已停止防睡眠"
+ "value" : "%lld天"
}
}
}
},
- "notification.keep-alive-ended.title" : {
+ "duration.minutes" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "System Sleep Restored"
+ "value" : "%lld min"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已恢复系统睡眠"
+ "value" : "%lld 分钟"
}
}
}
},
- "notification.low-quota.body" : {
+ "duration.seconds" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ %2$@: less than %3$@ remaining"
+ "value" : "%lld sec"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ %2$@ 剩余额度已低于 %3$@"
+ "value" : "%lld 秒"
}
}
}
},
- "notification.low-quota.title" : {
+ "helper.status.authorization-required" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex Quota Is Low"
+ "value" : "Allow CodexBar to run in the background"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 额度不足"
+ "value" : "需要授权允许 CodexBar 后台运行"
}
}
}
},
- "notification.quota-reset.body" : {
+ "helper.status.install-and-authorize" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ %2$@"
+ "value" : "CodexBar Helper must be installed and authorized to run in the background"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%1$@ %2$@"
+ "value" : "需要安装并授权 CodexBar Helper 后台运行"
}
}
}
},
- "notification.quota-reset.title" : {
+ "helper.status.installed-needs-authorization" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Quota Reset"
+ "value" : "CodexBar Helper is installed but still needs authorization to run in the background"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "额度已重置"
+ "value" : "已安装 CodexBar Helper 但需要授权允许后台运行"
}
}
}
},
- "notification.sound.default" : {
+ "helper.status.not-registered" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Default"
+ "value" : "CodexBarHelper is not registered"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "默认"
+ "value" : "CodexBarHelper 尚未注册"
}
}
}
},
- "notification.sound.silent" : {
+ "hook.error.config-read-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "None"
+ "value" : "Could not read the Codex Hook configuration"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "静音"
+ "value" : "读取 Codex Hook 配置失败"
}
}
}
},
- "notification.task-completed.body.codex" : {
+ "hook.error.configuration-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex task completed • %@"
+ "value" : "Could not configure Codex Hook"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 任务完成, %@"
+ "value" : "设置 Codex Hook 失败"
}
}
}
},
- "notification.task-completed.body.project" : {
+ "hook.error.invalid-config-format" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Task completed in “%1$@” • %2$@"
+ "value" : "Invalid hooks.json format"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "「%1$@」任务完成, %2$@"
+ "value" : "hooks.json 文件格式错误"
}
}
}
},
- "notification.task-completed.title" : {
+ "hook.error.trust-cleanup-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex Task Completed"
+ "value" : "Codex Hook was disabled, but its trust state could not be cleared"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 任务完成"
+ "value" : "已关闭 Codex Hook, 清理信任状态失败"
}
}
}
},
- "notification.task-waiting.body.codex" : {
+ "hook.error.verification-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex is waiting for approval to continue"
+ "value" : "Could not verify Codex Hook: %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 正在等待批准下一步操作"
+ "value" : "无法验证 Codex Hook: %@"
}
}
}
},
- "notification.task-waiting.body.codex-tool" : {
+ "hook.name" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex is waiting for approval to use %@"
+ "value" : "CodexBar Hook"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 正在等待批准 %@ 操作"
+ "value" : "CodexBar Hook"
}
}
}
},
- "notification.task-waiting.body.project" : {
+ "hook.status.disabled" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "A task in “%@” is waiting for approval to continue"
+ "value" : "CodexBar Hook is disabled"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "「%@」正在等待批准下一步操作"
+ "value" : "CodexBar Hook 已被禁用"
}
}
}
},
- "notification.task-waiting.body.project-tool" : {
+ "hook.status.disabled-by-codex" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "A task in “%1$@” is waiting for approval to use %2$@"
+ "value" : "Codex Hook is disabled in Codex settings"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "「%1$@」正在等待批准 %2$@ 操作"
+ "value" : "Codex 配置已禁用 Hook"
}
}
}
},
- "notification.task-waiting.title" : {
+ "hook.status.inactive" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex Is Waiting for Approval"
+ "value" : "CodexBar Hook is not working"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex 等待批准"
+ "value" : "CodexBar Hook 未生效"
}
}
}
},
- "quota.window.fallback" : {
+ "hook.status.incomplete" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Quota"
+ "value" : "CodexBar Hook is incomplete"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "额度"
+ "value" : "CodexBar Hook 配置不完整"
}
}
}
},
- "request-log.error.exit-timeout-killed" : {
+ "hook.status.unexpected-source" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "app-server did not exit in time and was force-quit"
+ "value" : "Unexpected CodexBar Hook source"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "app-server 退出超时, 已强制结束"
+ "value" : "CodexBar Hook 意外来源"
}
}
}
},
- "request-log.error.exit-timeout-running" : {
+ "hook.status.untrusted" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "app-server did not exit in time and may still be running"
+ "value" : "CodexBar Hook is not trusted"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "app-server 退出超时, 可能仍在后台运行"
+ "value" : "CodexBar Hook 未被信任"
}
}
}
},
- "request-log.error.initialization-failed" : {
+ "hotkey.error.default-in-use" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Failed to initialize the app-server session: %@"
+ "value" : "Default shortcut %@ is already in use"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "app-server 会话初始化失败: %@"
+ "value" : "默认快捷键 %@ 已被占用"
}
}
}
},
- "request-log.error.launch-failed" : {
+ "hotkey.error.in-use" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Failed to launch app-server: %@"
+ "value" : "Shortcut is already in use"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "app-server 启动失败: %@"
+ "value" : "快捷键已被占用"
}
}
}
},
- "request-log.error.response-connection-closed" : {
+ "hotkey.error.unrecognized" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Connection closed while waiting for a response"
+ "value" : "Shortcut not recognized"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "连接已断开, 等待响应失败"
+ "value" : "无法识别该快捷键"
}
}
}
},
- "request-log.error.response-timeout" : {
+ "hotkey.validation.minimum-modifiers" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Response timed out"
+ "value" : "Use at least two modifier keys"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待响应超时"
+ "value" : "至少需要两个修饰键"
}
}
}
},
- "request-log.error.write-connection-closed" : {
+ "hotkey.validation.system-reserved" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Connection closed; the request could not be sent"
+ "value" : "This shortcut is reserved by the system"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "连接已断开, 无法发送请求"
+ "value" : "不可使用系统快捷键"
}
}
}
},
- "updater.status.check-failed" : {
+ "keep-alive.confirmation.message" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not check for updates"
+ "value" : "When enabled, CodexBar prevents system sleep while Codex tasks are running and restores normal sleep afterward."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "检查更新失败"
+ "value" : "开启后, CodexBar 会在 Codex 任务运行时防止系统睡眠, 任务结束后自动恢复"
}
}
}
},
- "updater.status.checking" : {
+ "keep-alive.confirmation.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Checking for updates"
+ "value" : "Enable System Sleep Prevention?"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "正在检查更新"
+ "value" : "开启防止系统睡眠?"
}
}
}
},
- "updater.status.missing-configuration" : {
+ "keep-alive.display.caption" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Update source is not configured"
+ "value" : "Also prevent the screen saver and auto-lock"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "未配置更新资源"
+ "value" : "同时阻止屏幕保护与自动锁屏"
}
}
}
},
- "updater.status.up-to-date" : {
+ "keep-alive.display.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar is up to date"
+ "value" : "Keep Display Awake"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "没有可用更新"
+ "value" : "保持屏幕常亮"
}
}
}
},
- "updater.status.update-available" : {
+ "keep-alive.duration-limit.caption" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Version v%@ is available"
+ "value" : "Restore normal sleep when the limit is reached"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "发现新版本: v%@"
+ "value" : "防睡眠时长超过阈值后自动恢复系统睡眠"
}
}
}
},
- "workflow.metric.tool-calls" : {
+ "keep-alive.duration-limit.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Tool Calls"
+ "value" : "Keep-Awake Limit"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "调用工具"
+ "value" : "最长防睡眠时间"
}
}
}
},
- "workflow.rebuild.error.source-changed" : {
+ "keep-alive.duration.hours" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Local data changed; try again"
+ "value" : "%lld hr"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "本地数据发生变化, 请重试"
+ "value" : "%lld 小时"
}
}
}
},
- "workflow.rebuild.error.source-unavailable" : {
+ "keep-alive.duration.unlimited" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No local data is available to rebuild"
+ "value" : "Unlimited"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "没有可重建的本地数据"
+ "value" : "无限制"
}
}
}
},
- "workflow.rebuild.summary.sync-replacement-marking-failed" : {
+ "keep-alive.error.auto-reset-wake-schedule-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "; could not replace cloud data; try rebuilding this data later"
+ "value" : "Could not schedule a wake event for Automatic Reset"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "; 云端替换未能完成, 请稍后重新重建这些数据"
+ "value" : "设置自动重置唤醒计划失败"
}
}
}
},
- "上下文压缩" : {
+ "keep-alive.error.connection-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Compactions"
+ "value" : "Could not connect to the service"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "上下文压缩"
+ "value" : "连接服务失败"
}
}
}
},
- "上下文压缩完成" : {
+ "keep-alive.error.connection-interrupted" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Context compacted"
+ "value" : "The service connection was interrupted"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "上下文压缩完成"
+ "value" : "服务连接中断"
}
}
}
},
- "上个月" : {
+ "keep-alive.error.helper-assets-missing" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Previous Month"
+ "value" : "Service unavailable; reinstall CodexBar"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "上个月"
+ "value" : "服务异常, 请重新安装 CodexBar"
}
}
}
},
- "下个月" : {
+ "keep-alive.error.invalid-helper-interface" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Next Month"
+ "value" : "Invalid service interface"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "下个月"
+ "value" : "服务接口无效"
}
}
}
},
- "临期时间" : {
+ "keep-alive.error.no-response" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Time Before Expiration"
+ "value" : "The service is not responding"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "临期时间"
+ "value" : "服务无响应"
}
}
}
},
- "主面板任务中心" : {
+ "keep-alive.error.prevent-idle-sleep-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Show Task Center in Menu"
+ "value" : "Could not prevent idle sleep"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "主面板任务中心"
+ "value" : "防止空闲睡眠失败"
}
}
}
},
- "仅在使用电池供电时生效, 充电时自动恢复" : {
+ "keep-alive.error.registration-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Battery only; resumes when charging"
+ "value" : "Could not register the service"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "仅在使用电池供电时生效, 充电时自动恢复"
+ "value" : "注册服务失败"
}
}
}
},
- "任务中心" : {
+ "keep-alive.error.request-system-sleep-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Task Center"
+ "value" : "Could not request system sleep"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "任务中心"
+ "value" : "请求系统睡眠失败"
}
}
}
},
- "任务完成或等待批准时触发触摸板震动" : {
+ "keep-alive.error.restore-idle-sleep-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Trackpad haptics when tasks finish or await approval"
+ "value" : "Could not restore the idle sleep policy"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "任务完成或等待批准时触发触摸板震动"
+ "value" : "恢复空闲睡眠策略失败"
}
}
}
},
- "任务完成通知" : {
+ "keep-alive.error.retry-limit-reached" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Task Completion"
+ "value" : "Keep-awake failed repeatedly; retries stopped"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "任务完成通知"
+ "value" : "防睡眠多次失败, 已停止重试"
}
}
}
},
- "任务时长" : {
+ "keep-alive.error.toggle-sleep-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Task Duration"
+ "value" : "Could not change the system sleep state"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "任务时长"
+ "value" : "切换睡眠状态失败"
}
}
}
},
- "任务等待批准期间继续防止系统睡眠" : {
+ "keep-alive.error.update-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Prevent sleep while a task awaits approval"
+ "value" : "Could not update the service"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "任务等待批准期间继续防止系统睡眠"
+ "value" : "更新服务失败"
}
}
}
},
- "任务等待通知" : {
+ "keep-alive.low-battery.caption" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Approval Requests"
+ "value" : "Battery only; resumes when charging"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "任务等待通知"
+ "value" : "仅在使用电池供电时生效, 充电时自动恢复"
}
}
}
},
- "任务触觉反馈" : {
+ "keep-alive.low-battery.off" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Task Haptics"
+ "value" : "Off"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "任务触觉反馈"
+ "value" : "关闭"
}
}
}
},
- "会话总数" : {
+ "keep-alive.low-battery.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Sessions"
+ "value" : "Low Battery Protection"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "会话总数"
+ "value" : "低电量保护"
}
}
}
},
- "低电量保护" : {
+ "keep-alive.status.active" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Low Battery Protection"
+ "value" : "System sleep is currently prevented"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "低电量保护"
+ "value" : "已防止系统睡眠"
}
}
}
},
- "低电量保护通知" : {
+ "keep-alive.status.disabled-by-other-source" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Low Battery Alert"
+ "value" : "System sleep is disabled by another source"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "低电量保护通知"
+ "value" : "系统睡眠已由其他来源关闭"
}
}
}
},
- "低额度阈值" : {
+ "keep-alive.status.duration-limit-reached" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Low Quota Threshold"
+ "value" : "Keep-awake limit reached (%@)"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "低额度阈值"
+ "value" : "已达到防睡眠时间上限 (%@)"
}
}
}
},
- "保持屏幕常亮" : {
+ "keep-alive.status.low-battery" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Keep Display Awake"
+ "value" : "Low battery; system sleep restored"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "保持屏幕常亮"
+ "value" : "电量过低, 已恢复系统睡眠"
}
}
}
},
- "全时累计" : {
+ "keep-alive.waiting.caption" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Lifetime Tokens"
+ "value" : "Prevent sleep while a task awaits approval"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "全时累计"
+ "value" : "任务等待批准期间继续防止系统睡眠"
}
}
}
},
- "关于" : {
+ "keep-alive.waiting.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "About"
+ "value" : "Keep Awake While Waiting"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "关于"
+ "value" : "等待批准时保持防睡眠"
}
}
}
},
- "关闭" : {
+ "log.action.copy-full" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Close"
+ "value" : "Copy Full %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "关闭"
+ "value" : "复制完整%@"
}
}
}
},
- "最热模型" : {
+ "log.action.preview-full" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Top Model"
+ "value" : "Preview Full %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最热模型"
+ "value" : "预览完整%@"
}
}
}
},
- "最近同步" : {
+ "log.empty.no-entries" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Last Sync"
+ "value" : "No log entries"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最近同步"
+ "value" : "暂无日志"
}
}
}
},
- "最近同步: %@" : {
+ "log.label.error" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Last sync: %@"
+ "value" : "Error"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最近同步: %@"
+ "value" : "错误"
}
}
}
},
- "最近完成" : {
+ "log.payload.details" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Recent Completions"
+ "value" : "Details"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最近完成"
+ "value" : "详情"
}
}
}
},
- "最近完成 %lld" : {
+ "log.payload.request" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Completed: %lld"
+ "value" : "Request"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最近完成 %lld"
+ "value" : "请求"
}
}
}
},
- "最近终止" : {
+ "log.payload.response" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Recently Stopped"
+ "value" : "Response"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最近终止"
+ "value" : "响应"
}
}
}
},
- "最近终止 %lld" : {
+ "log.status.in-progress" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Stopped: %lld"
+ "value" : "In Progress"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最近终止 %lld"
+ "value" : "进行中"
}
}
}
},
- "最长任务" : {
+ "log.status.waiting-response" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Longest Chat"
+ "value" : "Waiting for response"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最长任务"
+ "value" : "等待响应"
}
}
}
},
- "最长连胜" : {
+ "log.window.app-server-title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Longest Streak"
+ "value" : "Codex app-server Log"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最长连胜"
+ "value" : "Codex app-server 日志"
}
}
}
},
- "最长防睡眠时间" : {
+ "log.window.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Keep-Awake Limit"
+ "value" : "CodexBar Log"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "最长防睡眠时间"
+ "value" : "CodexBar 日志"
}
}
}
},
- "写入 Codex TUI 通知设置失败" : {
+ "menu-bar-quota.selection.off" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not update Codex TUI notification settings"
+ "value" : "Off"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "写入 Codex TUI 通知设置失败"
+ "value" : "关闭"
}
}
}
},
- "刚刚完成" : {
+ "menu-bar-quota.selection.primary" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Just completed"
+ "value" : "Primary"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "刚刚完成"
+ "value" : "主额度"
}
}
}
},
- "刚刚终止" : {
+ "menu-bar-quota.selection.secondary" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Just stopped"
+ "value" : "Secondary"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "刚刚终止"
+ "value" : "次额度"
}
}
}
},
- "匿名任务不参与防睡眠" : {
+ "notification.activity-protection.body.codex" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Anonymous tasks do not prevent sleep"
+ "value" : "No progress on the Codex task for %@; hidden and excluded from keep-awake"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "匿名任务不参与防睡眠"
+ "value" : "Codex 任务已静默 %@, 已隐藏并停止参与防睡眠"
}
}
}
},
- "单日峰值" : {
+ "notification.activity-protection.body.project" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Peak Tokens"
+ "value" : "No progress in \"%1$@\" for %2$@; hidden and excluded from keep-awake"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "单日峰值"
+ "value" : "%1$@ 已静默 %2$@, 已隐藏并停止参与防睡眠"
}
}
}
},
- "压缩上下文" : {
+ "notification.activity-protection.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Compacting context"
+ "value" : "Codex Task Stalled"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "压缩上下文"
+ "value" : "Codex 任务长时间无进展"
}
}
}
},
- "取消" : {
+ "notification.auto-reset-failed.body.authentication" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Cancel"
+ "value" : "Codex sign-in has expired"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "取消"
+ "value" : "Codex 登录状态已失效"
}
}
}
},
- "另有 %lld 个任务" : {
+ "notification.auto-reset-failed.body.expired" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld other tasks"
+ "value" : "Expired before Automatic Reset could complete"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "另有 %lld 个任务"
+ "value" : "重置已过期, 自动重置未完成"
}
}
}
},
- "可用" : {
+ "notification.auto-reset-failed.body.permanent" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Available"
+ "value" : "The request could not be completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "可用"
+ "value" : "请求无法完成"
}
}
}
},
- "可用: %lld" : {
+ "notification.auto-reset-failed.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%lld left"
+ "value" : "Automatic Reset Failed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "可用: %lld"
+ "value" : "自动重置失败"
}
}
}
},
- "同时阻止屏幕保护与自动锁屏" : {
+ "notification.auto-reset.body.count" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Also prevent the screen saver and auto-lock"
+ "value" : "Reset credits remaining: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "同时阻止屏幕保护与自动锁屏"
+ "value" : "剩余重置次数: %lld"
}
}
}
},
- "同步不可用" : {
+ "notification.auto-reset.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Sync unavailable"
+ "value" : "Automatic Reset"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "同步不可用"
+ "value" : "自动重置"
}
}
}
},
- "同步失败, 请稍后重试" : {
+ "notification.credit-expiry.body" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Sync failed; try again later"
+ "value" : "Reset credits expiring on %2$@: %1$lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "同步失败, 请稍后重试"
+ "value" : "有 %1$lld 个重置次数将于 %2$@ 过期"
}
}
}
},
- "同步未开启" : {
+ "notification.credit-expiry.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Sync is off"
+ "value" : "Reset Credits Expiring Soon"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "同步未开启"
+ "value" : "重置即将过期"
}
}
}
},
- "启动子智能体" : {
+ "notification.keep-alive-ended.duration-limit" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Starting subagent"
+ "value" : "Keep-awake stopped after %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "启动子智能体"
+ "value" : "已达防睡眠上限 %@, 已停止防睡眠"
}
}
}
},
- "响应" : {
+ "notification.keep-alive-ended.low-battery" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Response"
+ "value" : "Battery at %@; keep-awake stopped"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "响应"
+ "value" : "电量剩余 %@, 已停止防睡眠"
}
}
}
},
- "复制" : {
+ "notification.keep-alive-ended.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Copy"
+ "value" : "System Sleep Restored"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "复制"
+ "value" : "已恢复系统睡眠"
}
}
}
},
- "复制完整%@" : {
+ "notification.low-quota.body" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Copy Full %@"
+ "value" : "%1$@ %2$@: less than %3$@ remaining"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "复制完整%@"
+ "value" : "%1$@ %2$@ 剩余额度已低于 %3$@"
}
}
}
},
- "子智能体" : {
+ "notification.low-quota.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Subagents"
+ "value" : "Codex Quota Is Low"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "子智能体"
+ "value" : "Codex 额度不足"
}
}
}
},
- "子智能体完成" : {
+ "notification.quota-reset.body" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Subagent completed"
+ "value" : "%1$@ %2$@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "子智能体完成"
+ "value" : "%1$@ %2$@"
}
}
}
},
- "完成" : {
+ "notification.quota-reset.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Completed"
+ "value" : "Quota Reset"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "完成"
+ "value" : "额度已重置"
}
}
}
},
- "对话轮次" : {
+ "notification.sound.default" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Turns"
+ "value" : "Default"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "对话轮次"
+ "value" : "默认"
}
}
}
},
- "将从本机原始 Hook 事件重新统计 %@\n并在下次同步时替换当前设备对应日期的云端数据" : {
+ "notification.sound.silent" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Recalculate %@ from local Hook events.\nReplace this device's cloud data for those dates during the next sync."
+ "value" : "None"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "将从本机原始 Hook 事件重新统计 %@\n并在下次同步时替换当前设备对应日期的云端数据"
+ "value" : "静音"
}
}
}
},
- "已关闭 Codex Hook, 清理信任状态失败" : {
+ "notification.task-completed.body.codex" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex Hook was disabled, but its trust state could not be cleared"
+ "value" : "Codex task completed • %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已关闭 Codex Hook, 清理信任状态失败"
+ "value" : "Codex 任务完成, %@"
}
}
}
},
- "已复制" : {
+ "notification.task-completed.body.project" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Copied"
+ "value" : "Task completed in \"%1$@\" • %2$@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已复制"
+ "value" : "「%1$@」任务完成, %2$@"
}
}
}
},
- "已安装 CodexBar Helper 但需要授权允许后台运行" : {
+ "notification.task-completed.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Helper is installed but still needs authorization to run in the background"
+ "value" : "Codex Task Completed"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已安装 CodexBar Helper 但需要授权允许后台运行"
+ "value" : "Codex 任务完成"
}
}
}
},
- "已更新至 %@" : {
+ "notification.task-waiting.body.codex" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Updated to %@"
+ "value" : "Codex is waiting for approval to continue"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已更新至 %@"
+ "value" : "Codex 正在等待批准下一步操作"
}
}
}
},
- "已等待 %@" : {
+ "notification.task-waiting.body.codex-tool" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Waiting for %@"
+ "value" : "Codex is waiting for approval to use %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已等待 %@"
+ "value" : "Codex 正在等待批准使用 %@"
}
}
}
},
- "已达到防睡眠时间上限 (%@)" : {
+ "notification.task-waiting.body.project" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Keep-awake limit reached (%@)"
+ "value" : "A task in \"%@\" is waiting for approval to continue"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已达到防睡眠时间上限 (%@)"
+ "value" : "「%@」正在等待批准下一步操作"
}
}
}
},
- "已运行 %@" : {
+ "notification.task-waiting.body.project-tool" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Running for %@"
+ "value" : "A task in \"%1$@\" is waiting for approval to use %2$@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已运行 %@"
+ "value" : "「%1$@」正在等待批准 %2$@ 操作"
}
}
}
},
- "已选择 %lld 天" : {
+ "notification.task-waiting.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Selected days: %lld"
+ "value" : "Codex Is Waiting for Approval"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已选择 %lld 天"
+ "value" : "Codex 等待批准"
}
}
}
},
- "已重建 %lld 天, 包含 %lld 条数据" : {
+ "quota.credits.value" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Days rebuilt: %1$lld; events: %2$lld"
+ "value" : "Credits: %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已重建 %1$lld 天, 包含 %2$lld 条数据"
+ "value" : "积分: %@"
}
}
}
},
- "已防止系统睡眠" : {
+ "quota.status.remaining" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "System sleep is currently prevented"
+ "value" : "%1$@: %2$@ remaining"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已防止系统睡眠"
+ "value" : "%1$@ 剩余 %2$@"
}
}
}
},
- "开启" : {
+ "quota.value.unlimited" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Enable"
+ "value" : "Unlimited"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "开启"
+ "value" : "无限"
}
}
}
},
- "开启后, CodexBar 在手动重置临近过期时, 按设置的临期时间提前自动使用重置; 并可能短暂唤醒 Mac" : {
+ "quota.window.fallback" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "When enabled, CodexBar automatically uses a manual reset credit at the configured time before it expires and may briefly wake your Mac."
+ "value" : "Quota"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "开启后, CodexBar 在手动重置临近过期时, 按设置的临期时间提前自动使用重置; 并可能短暂唤醒 Mac"
+ "value" : "额度"
}
}
}
},
- "开启后, CodexBar 会在 Codex 任务运行时防止系统睡眠, 任务结束后自动恢复" : {
+ "request-log.error.exit-timeout-killed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "When enabled, CodexBar prevents system sleep while Codex tasks are running and restores normal sleep afterward."
+ "value" : "app-server did not exit in time and was force-quit"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "开启后, CodexBar 会在 Codex 任务运行时防止系统睡眠, 任务结束后自动恢复"
+ "value" : "app-server 退出超时, 已强制结束"
}
}
}
},
- "开启自动重置?" : {
+ "request-log.error.exit-timeout-running" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Enable Automatic Reset?"
+ "value" : "app-server did not exit in time and may still be running"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "开启自动重置?"
+ "value" : "app-server 退出超时, 可能仍在后台运行"
}
}
}
},
- "开启防止系统睡眠?" : {
+ "request-log.error.initialization-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Enable System Sleep Prevention?"
+ "value" : "Failed to initialize the app-server session: %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "开启防止系统睡眠?"
+ "value" : "app-server 会话初始化失败: %@"
}
}
}
},
- "开机自动启动" : {
+ "request-log.error.launch-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Launch at Login"
+ "value" : "Failed to launch app-server: %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "开机自动启动"
+ "value" : "app-server 启动失败: %@"
}
}
}
},
- "异常会话保护" : {
+ "request-log.error.response-connection-closed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Stalled Task Protection"
+ "value" : "Connection closed while waiting for a response"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "异常会话保护"
+ "value" : "连接已断开, 等待响应失败"
}
}
}
},
- "当前使用" : {
+ "request-log.error.response-timeout" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "In Use"
+ "value" : "Response timed out"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "当前使用"
+ "value" : "等待响应超时"
}
}
}
},
- "当前连胜" : {
+ "request-log.error.write-connection-closed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Current Streak"
+ "value" : "Connection closed; the request could not be sent"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "当前连胜"
+ "value" : "连接已断开, 无法发送请求"
}
}
}
},
- "快捷键已被占用" : {
+ "reset-credits.available-count" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Shortcut is already in use"
+ "value" : "%lld left"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "快捷键已被占用"
+ "value" : "可用: %lld"
}
}
}
},
- "恢复默认" : {
+ "reset-credits.count" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Restore Default"
+ "value" : "Reset: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "恢复默认"
+ "value" : "重置次数: %lld"
}
}
}
},
- "打开系统设置" : {
+ "reset-credits.expiration.label" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Open System Settings"
+ "value" : "Expires"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "打开系统设置"
+ "value" : "过期时间"
}
}
}
},
- "批量重建 %lld 天的数据?" : {
+ "reset-credits.expiration.unknown" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Rebuild selected dates (%lld)?"
+ "value" : "Expiration time unknown"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "批量重建 %lld 天的数据?"
+ "value" : "未知过期时间"
}
}
}
},
- "数据更新时间" : {
+ "settings.about.github-project" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Updated"
+ "value" : "GitHub Project"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "数据更新时间"
+ "value" : "GitHub 项目"
}
}
}
},
- "无法识别该快捷键" : {
+ "settings.about.version" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Shortcut not recognized"
+ "value" : "CodexBar Version"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "无法识别该快捷键"
+ "value" : "CodexBar 版本"
}
}
}
},
- "无法验证 Codex Hook: %@" : {
+ "settings.auto-reset.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not verify Codex Hook: %@"
+ "value" : "Automatic Reset"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "无法验证 Codex Hook: %@"
+ "value" : "自动重置"
}
}
}
},
- "无限" : {
+ "settings.codex-version.in-use" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Unlimited"
+ "value" : "In Use"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "无限"
+ "value" : "当前使用"
}
}
}
},
- "日志" : {
+ "settings.codex-version.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Log"
+ "value" : "Codex Versions"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "日志"
+ "value" : "Codex 版本"
}
}
}
},
- "暂无 Codex 活动" : {
+ "settings.codex-version.updated-to" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No Codex activity"
+ "value" : "Updated to %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "暂无 Codex 活动"
+ "value" : "已更新至 %@"
}
}
}
},
- "暂无同步记录" : {
+ "settings.general.automatic-update-checks" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No sync history"
+ "value" : "Automatically Check for Updates"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "暂无同步记录"
+ "value" : "自动检查更新"
}
}
}
},
- "暂无数据" : {
+ "settings.general.launch-at-login" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No data"
+ "value" : "Launch at Login"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "暂无数据"
+ "value" : "开机自动启动"
}
}
}
},
- "暂无日志" : {
+ "settings.general.launch-at-login-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No log entries"
+ "value" : "Could not update Launch at Login"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "暂无日志"
+ "value" : "设置开机启动失败"
}
}
}
},
- "服务暂时不可用" : {
+ "settings.hotkey.action.clear" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Service temporarily unavailable"
+ "value" : "Clear App Shortcut"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "服务暂时不可用"
+ "value" : "清除 APP 快捷键"
}
}
}
},
- "未登录" : {
+ "settings.hotkey.prompt" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Not signed in"
+ "value" : "Press a Shortcut"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "未登录"
+ "value" : "请设置快捷键"
}
}
}
},
- "未知过期时间" : {
+ "settings.hotkey.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Expiration time unknown"
+ "value" : "App Shortcut"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "未知过期时间"
+ "value" : "APP 快捷键"
}
}
}
},
- "未设置" : {
+ "settings.keep-alive.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Not set"
+ "value" : "Prevent System Sleep"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "未设置"
+ "value" : "防止系统睡眠"
}
}
}
},
- "未选择重建日期范围" : {
+ "settings.menu-bar-quota.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "No date range selected"
+ "value" : "Menu Bar Quota Indicator"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "未选择重建日期范围"
+ "value" : "菜单栏额度指示"
}
}
}
},
- "权限请求" : {
+ "settings.menu-bar-quota.window" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Approvals"
+ "value" : "Quota Window"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "权限请求"
+ "value" : "额度窗口"
}
}
}
},
- "检查更新" : {
+ "settings.notifications.auto-reset.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Check for Updates"
+ "value" : "Automatic Reset Notifications"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "检查更新"
+ "value" : "自动重置通知"
}
}
}
},
- "正在同步" : {
+ "settings.notifications.codex-tui.caption" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Syncing"
+ "value" : "Separate from CodexBar notifications"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "正在同步"
+ "value" : "Codex TUI 通知, 独立于 CodexBar 通知"
}
}
}
},
- "正在思考" : {
+ "settings.notifications.codex-tui.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Thinking"
+ "value" : "Codex TUI Notifications"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "正在思考"
+ "value" : "Codex TUI 通知"
}
}
}
},
- "正在运行" : {
+ "settings.notifications.credit-expiry.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Running"
+ "value" : "Reset Expiration"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "正在运行"
+ "value" : "重置临期通知"
}
}
}
},
- "清空" : {
+ "settings.notifications.keep-alive-limit.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Clear"
+ "value" : "Keep-Awake Limit"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "清空"
+ "value" : "防睡眠上限通知"
}
}
}
},
- "清除 APP 快捷键" : {
+ "settings.notifications.low-battery.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Clear App Shortcut"
+ "value" : "Low Battery Alert"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "清除 APP 快捷键"
+ "value" : "低电量保护通知"
}
}
}
},
- "点击复制" : {
+ "settings.notifications.low-quota.threshold" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Click to Copy"
+ "value" : "Low Quota Threshold"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "点击复制"
+ "value" : "低额度阈值"
}
}
}
},
- "用量强度" : {
+ "settings.notifications.low-quota.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Intensity"
+ "value" : "Low Quota"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "用量强度"
+ "value" : "额度预警通知"
}
}
}
},
- "电量过低, 已恢复系统睡眠" : {
+ "settings.notifications.quota-reset.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Low battery; system sleep restored"
+ "value" : "Quota Reset"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "电量过低, 已恢复系统睡眠"
+ "value" : "额度重置通知"
}
}
}
},
- "积分: %@" : {
+ "settings.notifications.sound.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Credits: %@"
+ "value" : "Sound"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "积分: %@"
+ "value" : "通知音效"
}
}
}
},
- "立即更新" : {
+ "settings.notifications.system.permission-disabled" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Update Now"
+ "value" : "Notifications are disabled in System Settings"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "立即更新"
+ "value" : "系统通知权限未开启"
}
}
}
},
- "等待 %lld" : {
+ "settings.notifications.system.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Waiting: %lld"
+ "value" : "System Notifications"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待 %lld"
+ "value" : "系统通知"
}
}
}
},
- "等待 %lld • 运行 %lld" : {
+ "settings.notifications.task-completion.minimum-duration" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Waiting: %1$lld • Running: %2$lld"
+ "value" : "Task Duration"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待 %1$lld • 运行 %2$lld"
+ "value" : "任务时长"
}
}
}
},
- "等待下一步操作" : {
+ "settings.notifications.task-completion.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Waiting for the next action"
+ "value" : "Task Completion"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待下一步操作"
+ "value" : "任务完成通知"
}
}
}
},
- "等待响应" : {
+ "settings.notifications.task-haptics.caption" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Waiting for response"
+ "value" : "Trackpad haptics when tasks finish or await approval"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待响应"
+ "value" : "任务完成或等待批准时触发触摸板震动"
}
}
}
},
- "等待批准" : {
+ "settings.notifications.task-haptics.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Waiting for approval"
+ "value" : "Task Haptics"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待批准"
+ "value" : "任务触觉反馈"
}
}
}
},
- "等待批准时保持" : {
+ "settings.notifications.task-waiting.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Keep Awake While Waiting"
+ "value" : "Approval Requests"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待批准时保持"
+ "value" : "任务等待通知"
}
}
}
},
- "等待确认" : {
+ "settings.sync.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Waiting for Approval"
+ "value" : "Sync Across Devices"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "等待确认"
+ "value" : "跨设备同步"
}
}
}
},
- "系统睡眠已由其他来源关闭" : {
+ "settings.tab.about" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "System sleep is disabled by another source"
+ "value" : "About"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "系统睡眠已由其他来源关闭"
+ "value" : "关于"
}
}
}
},
- "系统通知" : {
+ "settings.tab.advanced" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "System Notifications"
+ "value" : "Advanced"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "系统通知"
+ "value" : "高级"
}
}
}
},
- "系统通知权限未开启" : {
+ "settings.tab.general" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Notifications are disabled in System Settings"
+ "value" : "General"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "系统通知权限未开启"
+ "value" : "通用"
}
}
}
},
- "网络不可用" : {
+ "settings.task-center.show-in-menu" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Network unavailable"
+ "value" : "Show Task Center in Menu"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "网络不可用"
+ "value" : "主面板任务中心"
}
}
}
},
- "耗时 %@" : {
+ "settings.window.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Duration: %@"
+ "value" : "CodexBar Settings"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "耗时 %@"
+ "value" : "CodexBar 设置"
}
}
}
},
- "自动检查更新" : {
+ "status-item.activity-summary" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Automatically Check for Updates"
+ "value" : "Waiting: %1$lld • Running: %2$lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "自动检查更新"
+ "value" : "等待 %1$lld • 运行 %2$lld"
}
}
}
},
- "自动重置" : {
+ "sync.error.account-unavailable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Automatic Reset"
+ "value" : "Account unavailable"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "自动重置"
+ "value" : "账号不可用"
}
}
}
},
- "自动重置通知" : {
+ "sync.error.network-unavailable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Automatic Reset Notifications"
+ "value" : "Network unavailable"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "自动重置通知"
+ "value" : "网络不可用"
}
}
}
},
- "菜单栏额度指示" : {
+ "sync.error.retry-later" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Menu Bar Quota Indicator"
+ "value" : "Sync failed; try again later"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "菜单栏额度指示"
+ "value" : "同步失败, 请稍后重试"
}
}
}
},
- "设置" : {
+ "sync.error.service-unavailable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Settings"
+ "value" : "Service temporarily unavailable"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "设置"
+ "value" : "服务暂时不可用"
}
}
}
},
- "设置 Codex Hook 失败" : {
+ "sync.status.disabled" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not configure Codex Hook"
+ "value" : "Sync is off"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "设置 Codex Hook 失败"
+ "value" : "同步未开启"
}
}
}
},
- "设置开机启动失败" : {
+ "sync.status.last-sync" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not update Launch at Login"
+ "value" : "Last Sync"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "设置开机启动失败"
+ "value" : "最近同步"
}
}
}
},
- "详情" : {
+ "sync.status.last-sync-time" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Details"
+ "value" : "Last sync: %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "详情"
+ "value" : "最近同步: %@"
}
}
}
},
- "请求" : {
+ "sync.status.no-history" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Request"
+ "value" : "No sync history"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "请求"
+ "value" : "暂无同步记录"
}
}
}
},
- "请设置快捷键" : {
+ "sync.status.syncing" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Press a Shortcut"
+ "value" : "Syncing"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "请设置快捷键"
+ "value" : "正在同步"
}
}
}
},
- "读取 Codex Hook 配置失败" : {
+ "sync.status.unavailable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not read the Codex Hook configuration"
+ "value" : "Sync unavailable"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "读取 Codex Hook 配置失败"
+ "value" : "同步不可用"
}
}
}
},
- "读取 Codex TUI 通知设置失败" : {
+ "updater.action.check" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Could not read Codex TUI notification settings"
+ "value" : "Check for Updates"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "读取 Codex TUI 通知设置失败"
+ "value" : "检查更新"
}
}
}
},
- "调用工具" : {
+ "updater.action.install" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Using tool"
+ "value" : "Update Now"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "调用工具"
+ "value" : "立即更新"
}
}
}
},
- "调用工具 %@" : {
+ "updater.status.check-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Using %@"
+ "value" : "Could not check for updates"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "调用工具 %@"
+ "value" : "检查更新失败"
}
}
}
},
- "调用工具 %@ 完成" : {
+ "updater.status.checking" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Finished using %@"
+ "value" : "Checking for updates"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "调用工具 %@ 完成"
+ "value" : "正在检查更新"
}
}
}
},
- "调用工具完成" : {
+ "updater.status.missing-configuration" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Tool call completed"
+ "value" : "Update source is not configured"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "调用工具完成"
+ "value" : "未配置更新源"
}
}
}
},
- "账号不可用" : {
+ "updater.status.up-to-date" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Account unavailable"
+ "value" : "CodexBar is up to date"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "账号不可用"
+ "value" : "没有可用更新"
}
}
}
},
- "跨设备同步" : {
+ "updater.status.update-available" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Sync Across Devices"
+ "value" : "Version v%@ is available"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "跨设备同步"
+ "value" : "发现新版本: v%@"
}
}
}
},
- "过期时间" : {
+ "usage.heatmap.intensity" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Expires"
+ "value" : "Intensity"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "过期时间"
+ "value" : "用量强度"
}
}
}
},
- "运行 %lld" : {
+ "usage.heatmap.past-weeks" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Running: %lld"
+ "value" : "Past %lld Weeks"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "运行 %lld"
+ "value" : "近 %lld 周"
}
}
}
},
- "运行中" : {
+ "usage.heatmap.top-model" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Running"
+ "value" : "Top Model"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "运行中"
+ "value" : "最热模型"
}
}
}
},
- "近 %lld 周" : {
+ "usage.status.updated" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Past %lld Weeks"
+ "value" : "Updated"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "近 %lld 周"
+ "value" : "数据更新时间"
}
}
}
},
- "进行" : {
+ "usage.summary.current-streak" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "In Progress"
+ "value" : "Current Streak"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "进行"
+ "value" : "当前连胜"
}
}
}
},
- "退出" : {
+ "usage.summary.lifetime-tokens" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Quit"
+ "value" : "Lifetime Tokens"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "退出"
+ "value" : "全时累计"
}
}
}
},
- "退出 CodexBar" : {
+ "usage.summary.longest-chat" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Quit CodexBar"
+ "value" : "Longest Chat"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "退出 CodexBar"
+ "value" : "最长对话"
}
}
}
},
- "选择开始日期" : {
+ "usage.summary.longest-streak" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Select a start date"
+ "value" : "Longest Streak"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "选择开始日期"
+ "value" : "最长连胜"
}
}
}
},
- "选择日期范围" : {
+ "usage.summary.peak-tokens" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Select Date Range"
+ "value" : "Peak Tokens"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "选择日期范围"
+ "value" : "单日峰值"
}
}
}
},
- "选择结束日期" : {
+ "workflow.metric.approvals" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Select an end date"
+ "value" : "Approvals"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "选择结束日期"
+ "value" : "权限请求"
}
}
}
},
- "通用" : {
+ "workflow.metric.compactions" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "General"
+ "value" : "Compactions"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "通用"
+ "value" : "上下文压缩"
}
}
}
},
- "通知音效" : {
+ "workflow.metric.sessions" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Sound"
+ "value" : "Sessions"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "通知音效"
+ "value" : "会话总数"
}
}
}
},
- "重建" : {
+ "workflow.metric.subagents" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Rebuild"
+ "value" : "Subagents"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "重建"
+ "value" : "子智能体"
}
}
}
},
- "重建失败: %@" : {
+ "workflow.metric.tool-calls" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Rebuild failed: %@"
+ "value" : "Tool Calls"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "重建失败: %@"
+ "value" : "工具调用"
}
}
}
},
- "重建数据" : {
+ "workflow.metric.turns" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Rebuild Data"
+ "value" : "Turns"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "重建数据"
+ "value" : "对话轮次"
}
}
}
},
- "重置临期通知" : {
+ "workflow.rebuild.action" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Reset Expiration"
+ "value" : "Rebuild"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "重置临期通知"
+ "value" : "重建"
}
}
}
},
- "重置次数: %lld" : {
+ "workflow.rebuild.confirmation.message" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Reset: %lld"
+ "value" : "Recalculate %@ from local Hook events.\nReplace this device's cloud data for those dates during the next sync."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "重置次数: %lld"
+ "value" : "将从本机原始 Hook 事件重新统计 %@\n并在下次同步时替换当前设备对应日期的云端数据"
}
}
}
},
- "错误" : {
+ "workflow.rebuild.confirmation.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Error"
+ "value" : "Rebuild selected dates (%lld)?"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "错误"
+ "value" : "批量重建 %lld 天的数据?"
}
}
}
},
- "长时间没有进展时隐藏任务并停止参与防睡眠" : {
+ "workflow.rebuild.error.source-changed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Hide inactive tasks and exclude them from keep-awake"
+ "value" : "Local data changed; try again"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "长时间没有进展时隐藏任务并停止参与防睡眠"
+ "value" : "本地数据发生变化, 请重试"
}
}
}
},
- "防止系统睡眠" : {
+ "workflow.rebuild.error.source-unavailable" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Prevent System Sleep"
+ "value" : "No local data is available to rebuild"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "防止系统睡眠"
+ "value" : "没有可重建的本地数据"
}
}
}
},
- "防睡眠上限通知" : {
+ "workflow.rebuild.selection.day-count" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Keep-Awake Limit"
+ "value" : "Selected days: %lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "防睡眠上限通知"
+ "value" : "已选择 %lld 天"
}
}
}
},
- "防睡眠时长超过阈值后自动恢复系统睡眠" : {
+ "workflow.rebuild.selection.none" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Restore normal sleep when the limit is reached"
+ "value" : "No date range selected"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "防睡眠时长超过阈值后自动恢复系统睡眠"
+ "value" : "未选择重建日期范围"
}
}
}
},
- "需要 Codex %@ 或更高版本" : {
+ "workflow.rebuild.status.failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Codex %@ or later is required"
+ "value" : "Rebuild failed: %@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "需要 Codex %@ 或更高版本"
+ "value" : "重建失败: %@"
}
}
}
},
- "需要安装并授权 CodexBar Helper 后台运行" : {
+ "workflow.rebuild.summary.additional-dates" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CodexBar Helper must be installed and authorized to run in the background"
+ "value" : ", etc."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "需要安装并授权 CodexBar Helper 后台运行"
+ "value" : " 等"
}
}
}
},
- "需要授权允许 CodexBar 后台运行" : {
+ "workflow.rebuild.summary.cloud-replacement-pending" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Allow CodexBar to run in the background"
+ "value" : "; cloud data will be replaced when sync becomes available"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "需要授权允许 CodexBar 后台运行"
+ "value" : "; 云端替换将在同步可用后继续"
}
}
}
},
- "预览" : {
+ "workflow.rebuild.summary.completed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Preview"
+ "value" : "Days rebuilt: %1$lld; events: %2$lld"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "预览"
+ "value" : "已重建 %1$lld 天, 包含 %2$lld 条数据"
}
}
}
},
- "预览完整%@" : {
+ "workflow.rebuild.summary.incomplete-dates" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Preview Full %@"
+ "value" : "; dates not rebuilt (%1$lld): %2$@"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "预览完整%@"
+ "value" : "; %1$lld 天未完成 (%2$@)"
}
}
}
},
- "额度窗口" : {
+ "workflow.rebuild.summary.retry-after-hook-enabled" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Quota Window"
+ "value" : ", will retry automatically after CodexBar Hook is enabled"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "额度窗口"
+ "value" : ", 开启 CodexBar Hook 后会自动重试"
}
}
}
},
- "额度重置通知" : {
+ "workflow.rebuild.summary.retry-later" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Quota Reset"
+ "value" : ", will retry automatically"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "额度重置通知"
+ "value" : ", 稍后会自动重试"
}
}
}
},
- "额度预警通知" : {
+ "workflow.rebuild.summary.skipped-invalid-events" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Low Quota"
+ "value" : "; skipped %lld invalid events"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "额度预警通知"
+ "value" : ", 跳过 %lld 条无效数据"
}
}
}
},
- "高级" : {
+ "workflow.rebuild.summary.sync-replacement-marking-failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Advanced"
+ "value" : "; could not replace cloud data; try rebuilding this data later"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "高级"
+ "value" : "; 云端替换未能完成, 请稍后重新重建这些数据"
}
}
}
},
- "默认快捷键 %@ 已被占用" : {
+ "workflow.rebuild.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Default shortcut %@ is already in use"
+ "value" : "Rebuild Data"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "默认快捷键 %@ 已被占用"
+ "value" : "重建数据"
}
}
}
diff --git a/CodexBar/Services/CodexCLI/CodexCLIVersionService.swift b/CodexBar/Services/CodexCLI/CodexCLIVersionService.swift
index 2f66a72..4a48698 100644
--- a/CodexBar/Services/CodexCLI/CodexCLIVersionService.swift
+++ b/CodexBar/Services/CodexCLI/CodexCLIVersionService.swift
@@ -43,14 +43,11 @@ nonisolated struct CodexCLIVersionItem: Equatable, Identifiable {
if path == nil {
return String(
localized: "codex-cli.version.not-found",
- defaultValue: "未找到 \(source.displayName)"
+ defaultValue: "\(source.displayName)"
)
}
- return version ?? errorMessage ?? String(
- localized: "codex-cli.version.unknown",
- defaultValue: "未知版本"
- )
+ return version ?? errorMessage ?? String(localized: "codex-cli.version.unknown")
}
}
@@ -314,13 +311,13 @@ actor CodexCLIVersionService {
var message: String {
switch self {
case .launch:
- String(localized: "codex-cli.version.launch-failed", defaultValue: "启动失败")
+ String(localized: "codex-cli.version.launch-failed")
case .timeout:
- String(localized: "codex-cli.version.read-timeout", defaultValue: "读取超时")
+ String(localized: "codex-cli.version.read-timeout")
case .read:
- String(localized: "codex-cli.version.read-failed", defaultValue: "读取失败")
+ String(localized: "codex-cli.version.read-failed")
case .parse:
- String(localized: "codex-cli.version.parse-failed", defaultValue: "版本未知")
+ String(localized: "codex-cli.version.parse-failed")
}
}
}
diff --git a/CodexBar/Services/CodexStatus/AppServerSession.swift b/CodexBar/Services/CodexStatus/AppServerSession.swift
index 194554b..9497815 100644
--- a/CodexBar/Services/CodexStatus/AppServerSession.swift
+++ b/CodexBar/Services/CodexStatus/AppServerSession.swift
@@ -8,18 +8,9 @@ final nonisolated class AppServerSession {
private typealias EncodedMessage = (data: Data, text: String)
private typealias ResponseLine = (text: String, data: Data)
- private static let writeFailureMessage = String(
- localized: "request-log.error.write-connection-closed",
- defaultValue: "连接已断开, 无法发送请求"
- )
- private static let responseConnectionClosedMessage = String(
- localized: "request-log.error.response-connection-closed",
- defaultValue: "连接已断开, 等待响应失败"
- )
- private static let responseTimeoutMessage = String(
- localized: "request-log.error.response-timeout",
- defaultValue: "等待响应超时"
- )
+ private static let writeFailureMessage = String(localized: "request-log.error.write-connection-closed")
+ private static let responseConnectionClosedMessage = String(localized: "request-log.error.response-connection-closed")
+ private static let responseTimeoutMessage = String(localized: "request-log.error.response-timeout")
private static let closeGracefulTimeout: TimeInterval = 1.0
private static let closeKillTimeout: TimeInterval = 0.5
@@ -59,17 +50,11 @@ final nonisolated class AppServerSession {
break
case .killed:
RequestLogStorage.shared.recordFailure(
- message: String(
- localized: "request-log.error.exit-timeout-killed",
- defaultValue: "app-server 退出超时, 已强制结束"
- )
+ message: String(localized: "request-log.error.exit-timeout-killed")
)
case .stillRunning:
RequestLogStorage.shared.recordFailure(
- message: String(
- localized: "request-log.error.exit-timeout-running",
- defaultValue: "app-server 退出超时, 可能仍在后台运行"
- )
+ message: String(localized: "request-log.error.exit-timeout-running")
)
}
}
diff --git a/CodexBar/Services/CodexStatus/CodexStatusService.swift b/CodexBar/Services/CodexStatus/CodexStatusService.swift
index 627e2cf..8cecc10 100644
--- a/CodexBar/Services/CodexStatus/CodexStatusService.swift
+++ b/CodexBar/Services/CodexStatus/CodexStatusService.swift
@@ -671,7 +671,7 @@ actor CodexStatusService {
RequestLogStorage.shared.recordFailure(
message: String(
localized: "request-log.error.launch-failed",
- defaultValue: "app-server 启动失败: \(error.localizedDescription)"
+ defaultValue: "\(error.localizedDescription)"
)
)
return .initializationFailed
@@ -753,7 +753,7 @@ actor CodexStatusService {
RequestLogStorage.shared.recordFailure(
message: String(
localized: "request-log.error.initialization-failed",
- defaultValue: "app-server 会话初始化失败: \(error.localizedDescription)"
+ defaultValue: "\(error.localizedDescription)"
)
)
session.close()
diff --git a/CodexBar/Services/KeepAlive/KeepAliveController.swift b/CodexBar/Services/KeepAlive/KeepAliveController.swift
index 5c7e38a..dafdf98 100644
--- a/CodexBar/Services/KeepAlive/KeepAliveController.swift
+++ b/CodexBar/Services/KeepAlive/KeepAliveController.swift
@@ -319,7 +319,7 @@ final class KeepAliveController: ObservableObject {
return
}
- AppLog.keepAlive.notice("KeepAlive 等待批准时保持变更: enabled=\(enabled ? 1 : 0)")
+ AppLog.keepAlive.notice("KeepAlive 等待批准时保持防睡眠变更: enabled=\(enabled ? 1 : 0)")
keepsAwakeWhileWaiting = enabled
defaults.set(enabled, forKey: Self.keepsAwakeWhileWaitingKey)
// 快照不会因为改设置重发一次, 正等着批准的那些任务只能在这里重新求值
diff --git a/CodexBar/Services/KeepAlive/KeepAliveModels.swift b/CodexBar/Services/KeepAlive/KeepAliveModels.swift
index b94b8b4..b947a0a 100644
--- a/CodexBar/Services/KeepAlive/KeepAliveModels.swift
+++ b/CodexBar/Services/KeepAlive/KeepAliveModels.swift
@@ -17,7 +17,7 @@ extension KeepAliveController {
var title: String {
self == .off
- ? String(localized: "keep-alive.low-battery.off", defaultValue: "关闭")
+ ? String(localized: "keep-alive.low-battery.off")
: CodexPercentageFormat.string(from: rawValue)
}
@@ -42,16 +42,13 @@ extension KeepAliveController {
var title: String {
guard self != .unlimited else {
- return String(
- localized: "keep-alive.duration.unlimited",
- defaultValue: "无限制"
- )
+ return String(localized: "keep-alive.duration.unlimited")
}
let hours = rawValue / 3600
return String(
localized: "keep-alive.duration.hours",
- defaultValue: "\(hours) 小时"
+ defaultValue: "\(hours)"
)
}
@@ -121,58 +118,19 @@ extension KeepAliveController {
}
nonisolated enum KeepAliveLocalizedMessage {
- static let helperAssetsMissing = String(
- localized: "keep-alive.error.helper-assets-missing",
- defaultValue: "服务异常, 请重新安装 CodexBar"
- )
- static let registrationFailed = String(
- localized: "keep-alive.error.registration-failed",
- defaultValue: "注册服务失败"
- )
- static let updateFailed = String(
- localized: "keep-alive.error.update-failed",
- defaultValue: "更新服务失败"
- )
- static let preventIdleSleepFailed = String(
- localized: "keep-alive.error.prevent-idle-sleep-failed",
- defaultValue: "防止空闲睡眠失败"
- )
- static let toggleSleepFailed = String(
- localized: "keep-alive.error.toggle-sleep-failed",
- defaultValue: "切换睡眠状态失败"
- )
- static let restoreIdleSleepFailed = String(
- localized: "keep-alive.error.restore-idle-sleep-failed",
- defaultValue: "恢复空闲睡眠策略失败"
- )
- static let requestSystemSleepFailed = String(
- localized: "keep-alive.error.request-system-sleep-failed",
- defaultValue: "请求系统睡眠失败"
- )
- static let connectionFailed = String(
- localized: "keep-alive.error.connection-failed",
- defaultValue: "连接服务失败"
- )
- static let noResponse = String(
- localized: "keep-alive.error.no-response",
- defaultValue: "服务无响应"
- )
- static let retryLimitReached = String(
- localized: "keep-alive.error.retry-limit-reached",
- defaultValue: "防睡眠多次失败, 已停止重试"
- )
- static let invalidHelperInterface = String(
- localized: "keep-alive.error.invalid-helper-interface",
- defaultValue: "服务接口无效"
- )
- static let connectionInterrupted = String(
- localized: "keep-alive.error.connection-interrupted",
- defaultValue: "服务连接中断"
- )
- static let autoResetWakeScheduleFailed = String(
- localized: "keep-alive.error.auto-reset-wake-schedule-failed",
- defaultValue: "设置自动重置唤醒计划失败"
- )
+ static let helperAssetsMissing = String(localized: "keep-alive.error.helper-assets-missing")
+ static let registrationFailed = String(localized: "keep-alive.error.registration-failed")
+ static let updateFailed = String(localized: "keep-alive.error.update-failed")
+ static let preventIdleSleepFailed = String(localized: "keep-alive.error.prevent-idle-sleep-failed")
+ static let toggleSleepFailed = String(localized: "keep-alive.error.toggle-sleep-failed")
+ static let restoreIdleSleepFailed = String(localized: "keep-alive.error.restore-idle-sleep-failed")
+ static let requestSystemSleepFailed = String(localized: "keep-alive.error.request-system-sleep-failed")
+ static let connectionFailed = String(localized: "keep-alive.error.connection-failed")
+ static let noResponse = String(localized: "keep-alive.error.no-response")
+ static let retryLimitReached = String(localized: "keep-alive.error.retry-limit-reached")
+ static let invalidHelperInterface = String(localized: "keep-alive.error.invalid-helper-interface")
+ static let connectionInterrupted = String(localized: "keep-alive.error.connection-interrupted")
+ static let autoResetWakeScheduleFailed = String(localized: "keep-alive.error.auto-reset-wake-schedule-failed")
}
nonisolated enum KeepAliveError: LocalizedError {
diff --git a/CodexBar/Services/Notifications/CodexNotificationService.swift b/CodexBar/Services/Notifications/CodexNotificationService.swift
index 426d328..bfc3347 100644
--- a/CodexBar/Services/Notifications/CodexNotificationService.swift
+++ b/CodexBar/Services/Notifications/CodexNotificationService.swift
@@ -798,13 +798,10 @@ nonisolated struct CodexNotificationContent: Equatable {
let thresholdText = CodexPercentageFormat.string(from: thresholdPercent)
return CodexNotificationContent(
kind: "lowQuota",
- title: String(
- localized: "notification.low-quota.title",
- defaultValue: "Codex 额度不足"
- ),
+ title: String(localized: "notification.low-quota.title"),
body: String(
localized: "notification.low-quota.body",
- defaultValue: "\(limitTitle) \(windowLabel) 剩余额度已低于 \(thresholdText)"
+ defaultValue: "\(limitTitle)\(windowLabel)\(thresholdText)"
)
)
}
@@ -815,13 +812,10 @@ nonisolated struct CodexNotificationContent: Equatable {
) -> CodexNotificationContent {
CodexNotificationContent(
kind: "quotaReset",
- title: String(
- localized: "notification.quota-reset.title",
- defaultValue: "额度已重置"
- ),
+ title: String(localized: "notification.quota-reset.title"),
body: String(
localized: "notification.quota-reset.body",
- defaultValue: "\(limitTitle) \(windowLabel)"
+ defaultValue: "\(limitTitle)\(windowLabel)"
)
)
}
@@ -830,7 +824,7 @@ nonisolated struct CodexNotificationContent: Equatable {
let body = if let remainingCount {
String(
localized: "notification.auto-reset.body.count",
- defaultValue: "剩余重置次数: \(remainingCount)"
+ defaultValue: "\(remainingCount)"
)
} else {
""
@@ -838,10 +832,7 @@ nonisolated struct CodexNotificationContent: Equatable {
return CodexNotificationContent(
kind: "autoResetSucceeded",
- title: String(
- localized: "notification.auto-reset.title",
- defaultValue: "自动重置"
- ),
+ title: String(localized: "notification.auto-reset.title"),
body: body
)
}
@@ -851,28 +842,16 @@ nonisolated struct CodexNotificationContent: Equatable {
) -> CodexNotificationContent {
let body = switch reason {
case .expired:
- String(
- localized: "notification.auto-reset-failed.body.expired",
- defaultValue: "重置次数已过期, 自动重置未完成"
- )
+ String(localized: "notification.auto-reset-failed.body.expired")
case .authentication:
- String(
- localized: "notification.auto-reset-failed.body.authentication",
- defaultValue: "Codex 登录状态已失效"
- )
+ String(localized: "notification.auto-reset-failed.body.authentication")
case .permanent:
- String(
- localized: "notification.auto-reset-failed.body.permanent",
- defaultValue: "请求无法完成"
- )
+ String(localized: "notification.auto-reset-failed.body.permanent")
}
return CodexNotificationContent(
kind: "autoResetFailed",
- title: String(
- localized: "notification.auto-reset-failed.title",
- defaultValue: "自动重置失败"
- ),
+ title: String(localized: "notification.auto-reset-failed.title"),
body: body
)
}
@@ -882,21 +861,18 @@ nonisolated struct CodexNotificationContent: Equatable {
let body = if let project {
String(
localized: "notification.task-completed.body.project",
- defaultValue: "「\(project)」任务完成, \(durationText)"
+ defaultValue: "\(project)\(durationText)"
)
} else {
String(
localized: "notification.task-completed.body.codex",
- defaultValue: "Codex 任务完成, \(durationText)"
+ defaultValue: "\(durationText)"
)
}
return CodexNotificationContent(
kind: "taskCompleted",
- title: String(
- localized: "notification.task-completed.title",
- defaultValue: "Codex 任务完成"
- ),
+ title: String(localized: "notification.task-completed.title"),
body: body
)
}
@@ -906,31 +882,25 @@ nonisolated struct CodexNotificationContent: Equatable {
case let (project?, toolName?):
String(
localized: "notification.task-waiting.body.project-tool",
- defaultValue: "「\(project)」正在等待批准 \(toolName) 操作"
+ defaultValue: "\(project)\(toolName)"
)
case let (project?, nil):
String(
localized: "notification.task-waiting.body.project",
- defaultValue: "「\(project)」正在等待批准下一步操作"
+ defaultValue: "\(project)"
)
case let (nil, toolName?):
String(
localized: "notification.task-waiting.body.codex-tool",
- defaultValue: "Codex 正在等待批准 \(toolName) 操作"
+ defaultValue: "\(toolName)"
)
case (nil, nil):
- String(
- localized: "notification.task-waiting.body.codex",
- defaultValue: "Codex 正在等待批准下一步操作"
- )
+ String(localized: "notification.task-waiting.body.codex")
}
return CodexNotificationContent(
kind: "taskWaiting",
- title: String(
- localized: "notification.task-waiting.title",
- defaultValue: "Codex 等待批准"
- ),
+ title: String(localized: "notification.task-waiting.title"),
body: body
)
}
@@ -942,21 +912,18 @@ nonisolated struct CodexNotificationContent: Equatable {
let body = if let project {
String(
localized: "notification.activity-protection.body.project",
- defaultValue: "\(project) 已静默 \(inactivityDurationText), 已隐藏并停止参与防睡眠"
+ defaultValue: "\(project)\(inactivityDurationText)"
)
} else {
String(
localized: "notification.activity-protection.body.codex",
- defaultValue: "Codex 任务已静默 \(inactivityDurationText), 已隐藏并停止参与防睡眠"
+ defaultValue: "\(inactivityDurationText)"
)
}
return CodexNotificationContent(
kind: "activityProtection",
- title: String(
- localized: "notification.activity-protection.title",
- defaultValue: "Codex 任务长时间无进展"
- ),
+ title: String(localized: "notification.activity-protection.title"),
body: body
)
}
@@ -965,13 +932,10 @@ nonisolated struct CodexNotificationContent: Equatable {
let expirationText = CodexDateFormat.localDisplayString(from: expirationDate)
return CodexNotificationContent(
kind: "creditExpiry",
- title: String(
- localized: "notification.credit-expiry.title",
- defaultValue: "重置即将过期"
- ),
+ title: String(localized: "notification.credit-expiry.title"),
body: String(
localized: "notification.credit-expiry.body",
- defaultValue: "有 \(count) 个重置次数将于 \(expirationText) 过期"
+ defaultValue: "\(count)\(expirationText)"
)
)
}
@@ -980,13 +944,10 @@ nonisolated struct CodexNotificationContent: Equatable {
let percentText = CodexPercentageFormat.string(from: percent)
return CodexNotificationContent(
kind: "lowBattery",
- title: String(
- localized: "notification.keep-alive-ended.title",
- defaultValue: "已恢复系统睡眠"
- ),
+ title: String(localized: "notification.keep-alive-ended.title"),
body: String(
localized: "notification.keep-alive-ended.low-battery",
- defaultValue: "电量剩余 \(percentText), 已停止防睡眠"
+ defaultValue: "\(percentText)"
)
)
}
@@ -994,13 +955,10 @@ nonisolated struct CodexNotificationContent: Equatable {
static func keepAliveLimit(durationText: String) -> CodexNotificationContent {
CodexNotificationContent(
kind: "keepAliveLimit",
- title: String(
- localized: "notification.keep-alive-ended.title",
- defaultValue: "已恢复系统睡眠"
- ),
+ title: String(localized: "notification.keep-alive-ended.title"),
body: String(
localized: "notification.keep-alive-ended.duration-limit",
- defaultValue: "已达防睡眠上限 \(durationText), 已停止防睡眠"
+ defaultValue: "\(durationText)"
)
)
}
diff --git a/CodexBar/Services/Notifications/NotificationSoundOption.swift b/CodexBar/Services/Notifications/NotificationSoundOption.swift
index 2ee1c33..9a730b3 100644
--- a/CodexBar/Services/Notifications/NotificationSoundOption.swift
+++ b/CodexBar/Services/Notifications/NotificationSoundOption.swift
@@ -13,9 +13,9 @@ struct NotificationSoundOption: Identifiable, Hashable {
var localizedTitle: String {
switch source {
case .silent:
- String(localized: "notification.sound.silent", defaultValue: "静音")
+ String(localized: "notification.sound.silent")
case .systemDefault:
- String(localized: "notification.sound.default", defaultValue: "默认")
+ String(localized: "notification.sound.default")
case .system, .bundled:
title
}
diff --git a/CodexBar/Services/Settings/ActivityProtectionSettings.swift b/CodexBar/Services/Settings/ActivityProtectionSettings.swift
index ad293e4..75bb277 100644
--- a/CodexBar/Services/Settings/ActivityProtectionSettings.swift
+++ b/CodexBar/Services/Settings/ActivityProtectionSettings.swift
@@ -63,16 +63,13 @@ extension ActivityProtectionSettings {
var title: String {
if self == .thirtyMinutes {
- return String(
- localized: "activity-protection.duration.thirty-minutes",
- defaultValue: "30 分钟"
- )
+ return String(localized: "activity-protection.duration.thirty-minutes")
}
let hours = rawValue / 3600
return String(
localized: "activity-protection.duration.hours",
- defaultValue: "\(hours) 小时"
+ defaultValue: "\(hours)"
)
}
}
diff --git a/CodexBar/Services/Settings/AutoResetSettings.swift b/CodexBar/Services/Settings/AutoResetSettings.swift
index 3cf16d0..d541caa 100644
--- a/CodexBar/Services/Settings/AutoResetSettings.swift
+++ b/CodexBar/Services/Settings/AutoResetSettings.swift
@@ -17,17 +17,17 @@ nonisolated enum AutoResetLeadTime: Int, CaseIterable, Hashable, Sendable {
var title: String {
switch self {
case .fifteenMinutes:
- String(localized: "15 分钟")
+ String(localized: "auto-reset.lead-time.fifteen-minutes")
case .thirtyMinutes:
- String(localized: "30 分钟")
+ String(localized: "auto-reset.lead-time.thirty-minutes")
case .oneHour:
- String(localized: "1 小时")
+ String(localized: "auto-reset.lead-time.one-hour")
case .twoHours:
- String(localized: "2 小时")
+ String(localized: "auto-reset.lead-time.two-hours")
case .fourHours:
- String(localized: "4 小时")
+ String(localized: "auto-reset.lead-time.four-hours")
case .sixHours:
- String(localized: "6 小时")
+ String(localized: "auto-reset.lead-time.six-hours")
}
}
}
diff --git a/CodexBar/Services/Settings/CodexCLINotificationSettings.swift b/CodexBar/Services/Settings/CodexCLINotificationSettings.swift
index 133c249..6f3839d 100644
--- a/CodexBar/Services/Settings/CodexCLINotificationSettings.swift
+++ b/CodexBar/Services/Settings/CodexCLINotificationSettings.swift
@@ -68,8 +68,8 @@ final class CodexCLINotificationSettings: ObservableObject {
var errorPrefix: String {
switch self {
- case .read: String(localized: "读取 Codex TUI 通知设置失败")
- case .write: String(localized: "写入 Codex TUI 通知设置失败")
+ case .read: String(localized: "codex-tui-notifications.error.read-failed")
+ case .write: String(localized: "codex-tui-notifications.error.write-failed")
}
}
@@ -145,7 +145,7 @@ final class CodexCLINotificationSettings: ObservableObject {
case verificationFailed
var errorDescription: String? {
- String(localized: "Codex TUI 通知状态与设置不一致")
+ String(localized: "codex-tui-notifications.error.state-mismatch")
}
}
diff --git a/CodexBar/Services/Settings/CodexHookSettings.swift b/CodexBar/Services/Settings/CodexHookSettings.swift
index f785b12..80c3f6f 100644
--- a/CodexBar/Services/Settings/CodexHookSettings.swift
+++ b/CodexBar/Services/Settings/CodexHookSettings.swift
@@ -82,7 +82,7 @@ final class CodexHookSettings: ObservableObject {
"action=keepLastKnown"
)
AppLog.hooks.error("Hook 读取失败: \(details, privacy: .public)")
- readErrorMessage = String(localized: "读取 Codex Hook 配置失败")
+ readErrorMessage = String(localized: "hook.error.config-read-failed")
}
}
@@ -171,7 +171,7 @@ final class CodexHookSettings: ObservableObject {
}
// 这一支是"验不了"而不是"确认不通", isVerified 保留上次的值
- operationErrorMessage = String(localized: "无法验证 Codex Hook: \(error.localizedDescription)")
+ operationErrorMessage = String(localized: "hook.error.verification-failed", defaultValue: "\(error.localizedDescription)")
}
}
@@ -256,7 +256,7 @@ final class CodexHookSettings: ObservableObject {
"Hook 写入失败: detail=\(error.localizedDescription, privacy: .public)"
)
refresh()
- operationErrorMessage = String(localized: "设置 Codex Hook 失败")
+ operationErrorMessage = String(localized: "hook.error.configuration-failed")
}
}
}
@@ -305,18 +305,18 @@ private extension CodexHookSettings {
var errorDescription: String? {
switch self {
case .invalidFormat:
- String(localized: "hooks.json 文件格式错误")
+ String(localized: "hook.error.invalid-config-format")
case .hooksGloballyDisabled:
- String(localized: "Codex 配置已禁用 Hook")
+ String(localized: "hook.status.disabled-by-codex")
case let .codexVersionUnavailable(minimum):
String(
localized: "codex-hook.version.unavailable",
- defaultValue: "启用 CodexBar Hook 需要 Codex \(minimum) 或更高版本"
+ defaultValue: "\(minimum)"
)
case let .unsupportedCodexVersion(minimum):
String(
localized: "codex-hook.version.unsupported",
- defaultValue: "启用 CodexBar Hook 需要 \(minimum) 或更高版本"
+ defaultValue: "\(minimum)"
)
case let .hookValidationFailed(message):
message
@@ -472,7 +472,7 @@ private extension CodexHookSettings {
"detail=\(discoveryError.localizedDescription)"
)
AppLog.hooks.error("Hook 信任清理失败: \(details, privacy: .public)")
- operationErrorMessage = String(localized: "已关闭 Codex Hook, 清理信任状态失败")
+ operationErrorMessage = String(localized: "hook.error.trust-cleanup-failed")
} else {
operationErrorMessage = nil
}
@@ -488,7 +488,7 @@ private extension CodexHookSettings {
"detail=\(error.localizedDescription)"
)
AppLog.hooks.error("Hook 信任清理失败: \(details, privacy: .public)")
- operationErrorMessage = String(localized: "已关闭 Codex Hook, 清理信任状态失败")
+ operationErrorMessage = String(localized: "hook.error.trust-cleanup-failed")
}
}
@@ -649,7 +649,7 @@ private extension CodexHookSettings {
hooksURL: URL
) -> String? {
guard !response.data.isEmpty else {
- return String(localized: "Codex 没有返回任何结果")
+ return String(localized: "codex-status.result.empty")
}
let entries = response.data
@@ -679,22 +679,22 @@ private extension CodexHookSettings {
}
if !errors.isEmpty {
- return String(localized: "Codex 返回错误")
+ return String(localized: "codex-status.result.error")
}
if hasDisabledHook {
- return String(localized: "CodexBar Hook 已被禁用")
+ return String(localized: "hook.status.disabled")
}
if hasUntrustedHook {
- return String(localized: "CodexBar Hook 未被信任")
+ return String(localized: "hook.status.untrusted")
}
if hasMissingEvent {
- return String(localized: "CodexBar Hook 已不完整")
+ return String(localized: "hook.status.incomplete")
}
if hasUnexpectedSource {
- return String(localized: "CodexBar Hook 意外来源")
+ return String(localized: "hook.status.unexpected-source")
}
if !warnings.isEmpty {
- return String(localized: "Codex 返回警告")
+ return String(localized: "codex-status.result.warning")
}
return nil
diff --git a/CodexBar/Services/Settings/LoginItemSettings.swift b/CodexBar/Services/Settings/LoginItemSettings.swift
index cb05a2e..d115dd7 100644
--- a/CodexBar/Services/Settings/LoginItemSettings.swift
+++ b/CodexBar/Services/Settings/LoginItemSettings.swift
@@ -32,7 +32,7 @@ final class LoginItemSettings: ObservableObject {
)
AppLog.settings.error("开机自动启动失败: \(details, privacy: .public)")
refresh()
- errorMessage = String(localized: "设置开机启动失败")
+ errorMessage = String(localized: "settings.general.launch-at-login-failed")
}
}
}
diff --git a/CodexBar/Services/Settings/MenuBarQuotaSettings.swift b/CodexBar/Services/Settings/MenuBarQuotaSettings.swift
index ba64c24..6b24383 100644
--- a/CodexBar/Services/Settings/MenuBarQuotaSettings.swift
+++ b/CodexBar/Services/Settings/MenuBarQuotaSettings.swift
@@ -138,11 +138,11 @@ nonisolated enum MenuBarQuotaSelection: String, Identifiable {
var fallbackTitle: String {
switch self {
case .off:
- String(localized: "menu-bar-quota.selection.off", defaultValue: "关闭")
+ String(localized: "menu-bar-quota.selection.off")
case .primary:
- String(localized: "menu-bar-quota.selection.primary", defaultValue: "主额度")
+ String(localized: "menu-bar-quota.selection.primary")
case .secondary:
- String(localized: "menu-bar-quota.selection.secondary", defaultValue: "次额度")
+ String(localized: "menu-bar-quota.selection.secondary")
}
}
diff --git a/CodexBar/Services/Settings/WorkflowSyncSettings.swift b/CodexBar/Services/Settings/WorkflowSyncSettings.swift
index 108d5cb..412926d 100644
--- a/CodexBar/Services/Settings/WorkflowSyncSettings.swift
+++ b/CodexBar/Services/Settings/WorkflowSyncSettings.swift
@@ -93,7 +93,7 @@ final class WorkflowSyncSettings: ObservableObject {
}
var unavailableMessage: String? {
- syncAvailability.isUnavailable ? String(localized: "同步不可用") : nil
+ syncAvailability.isUnavailable ? String(localized: "sync.status.unavailable") : nil
}
var lastUploadAtText: String? {
@@ -284,13 +284,13 @@ nonisolated enum WorkflowSyncFailureReason: String {
var message: String {
switch self {
case .networkUnavailable:
- String(localized: "网络不可用")
+ String(localized: "sync.error.network-unavailable")
case .accountUnavailable:
- String(localized: "账号不可用")
+ String(localized: "sync.error.account-unavailable")
case .serviceUnavailable:
- String(localized: "服务暂时不可用")
+ String(localized: "sync.error.service-unavailable")
case .retryLater:
- String(localized: "同步失败, 请稍后重试")
+ String(localized: "sync.error.retry-later")
}
}
}
diff --git a/CodexBar/Services/Updates/AppUpdater.swift b/CodexBar/Services/Updates/AppUpdater.swift
index f3fd65b..6306ada 100644
--- a/CodexBar/Services/Updates/AppUpdater.swift
+++ b/CodexBar/Services/Updates/AppUpdater.swift
@@ -21,10 +21,7 @@ final class AppUpdater: NSObject, ObservableObject {
private var isManualCheckInProgress = false
private var manualCheckTimeoutTask: Task<Void, Never>?
- private static let missingUpdateConfigurationMessage = String(
- localized: "updater.status.missing-configuration",
- defaultValue: "未配置更新资源"
- )
+ private static let missingUpdateConfigurationMessage = String(localized: "updater.status.missing-configuration")
/// Sparkle 可能既不回调 didFindValidUpdate / didNotFindUpdate 也不回调 didAbortWithError
/// (后台检查已在进行, 或 feed 请求被放弃), 超时复位避免永久停留在手动检查态
private static let manualCheckTimeout = Duration.seconds(30)
@@ -61,7 +58,7 @@ final class AppUpdater: NSObject, ObservableObject {
AppLog.app.notice("更新检查开始: trigger=\(LogTrigger.manual.rawValue, privacy: .public)")
beginManualCheck()
showSettingsStatusMessage(
- String(localized: "updater.status.checking", defaultValue: "正在检查更新")
+ String(localized: "updater.status.checking")
)
updaterController.updater.checkForUpdateInformation()
}
@@ -153,7 +150,7 @@ extension AppUpdater: SPUUpdaterDelegate {
let version = item.displayVersionString
let message = String(
localized: "updater.status.update-available",
- defaultValue: "发现新版本: v\(version)"
+ defaultValue: "\(version)"
)
availableUpdateMessage = message
let trigger = checkTrigger.rawValue
@@ -185,7 +182,7 @@ extension AppUpdater: SPUUpdaterDelegate {
if isManualCheckInProgress {
showSettingsStatusMessage(
- String(localized: "updater.status.up-to-date", defaultValue: "没有可用更新"),
+ String(localized: "updater.status.up-to-date"),
autoDismissDelay: .milliseconds(1000)
)
}
@@ -210,7 +207,7 @@ extension AppUpdater: SPUUpdaterDelegate {
}
showSettingsStatusMessage(
- String(localized: "updater.status.check-failed", defaultValue: "检查更新失败")
+ String(localized: "updater.status.check-failed")
)
finishManualCheck()
}
diff --git a/CodexBar/Services/Workflow/WorkflowService.swift b/CodexBar/Services/Workflow/WorkflowService.swift
index ef53b4c..63cc322 100644
--- a/CodexBar/Services/Workflow/WorkflowService.swift
+++ b/CodexBar/Services/Workflow/WorkflowService.swift
@@ -1459,15 +1459,9 @@ private nonisolated enum WorkflowDataRebuildError: LocalizedError {
var errorDescription: String? {
switch self {
case .sourceUnavailable:
- String(
- localized: "workflow.rebuild.error.source-unavailable",
- defaultValue: "没有可重建的本地数据"
- )
+ String(localized: "workflow.rebuild.error.source-unavailable")
case .sourceChanged:
- String(
- localized: "workflow.rebuild.error.source-changed",
- defaultValue: "本地数据发生变化, 请重试"
- )
+ String(localized: "workflow.rebuild.error.source-changed")
}
}
}
diff --git a/CodexBar/Views/Log/LogView.swift b/CodexBar/Views/Log/LogView.swift
index 4fc581f..3cc5e6e 100644
--- a/CodexBar/Views/Log/LogView.swift
+++ b/CodexBar/Views/Log/LogView.swift
@@ -26,7 +26,7 @@ struct LogView: View {
Image(systemName: "doc.text.magnifyingglass")
.foregroundStyle(.tint)
- Text("Codex app-server 日志")
+ Text("log.window.app-server-title")
.font(.headline)
Text(verbatim: "\(entries.count)")
@@ -41,7 +41,7 @@ struct LogView: View {
Button {
store.clear()
} label: {
- Label("清空", systemImage: "trash")
+ Label("common.action.clear", systemImage: "trash")
}
.controlSize(.small)
.disabled(entries.isEmpty)
@@ -56,7 +56,7 @@ struct LogView: View {
.font(.largeTitle)
.foregroundStyle(.tertiary)
- Text("暂无日志")
+ Text("log.empty.no-entries")
.foregroundStyle(.secondary)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -98,7 +98,7 @@ private struct LogRow: View {
VStack(alignment: .leading, spacing: 8) {
if let request = entry.request {
payloadBlock(
- caption: "请求",
+ caption: "log.payload.request",
time: entry.requestedAt,
text: request,
color: .primary
@@ -113,7 +113,7 @@ private struct LogRow: View {
color: entry.kind == .failure ? .red : .primary
)
} else if entry.kind == .pending {
- Text("等待响应")
+ Text("log.status.waiting-response")
.font(.caption.monospaced())
.foregroundStyle(.secondary)
}
@@ -198,17 +198,17 @@ private struct LogRow: View {
if hasText {
LogHeaderActionButton(
- title: "预览",
+ title: "common.action.preview",
systemImage: "doc.text.magnifyingglass",
- help: String(localized: "预览完整\(caption)")
+ help: String(localized: "log.action.preview-full", defaultValue: "\(caption)")
) {
fullTextItem = FullLogTextItem(title: caption, text: text)
}
LogHeaderActionButton(
- title: "复制",
+ title: "common.action.copy",
systemImage: "doc.on.doc",
- help: String(localized: "复制完整\(caption)")
+ help: String(localized: "log.action.copy-full", defaultValue: "\(caption)")
) {
PasteboardWriter.copy(text)
}
@@ -230,11 +230,11 @@ private struct LogRow: View {
private var detailCaption: LocalizedStringResource {
switch entry.kind {
case .response, .emptyResponse:
- "响应"
+ "log.payload.response"
case .failure:
- "错误"
+ "log.label.error"
default:
- "详情"
+ "log.payload.details"
}
}
@@ -308,14 +308,14 @@ private struct FullLogTextView: View {
Button {
PasteboardWriter.copy(item.text)
} label: {
- Label("复制", systemImage: "doc.on.doc")
+ Label("common.action.copy", systemImage: "doc.on.doc")
}
.controlSize(.small)
Button {
dismiss()
} label: {
- Label("关闭", systemImage: "xmark")
+ Label("common.action.close", systemImage: "xmark")
}
.controlSize(.small)
}
@@ -528,13 +528,13 @@ private extension RequestLogEntry.Kind {
var label: LocalizedStringResource {
switch self {
case .pending:
- "进行"
+ "log.status.in-progress"
case .response:
- "完成"
+ "common.status.completed"
case .failure:
- "错误"
+ "log.label.error"
case .emptyResponse:
- "请求"
+ "log.payload.request"
}
}
diff --git a/CodexBar/Views/Menu/CodexActivityCard.swift b/CodexBar/Views/Menu/CodexActivityCard.swift
index 5e6d05a..838f851 100644
--- a/CodexBar/Views/Menu/CodexActivityCard.swift
+++ b/CodexBar/Views/Menu/CodexActivityCard.swift
@@ -33,9 +33,9 @@ struct CodexActivityCard: View {
private var keepAliveHelp: String {
switch keepAliveController.sleepPreventionSource {
case .external:
- String(localized: "系统睡眠已由其他来源关闭")
+ String(localized: "keep-alive.status.disabled-by-other-source")
case .codexBar, .none:
- String(localized: "已防止系统睡眠")
+ String(localized: "keep-alive.status.active")
}
}
@@ -109,7 +109,7 @@ struct CodexActivityCard: View {
.padding(.vertical, 3)
.background(.secondary.opacity(0.12), in: Capsule())
.transition(.opacity)
- .help(String(localized: "另有 \(content.otherTaskCount) 个任务"))
+ .help(String(localized: "activity.summary.other-task-count", defaultValue: "\(content.otherTaskCount, specifier: "%lld")"))
}
}
.animation(.codexStatus, value: showsKeepAliveBadge)
@@ -139,7 +139,7 @@ struct CodexActivityCard: View {
for: task,
symbolName: "hand.raised.fill",
tint: .orange,
- fallback: "Codex 等待批准",
+ fallback: "activity.status.codex-waiting-for-approval",
detailComponents: CodexActivityDisplayFormat.waitingDetailComponents(
for: task,
now: now
@@ -150,7 +150,7 @@ struct CodexActivityCard: View {
for: task,
symbolName: "bolt.fill",
tint: .blue,
- fallback: "Codex",
+ fallback: "common.codex",
detailComponents: CodexActivityDisplayFormat.runningDetailComponents(
for: task,
now: now
@@ -168,7 +168,7 @@ struct CodexActivityCard: View {
modelName: completion.modelName,
effort: completion.effort,
projectName: completion.projectName,
- fallback: "Codex 任务已完成"
+ fallback: "activity.status.codex-completed"
),
detail: details.joined(separator: " • "),
otherTaskCount: 0,
@@ -186,7 +186,7 @@ struct CodexActivityCard: View {
modelName: termination.modelName,
effort: termination.effort,
projectName: termination.projectName,
- fallback: "Codex 任务已终止"
+ fallback: "activity.status.codex-stopped"
),
detail: details.joined(separator: " • "),
otherTaskCount: 0,
@@ -197,8 +197,8 @@ struct CodexActivityCard: View {
symbolName: "moon.zzz.fill",
tint: .secondary,
title: showsUnavailableState
- ? String(localized: "暂无数据")
- : String(localized: "暂无 Codex 活动"),
+ ? String(localized: "common.empty.no-data")
+ : String(localized: "activity.empty.no-activity"),
detail: nil,
otherTaskCount: 0,
isAnonymous: false
@@ -254,7 +254,7 @@ struct CodexActivityCard: View {
return components
}
var result = components
- result.insert(String(localized: "\(count) 个子 Agent"), at: min(1, result.count))
+ result.insert(String(localized: "activity.summary.subagent-count", defaultValue: "\(count, specifier: "%lld")"), at: min(1, result.count))
return result
}
@@ -289,6 +289,6 @@ struct CodexActivityAnonymousIcon: View {
// 虚线圆形 symbol 留白较多, 13 pt 与 11 pt 咖啡图标的视觉面积更接近
.font(.system(size: 13, weight: .semibold))
.foregroundStyle(Color.orange)
- .help(String(localized: "匿名任务不参与防睡眠"))
+ .help("activity.anonymous.keep-awake-exclusion")
}
}
diff --git a/CodexBar/Views/Menu/CodexActivityCenterView.swift b/CodexBar/Views/Menu/CodexActivityCenterView.swift
index 0dbe117..b685e7d 100644
--- a/CodexBar/Views/Menu/CodexActivityCenterView.swift
+++ b/CodexBar/Views/Menu/CodexActivityCenterView.swift
@@ -100,7 +100,7 @@ struct CodexActivityCenterView: View {
VStack(alignment: .leading, spacing: Metrics.sectionSpacing) {
if !activityMonitor.snapshot.waitingTasks.isEmpty {
taskSection(
- title: "等待确认",
+ title: "activity-center.section.waiting",
symbolName: "hand.raised.fill",
tint: .orange,
tasks: activityMonitor.snapshot.waitingTasks,
@@ -111,7 +111,7 @@ struct CodexActivityCenterView: View {
if !activityMonitor.snapshot.runningTasks.isEmpty {
taskSection(
- title: "运行中",
+ title: "activity-center.section.running",
symbolName: "bolt.fill",
tint: .blue,
tasks: activityMonitor.snapshot.runningTasks,
@@ -138,7 +138,7 @@ struct CodexActivityCenterView: View {
private var header: some View {
HStack(alignment: .firstTextBaseline, spacing: 10) {
- Text("任务中心")
+ Text("activity-center.title")
.font(.caption.weight(.semibold))
Spacer(minLength: 8)
@@ -156,20 +156,20 @@ struct CodexActivityCenterView: View {
let snapshot = activityMonitor.snapshot
var components = [String]()
if snapshot.waitingCount > 0 {
- components.append(String(localized: "等待 \(snapshot.waitingCount)"))
+ components.append(String(localized: "activity-center.summary.waiting", defaultValue: "\(snapshot.waitingCount, specifier: "%lld")"))
}
if snapshot.runningCount > 0 {
- components.append(String(localized: "运行 \(snapshot.runningCount)"))
+ components.append(String(localized: "activity-center.summary.running", defaultValue: "\(snapshot.runningCount, specifier: "%lld")"))
}
if snapshot.activeCount == 0 {
if !snapshot.recentCompletions.isEmpty {
components.append(
- String(localized: "最近完成 \(snapshot.recentCompletions.count)")
+ String(localized: "activity-center.summary.recent-completions", defaultValue: "\(snapshot.recentCompletions.count, specifier: "%lld")")
)
}
if !snapshot.recentTerminations.isEmpty {
components.append(
- String(localized: "最近终止 \(snapshot.recentTerminations.count)")
+ String(localized: "activity-center.summary.recent-terminations", defaultValue: "\(snapshot.recentTerminations.count, specifier: "%lld")")
)
}
}
@@ -201,7 +201,7 @@ struct CodexActivityCenterView: View {
private func completionSection(now: Date) -> some View {
section(
- title: "最近完成",
+ title: "activity-center.section.recent-completions",
count: activityMonitor.snapshot.recentCompletions.count
) {
ForEach(activityMonitor.snapshot.recentCompletions) { completion in
@@ -212,7 +212,7 @@ struct CodexActivityCenterView: View {
private func terminationSection(now: Date) -> some View {
section(
- title: "最近终止",
+ title: "activity-center.section.recent-terminations",
count: activityMonitor.snapshot.recentTerminations.count
) {
ForEach(activityMonitor.snapshot.recentTerminations) { termination in
@@ -341,7 +341,7 @@ struct CodexActivityCenterView: View {
effort: String?
) -> some View {
HStack(alignment: .firstTextBaseline, spacing: 8) {
- Text(projectName ?? "Codex")
+ Text(projectName ?? String(localized: "common.codex"))
.font(.caption.weight(.semibold))
.lineLimit(1)
.truncationMode(.middle)
diff --git a/CodexBar/Views/Menu/CodexStatusMenuSections.swift b/CodexBar/Views/Menu/CodexStatusMenuSections.swift
index b7b4a1c..ed4e519 100644
--- a/CodexBar/Views/Menu/CodexStatusMenuSections.swift
+++ b/CodexBar/Views/Menu/CodexStatusMenuSections.swift
@@ -114,9 +114,9 @@ struct StatusAccountCard: View {
private var statusDisplay: (text: LocalizedStringResource?, color: Color) {
switch loadState {
case .notLoggedIn:
- ("未登录", .orange)
+ ("codex-status.account.not-signed-in", .orange)
case let .unsupportedVersion(minimum):
- ("需要 Codex \(minimum) 或更高版本", .red)
+ (LocalizedStringResource("codex-version.requirement", defaultValue: "\(minimum)"), .red)
case .initializationFailed:
("初始化失败", .red)
case .loading, .loaded:
@@ -128,7 +128,7 @@ struct StatusAccountCard: View {
/// 额度和用量均无数据时的统一占位面板
struct EmptyDataPanel: View {
var body: some View {
- Text("暂无数据")
+ Text("common.empty.no-data")
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity, alignment: .center)
.padding(.vertical, MenuMetrics.loadingVerticalPadding)
@@ -196,7 +196,7 @@ struct QuotaLimitsSection: View {
@ViewBuilder
private func creditsBalance(value: String, credits: RateLimitCreditsSnapshot) -> some View {
- let capsule = metadataCapsule(String(localized: "积分: \(value)"))
+ let capsule = metadataCapsule(String(localized: "quota.credits.value", defaultValue: "\(value)"))
if let helpText = creditsHelpText(value: value, credits: credits) {
capsule.help(helpText)
@@ -207,14 +207,14 @@ struct QuotaLimitsSection: View {
private func creditsDisplayValue(_ credits: RateLimitCreditsSnapshot) -> String? {
if credits.unlimited {
- return String(localized: "无限")
+ return String(localized: "quota.value.unlimited")
}
if let balance = normalizedCreditsBalance(credits.balance) {
return compactCreditsBalance(balance)
}
- return credits.hasCredits ? String(localized: "可用") : nil
+ return credits.hasCredits ? String(localized: "common.status.available") : nil
}
private func creditsHelpText(value: String, credits: RateLimitCreditsSnapshot) -> String? {
@@ -272,7 +272,7 @@ struct QuotaLimitsSection: View {
)
)
} label: {
- metadataCapsule(String(localized: "重置次数: \(count)"))
+ metadataCapsule(String(localized: "reset-credits.count", defaultValue: "\(count, specifier: "%lld")"))
}
.buttonStyle(.plain)
}
@@ -329,7 +329,7 @@ struct UpdatedAtRow: View {
color: .blue
)
- Text("数据更新时间")
+ Text("usage.status.updated")
.foregroundStyle(Self.secondaryTextColor)
Text(Self.timeFormatter.string(from: snapshot.generatedAt))
@@ -414,21 +414,21 @@ struct WorkflowSyncDisplayState: Equatable {
WorkflowSyncDisplayState(
symbolName: "icloud",
tint: .codexSecondaryLabel,
- helpText: lastSyncText.map { String(localized: "最近同步: \($0)") }
- ?? String(localized: "暂无同步记录")
+ helpText: lastSyncText.map { String(localized: "sync.status.last-sync-time", defaultValue: "\($0)") }
+ ?? String(localized: "sync.status.no-history")
)
}
private static let disabled = WorkflowSyncDisplayState(
symbolName: "icloud.slash",
tint: .codexSecondaryLabel,
- helpText: String(localized: "同步未开启")
+ helpText: String(localized: "sync.status.disabled")
)
private static let syncing = WorkflowSyncDisplayState(
symbolName: "arrow.trianglehead.clockwise.icloud",
tint: .blue,
- helpText: String(localized: "正在同步")
+ helpText: String(localized: "sync.status.syncing")
)
private static func failed(message: String?) -> WorkflowSyncDisplayState {
diff --git a/CodexBar/Views/Menu/ResetCreditsPanelView.swift b/CodexBar/Views/Menu/ResetCreditsPanelView.swift
index 8091e05..7db44b2 100644
--- a/CodexBar/Views/Menu/ResetCreditsPanelView.swift
+++ b/CodexBar/Views/Menu/ResetCreditsPanelView.swift
@@ -97,7 +97,7 @@ struct ResetCreditsPanelView: View {
}
private var emptyMessage: some View {
- Text("未知过期时间")
+ Text("reset-credits.expiration.unknown")
.font(.caption2)
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity, minHeight: Metrics.rowHeight, alignment: .leading)
@@ -142,7 +142,7 @@ struct ResetCreditsPanelView: View {
.hidden()
.overlay {
HStack(alignment: .center, spacing: 0) {
- Text("过期时间")
+ Text("reset-credits.expiration.label")
.font(.caption2.weight(.medium))
.foregroundStyle(.secondary)
.lineLimit(1)
@@ -172,7 +172,7 @@ struct ResetCreditsPanelView: View {
.green
}
- return Text("可用: \(group.count)")
+ return Text(LocalizedStringResource("reset-credits.available-count", defaultValue: "\(group.count, specifier: "%lld")"))
.font(.caption2.monospacedDigit().weight(.semibold))
.foregroundStyle(tint)
.lineLimit(1)
diff --git a/CodexBar/Views/Menu/UsageHeatmap.swift b/CodexBar/Views/Menu/UsageHeatmap.swift
index 09d8dfc..bfb665c 100644
--- a/CodexBar/Views/Menu/UsageHeatmap.swift
+++ b/CodexBar/Views/Menu/UsageHeatmap.swift
@@ -93,18 +93,18 @@ struct UsageSummaryView: View {
private var metricsGrid: some View {
HStack(alignment: .firstTextBaseline, spacing: Metrics.metricSpacing) {
- tokenMetric(label: "全时累计", value: usage.summary.lifetimeTokens)
- tokenMetric(label: "单日峰值", value: usage.summary.peakDailyTokens)
+ tokenMetric(label: "usage.summary.lifetime-tokens", value: usage.summary.lifetimeTokens)
+ tokenMetric(label: "usage.summary.peak-tokens", value: usage.summary.peakDailyTokens)
textMetric(
- label: "当前连胜",
+ label: "usage.summary.current-streak",
value: Self.dayText(usage.summary.currentStreakDays)
)
textMetric(
- label: "最长连胜",
+ label: "usage.summary.longest-streak",
value: Self.dayText(usage.summary.longestStreakDays)
)
textMetric(
- label: "最长任务",
+ label: "usage.summary.longest-chat",
value: Self.durationText(seconds: usage.summary.longestRunningTurnSec)
)
}
@@ -146,7 +146,7 @@ struct UsageSummaryView: View {
return "--"
}
- return String(localized: "\(max(days, 0))天")
+ return String(localized: "duration.days-compact", defaultValue: "\(max(days, 0), specifier: "%lld")")
}
private static func durationText(seconds: Int?) -> String {
@@ -271,7 +271,7 @@ struct UsageHeatmap: View {
private var heatmapGrid: some View {
VStack(alignment: .leading, spacing: 6) {
HStack(alignment: .firstTextBaseline) {
- Text("近 \(Metrics.columnCount) 周")
+ Text(LocalizedStringResource("usage.heatmap.past-weeks", defaultValue: "\(Metrics.columnCount, specifier: "%lld")"))
.font(.caption2.weight(.medium))
.foregroundStyle(.secondary)
@@ -331,7 +331,7 @@ struct UsageHeatmap: View {
let firstText = localDayText(firstDate)
let lastText = localDayText(lastDate)
- return String(localized: "\(firstText) ~ \(lastText)")
+ return String(localized: "date-range.closed", defaultValue: "\(firstText)\(lastText)")
}
private func localDayText(_ dayKey: String) -> String {
@@ -575,7 +575,7 @@ struct UsageHeatmapDayDetailView: View {
private var tokenOnlyFooter: some View {
metricRowLayout {
tokenIntensityDot
- Text("用量强度")
+ Text("usage.heatmap.intensity")
.foregroundStyle(.secondary)
Spacer(minLength: 8)
@@ -588,7 +588,7 @@ struct UsageHeatmapDayDetailView: View {
private var tokenIntensityMetricRow: some View {
metricRowLayout {
tokenIntensityDot
- Text("用量强度")
+ Text("usage.heatmap.intensity")
.foregroundStyle(.secondary)
.frame(width: Metrics.metricLabelWidth, alignment: .leading)
@@ -601,7 +601,7 @@ struct UsageHeatmapDayDetailView: View {
private var mostUsedModelMetricRow: some View {
metricRowLayout {
metricDot(tint: .cyan)
- Text("最热模型")
+ Text("usage.heatmap.top-model")
.foregroundStyle(.secondary)
.frame(width: Metrics.metricLabelWidth, alignment: .leading)
@@ -639,35 +639,32 @@ struct UsageHeatmapDayDetailView: View {
private var workflowMetricRows: [WorkflowMetricRow] {
[
WorkflowMetricRow(
- label: String(localized: "会话总数"),
+ label: String(localized: "workflow.metric.sessions"),
value: context.day.workflow.sessionCount,
tint: .green
),
WorkflowMetricRow(
- label: String(localized: "对话轮次"),
+ label: String(localized: "workflow.metric.turns"),
value: context.day.workflow.turnCount,
tint: .teal
),
WorkflowMetricRow(
- label: String(localized: "子智能体"),
+ label: String(localized: "workflow.metric.subagents"),
value: context.day.workflow.subagentCount,
tint: .indigo
),
WorkflowMetricRow(
- label: String(
- localized: "workflow.metric.tool-calls",
- defaultValue: "调用工具"
- ),
+ label: String(localized: "workflow.metric.tool-calls"),
value: context.day.workflow.toolCallCount,
tint: .orange
),
WorkflowMetricRow(
- label: String(localized: "权限请求"),
+ label: String(localized: "workflow.metric.approvals"),
value: context.day.workflow.permissionRequestCount,
tint: .red
),
WorkflowMetricRow(
- label: String(localized: "上下文压缩"),
+ label: String(localized: "workflow.metric.compactions"),
value: context.day.workflow.contextCompactionCount,
tint: .purple
)
diff --git a/CodexBar/Views/Settings/AppSettingsView.swift b/CodexBar/Views/Settings/AppSettingsView.swift
index 9dc3d81..6e2a6e2 100644
--- a/CodexBar/Views/Settings/AppSettingsView.swift
+++ b/CodexBar/Views/Settings/AppSettingsView.swift
@@ -120,15 +120,15 @@ struct AppSettingsView: View {
onContentHeightChanged(pageHeight + Metrics.windowChromeHeight)
}
.alert(
- "批量重建 \(selectedRebuildDateKeys.count) 天的数据?",
+ LocalizedStringResource("workflow.rebuild.confirmation.title", defaultValue: "\(selectedRebuildDateKeys.count, specifier: "%lld")"),
isPresented: $isShowingRebuildConfirmation
) {
- Button("取消", role: .cancel) {}
- Button("重建", role: .destructive) {
+ Button("common.action.cancel", role: .cancel) {}
+ Button("workflow.rebuild.action", role: .destructive) {
rebuildWorkflowData()
}
} message: {
- Text("将从本机原始 Hook 事件重新统计 \(selectedRebuildRange?.displayText ?? "")\n并在下次同步时替换当前设备对应日期的云端数据")
+ Text(LocalizedStringResource("workflow.rebuild.confirmation.message", defaultValue: "\(selectedRebuildRange?.displayText ?? "")"))
}
.alert(item: $helperFeatureConfirmation) { feature in
feature.alert(helperStatus: keepAliveController.helperStatus) {
@@ -301,7 +301,7 @@ private extension AppSettingsView {
var launchAtLoginRow: some View {
SettingsToggleRow(
icon: "power",
- title: "开机自动启动",
+ title: "settings.general.launch-at-login",
isOn: Binding(
get: { loginItemSettings.isEnabled },
set: { loginItemSettings.setEnabled($0) }
@@ -312,7 +312,7 @@ private extension AppSettingsView {
var automaticUpdateCheckRow: some View {
SettingsToggleRow(
icon: "arrow.triangle.2.circlepath",
- title: "自动检查更新",
+ title: "settings.general.automatic-update-checks",
isOn: Binding(
get: { appUpdater.automaticallyChecksForUpdates },
set: { appUpdater.setAutomaticallyChecksForUpdates($0) }
@@ -330,7 +330,7 @@ private extension AppSettingsView {
return SettingsToggleRow(
icon: "gauge.with.dots.needle.50percent",
- title: "菜单栏额度指示",
+ title: "settings.menu-bar-quota.title",
isOn: Binding(
get: { isMenuBarQuotaEnabled },
set: { menuBarQuotaSettings.setEnabled($0) }
@@ -338,7 +338,7 @@ private extension AppSettingsView {
) {
if isEnabled {
Picker(
- "额度窗口",
+ "settings.menu-bar-quota.window",
selection: Binding(
get: { menuBarQuotaSettings.activeWindowSelection },
set: { menuBarQuotaSettings.setSelection($0) }
@@ -390,7 +390,7 @@ private extension AppSettingsView {
return SettingsToggleRow(
icon: "list.bullet.rectangle",
- title: "主面板任务中心",
+ title: "settings.task-center.show-in-menu",
isOn: Binding(
get: { isDisplayedOn },
set: { mainPanelSettings.setShowsTaskCenter($0) }
@@ -405,7 +405,7 @@ private extension AppSettingsView {
VStack(alignment: .leading, spacing: 4) {
SettingsToggleRow(
icon: "link",
- title: "CodexBar Hook",
+ title: "hook.name",
isOn: Binding(
get: { codexHookSettings.isEnabled },
set: { codexHookSettings.setEnabled($0) }
@@ -427,7 +427,7 @@ private extension AppSettingsView {
return VStack(alignment: .leading, spacing: 4) {
SettingsToggleRow(
icon: "arrow.counterclockwise.circle",
- title: "自动重置",
+ title: "settings.auto-reset.title",
isOn: Binding(
get: { autoResetSettings.isEnabled },
set: { enabled in
@@ -476,12 +476,12 @@ private extension AppSettingsView {
switch keepAliveController.helperStatus {
case .requiresApproval:
return SettingsStatusCaption(
- message: String(localized: "需要授权允许 CodexBar 后台运行"),
+ message: String(localized: "helper.status.authorization-required"),
showsSystemSettingsButton: true
)
case .notRegistered, .notFound:
return SettingsStatusCaption(
- message: String(localized: "CodexBarHelper 尚未注册")
+ message: String(localized: "helper.status.not-registered")
)
case .enabled:
guard let errorMessage = keepAliveController
@@ -500,7 +500,7 @@ private extension AppSettingsView {
return VStack(alignment: .leading, spacing: 4) {
SettingsToggleRow(
icon: "moon.zzz",
- title: "防止系统睡眠",
+ title: "settings.keep-alive.title",
isOn: Binding(
get: { keepAliveController.isEnabled },
set: { enabled in
@@ -563,7 +563,7 @@ private extension AppSettingsView {
Spacer(minLength: 8)
if caption.showsSystemSettingsButton {
- Button("打开系统设置") {
+ Button("common.action.open-system-settings") {
keepAliveController.openSystemSettings()
}
.controlSize(.small)
@@ -591,13 +591,13 @@ private extension AppSettingsView {
return SettingsStatusCaption(message: errorMessage, isError: true)
}
guard codexHookSettings.isVerified else {
- return SettingsStatusCaption(message: String(localized: "CodexBar Hook 未生效"))
+ return SettingsStatusCaption(message: String(localized: "hook.status.inactive"))
}
if keepAliveController.isActivelyPreventingSleep,
keepAliveController.sleepPreventionSource == .external {
return SettingsStatusCaption(
- message: String(localized: "系统睡眠已由其他来源关闭")
+ message: String(localized: "keep-alive.status.disabled-by-other-source")
)
}
@@ -606,17 +606,17 @@ private extension AppSettingsView {
// 它成立即意味着 helper 已就绪, 所以排在下面那个 switch 之前不影响 helper 类问题的呈现
// 不写具体阈值: 滞回让保护一直持续到阈值加 5, 说死数字会与用户看到的电量对不上
if keepAliveController.isLowBatteryBlocking {
- return SettingsStatusCaption(message: String(localized: "电量过低, 已恢复系统睡眠"))
+ return SettingsStatusCaption(message: String(localized: "keep-alive.status.low-battery"))
}
switch keepAliveController.helperStatus {
case .requiresApproval:
return SettingsStatusCaption(
- message: String(localized: "需要授权允许 CodexBar 后台运行"),
+ message: String(localized: "helper.status.authorization-required"),
showsSystemSettingsButton: true
)
case .notRegistered, .notFound:
- return SettingsStatusCaption(message: String(localized: "CodexBarHelper 尚未注册"))
+ return SettingsStatusCaption(message: String(localized: "helper.status.not-registered"))
case .enabled:
// 上限之外的运行态都收起; 达到上限要留一句, 否则开关开着却没生效无从解释
guard keepAliveController.hasReachedMaximumDuration else {
@@ -624,7 +624,7 @@ private extension AppSettingsView {
}
let duration = keepAliveController.maximumDuration.title
return SettingsStatusCaption(
- message: String(localized: "已达到防睡眠时间上限 (\(duration))")
+ message: String(localized: "keep-alive.status.duration-limit-reached", defaultValue: "\(duration)")
)
}
}
@@ -636,7 +636,7 @@ private extension AppSettingsView {
return VStack(alignment: .leading, spacing: 4) {
SettingsToggleRow(
icon: "icloud",
- title: "跨设备同步",
+ title: "settings.sync.title",
isOn: Binding(
get: { state.isActive },
set: { enabled in
@@ -656,7 +656,7 @@ private extension AppSettingsView {
let showsSyncStatus = state.shouldShowSyncStatus(lastSyncText: lastSyncText)
SettingsIndentedRow {
- Text("最近同步")
+ Text("sync.status.last-sync")
.font(.caption)
.foregroundStyle(.secondary)
@@ -670,7 +670,7 @@ private extension AppSettingsView {
width: Metrics.syncStatusRowHeight,
height: Metrics.syncStatusRowHeight
)
- .help("正在同步")
+ .help("sync.status.syncing")
.transition(.opacity)
} else if let lastSyncText {
Text(lastSyncText)
@@ -712,7 +712,7 @@ private extension AppSettingsView {
.frame(width: SettingsRowMetrics.iconWidth)
.foregroundStyle(.tint)
- Text("重建数据")
+ Text("workflow.rebuild.title")
.lineLimit(1)
.fixedSize(horizontal: true, vertical: false)
@@ -734,7 +734,7 @@ private extension AppSettingsView {
.controlSize(.small)
.frame(minWidth: RebuildLayoutMetrics.actionMinimumWidth)
} else {
- Button("重建") {
+ Button("workflow.rebuild.action") {
isShowingRebuildConfirmation = true
}
.controlSize(.small)
@@ -757,22 +757,19 @@ private extension AppSettingsView {
return rebuildStatus
}
guard let selectedRebuildRange else {
- return RebuildStatus(message: String(localized: "未选择重建日期范围"), isError: false)
+ return RebuildStatus(message: String(localized: "workflow.rebuild.selection.none"), isError: false)
}
guard selectedRebuildRange.isComplete else {
- return RebuildStatus(message: String(localized: "选择结束日期"), isError: false)
+ return RebuildStatus(message: String(localized: "date-picker.select-end"), isError: false)
}
if selectedRebuildDateKeys.isEmpty {
return RebuildStatus(
- message: String(
- localized: "workflow.rebuild.error.source-unavailable",
- defaultValue: "没有可重建的本地数据"
- ),
+ message: String(localized: "workflow.rebuild.error.source-unavailable"),
isError: true
)
}
return RebuildStatus(
- message: String(localized: "已选择 \(selectedRebuildRange.dayCount) 天"),
+ message: String(localized: "workflow.rebuild.selection.day-count", defaultValue: "\(selectedRebuildRange.dayCount, specifier: "%lld")"),
isError: false
)
}
@@ -825,7 +822,7 @@ private extension AppSettingsView {
}
rebuildStatus = RebuildStatus(
- message: String(localized: "重建失败: \(error.localizedDescription)"),
+ message: String(localized: "workflow.rebuild.status.failed", defaultValue: "\(error.localizedDescription)"),
isError: true
)
}
@@ -841,31 +838,29 @@ private extension AppSettingsView {
autoRetryAvailable: Bool
) -> String {
var message = String(
- localized: "已重建 \(summary.rebuiltDateCount) 天, 包含 \(summary.eventCount) 条数据"
+ localized: "workflow.rebuild.summary.completed",
+ defaultValue: "\(summary.rebuiltDateCount, specifier: "%lld")\(summary.eventCount, specifier: "%lld")"
)
if summary.corruptLineCount > 0 {
- message += String(localized: ", 跳过 \(summary.corruptLineCount) 条无效数据")
+ message += String(localized: "workflow.rebuild.summary.skipped-invalid-events", defaultValue: "\(summary.corruptLineCount, specifier: "%lld")")
}
if !summary.failedDateKeys.isEmpty {
let listed = summary.failedDateKeys.prefix(rebuildFailedDateListLimit)
var dates = listed.joined(separator: ", ")
if summary.failedDateKeys.count > listed.count {
- dates += String(localized: " 等")
+ dates += String(localized: "workflow.rebuild.summary.additional-dates")
}
- message += String(localized: "; \(summary.failedDateKeys.count) 天未完成 (\(dates))")
+ message += String(localized: "workflow.rebuild.summary.incomplete-dates", defaultValue: "\(summary.failedDateKeys.count, specifier: "%lld")\(dates)")
message += autoRetryAvailable
- ? String(localized: ", 稍后会自动重试")
- : String(localized: ", 开启 CodexBar Hook 后会自动重试")
+ ? String(localized: "workflow.rebuild.summary.retry-later")
+ : String(localized: "workflow.rebuild.summary.retry-after-hook-enabled")
}
if summary.didFailSyncReplacementMarking {
- message += String(
- localized: "workflow.rebuild.summary.sync-replacement-marking-failed",
- defaultValue: "; 云端替换未能完成, 请稍后重新重建这些数据"
- )
+ message += String(localized: "workflow.rebuild.summary.sync-replacement-marking-failed")
} else if summary.isSyncReplacementPending {
- message += String(localized: "; 云端替换将在同步可用后继续")
+ message += String(localized: "workflow.rebuild.summary.cloud-replacement-pending")
}
return message
@@ -882,7 +877,7 @@ private extension AppSettingsView {
VStack(alignment: .leading, spacing: 4) {
SettingsToggleRow(
icon: "bell.badge",
- title: "系统通知",
+ title: "settings.notifications.system.title",
isOn: Binding(
get: { notificationSettings.isEnabled },
set: { notificationSettings.setEnabled($0) }
@@ -918,13 +913,13 @@ private extension AppSettingsView {
var notificationDeniedRow: some View {
SettingsIndentedRow {
- Text("系统通知权限未开启")
+ Text("settings.notifications.system.permission-disabled")
.font(.caption)
.foregroundStyle(.red)
Spacer(minLength: 8)
- Button("打开系统设置") {
+ Button("common.action.open-system-settings") {
notificationSettings.openSystemNotificationSettings()
}
.controlSize(.small)
@@ -942,7 +937,7 @@ private extension AppSettingsView {
.frame(width: SettingsRowMetrics.iconWidth)
.foregroundStyle(.tint)
- Text("CodexBar 版本")
+ Text("settings.about.version")
Spacer()
@@ -963,7 +958,7 @@ private extension AppSettingsView {
.controlSize(.small)
.buttonStyle(.plain)
.foregroundStyle(.tint)
- .help("立即更新")
+ .help("updater.action.install")
.transition(.opacity)
}
}
@@ -992,7 +987,7 @@ private extension AppSettingsView {
.frame(width: SettingsRowMetrics.iconWidth)
.foregroundStyle(.tint)
- Text("GitHub 项目")
+ Text("settings.about.github-project")
.foregroundStyle(.primary)
Spacer()
@@ -1029,7 +1024,7 @@ private extension AppSettingsView {
Button {
appUpdater.checkForUpdates()
} label: {
- Label("检查更新", systemImage: "arrow.down.circle")
+ Label("updater.action.check", systemImage: "arrow.down.circle")
}
}
@@ -1037,7 +1032,7 @@ private extension AppSettingsView {
Button(role: .destructive) {
NSApplication.shared.terminate(nil)
} label: {
- Label("退出 CodexBar", systemImage: "power.circle")
+ Label("app.action.quit", systemImage: "power.circle")
}
.foregroundStyle(.red)
.keyboardShortcut("q")
@@ -1088,7 +1083,7 @@ private struct RebuildDatePicker: View {
if let selection {
Text(verbatim: selection.displayText)
} else {
- Text("选择日期范围")
+ Text("date-picker.select-range")
}
}
.font(.caption.monospacedDigit().weight(.medium))
@@ -1119,7 +1114,7 @@ private struct RebuildDatePicker: View {
}
.buttonStyle(.plain)
.disabled(!isEnabled)
- .help("选择日期范围")
+ .help("date-picker.select-range")
.popover(isPresented: $isPresented, arrowEdge: .bottom) {
calendarPopover
}
@@ -1132,7 +1127,7 @@ private struct RebuildDatePicker: View {
HStack(spacing: 8) {
monthNavigationButton(
systemImage: "chevron.left",
- help: "上个月",
+ help: "date-picker.previous-month",
offset: -1
)
@@ -1146,7 +1141,7 @@ private struct RebuildDatePicker: View {
monthNavigationButton(
systemImage: "chevron.right",
- help: "下个月",
+ help: "date-picker.next-month",
offset: 1
)
}
@@ -1166,9 +1161,9 @@ private struct RebuildDatePicker: View {
Group {
if selection?.isComplete == false {
- Text("选择结束日期")
+ Text("date-picker.select-end")
} else {
- Text("选择开始日期")
+ Text("date-picker.select-start")
}
}
.font(.caption2)
@@ -1388,14 +1383,14 @@ private struct RebuildDateRange: Equatable {
}
let startText = CodexDateFormat.localDayDisplayString(from: startDate)
guard let endDateKey else {
- return String(localized: "\(startText) ~")
+ return String(localized: "date-range.open-ended", defaultValue: "\(startText)")
}
guard startDateKey != endDateKey,
let endDate = CodexDateFormat.dayDate(from: endDateKey) else {
return startText
}
let endText = CodexDateFormat.localDayDisplayString(from: endDate)
- return String(localized: "\(startText) ~ \(endText)")
+ return String(localized: "date-range.closed", defaultValue: "\(startText)\(endText)")
}
func completing(with dateKey: String) -> RebuildDateRange {
@@ -1436,11 +1431,11 @@ private enum SettingsTab: CaseIterable, Identifiable {
var title: LocalizedStringResource {
switch self {
case .general:
- "通用"
+ "settings.tab.general"
case .advanced:
- "高级"
+ "settings.tab.advanced"
case .about:
- "关于"
+ "settings.tab.about"
}
}
diff --git a/CodexBar/Views/Settings/AutoResetOptionsView.swift b/CodexBar/Views/Settings/AutoResetOptionsView.swift
index 46fa8c8..95bf1cd 100644
--- a/CodexBar/Views/Settings/AutoResetOptionsView.swift
+++ b/CodexBar/Views/Settings/AutoResetOptionsView.swift
@@ -6,14 +6,14 @@ struct AutoResetOptionsView: View {
var body: some View {
HStack(spacing: Metrics.controlSpacing) {
- Text("临期时间")
+ Text("auto-reset.lead-time.title")
.font(.caption)
.foregroundStyle(.secondary)
Spacer(minLength: 8)
SettingsOptionsPicker(
- title: "临期时间",
+ title: "auto-reset.lead-time.title",
selection: Binding(
get: { settings.leadTime },
set: { settings.setLeadTime($0) }
diff --git a/CodexBar/Views/Settings/CodexVersionSection.swift b/CodexBar/Views/Settings/CodexVersionSection.swift
index 8f67d45..65a44d1 100644
--- a/CodexBar/Views/Settings/CodexVersionSection.swift
+++ b/CodexBar/Views/Settings/CodexVersionSection.swift
@@ -14,7 +14,7 @@ struct CodexVersionSection: View {
.frame(width: Metrics.iconWidth)
.foregroundStyle(.tint)
- Text("Codex 版本")
+ Text("settings.codex-version.title")
Spacer()
}
@@ -51,7 +51,7 @@ struct CodexVersionSection: View {
VStack(alignment: .trailing, spacing: 3) {
HStack(spacing: 12) {
if row.isCurrent {
- Text("当前使用")
+ Text("settings.codex-version.in-use")
.font(.caption2.weight(.medium))
.foregroundStyle(.green)
.padding(.horizontal, 6)
@@ -70,7 +70,7 @@ struct CodexVersionSection: View {
.animation(Metrics.statusAnimation, value: row.isCurrent)
if let newerInstalledVersion = row.newerInstalledVersion {
- Text("已更新至 \(newerInstalledVersion)")
+ Text(LocalizedStringResource("settings.codex-version.updated-to", defaultValue: "\(newerInstalledVersion)"))
.font(.caption2.monospacedDigit())
.foregroundStyle(.orange)
.lineLimit(1)
@@ -80,7 +80,11 @@ struct CodexVersionSection: View {
if let path = row.path {
CopyablePathText(path: path, isCopied: isPathCopied)
.animation(Metrics.statusAnimation, value: isPathCopied)
- .help(isPathCopied ? "已复制" : "点击复制")
+ .help(
+ isPathCopied
+ ? "common.status.copied"
+ : "common.action.click-to-copy"
+ )
.onTapGesture {
copyPathToPasteboard(path, source: item.source)
}
@@ -128,7 +132,7 @@ private struct CopyablePathText: View {
.truncationMode(.middle)
.opacity(isCopied ? 0 : 1)
- Text("已复制")
+ Text("common.status.copied")
.font(.caption2)
.foregroundStyle(.green)
.lineLimit(1)
diff --git a/CodexBar/Views/Settings/HelperFeatureConfirmation.swift b/CodexBar/Views/Settings/HelperFeatureConfirmation.swift
index 700cb2e..8687458 100644
--- a/CodexBar/Views/Settings/HelperFeatureConfirmation.swift
+++ b/CodexBar/Views/Settings/HelperFeatureConfirmation.swift
@@ -15,39 +15,35 @@ enum HelperFeatureConfirmation: Identifiable {
Alert(
title: title,
message: Text(verbatim: message(helperStatus: helperStatus)),
- primaryButton: .destructive(Text("开启"), action: onConfirm),
- secondaryButton: .cancel(Text("取消"))
+ primaryButton: .destructive(Text("common.action.enable"), action: onConfirm),
+ secondaryButton: .cancel(Text("common.action.cancel"))
)
}
private var title: Text {
switch self {
case .autoReset:
- Text("开启自动重置?")
+ Text("auto-reset.confirmation.title")
case .keepAlive:
- Text("开启防止系统睡眠?")
+ Text("keep-alive.confirmation.title")
}
}
private var details: String {
switch self {
case .autoReset:
- String(
- localized: "开启后, CodexBar 在手动重置临近过期时, 按设置的临期时间提前自动使用重置; 并可能短暂唤醒 Mac"
- )
+ String(localized: "auto-reset.confirmation.message")
case .keepAlive:
- String(
- localized: "开启后, CodexBar 会在 Codex 任务运行时防止系统睡眠, 任务结束后自动恢复"
- )
+ String(localized: "keep-alive.confirmation.message")
}
}
private func message(helperStatus: KeepAliveController.HelperStatus) -> String {
switch helperStatus {
case .notRegistered, .notFound:
- "\(String(localized: "需要安装并授权 CodexBar Helper 后台运行"))\n\(details)"
+ "\(String(localized: "helper.status.install-and-authorize"))\n\(details)"
case .requiresApproval:
- "\(String(localized: "已安装 CodexBar Helper 但需要授权允许后台运行"))\n\(details)"
+ "\(String(localized: "helper.status.installed-needs-authorization"))\n\(details)"
case .enabled:
details
}
diff --git a/CodexBar/Views/Settings/HotKeyRecorderRow.swift b/CodexBar/Views/Settings/HotKeyRecorderRow.swift
index ce18a1d..0595a7b 100644
--- a/CodexBar/Views/Settings/HotKeyRecorderRow.swift
+++ b/CodexBar/Views/Settings/HotKeyRecorderRow.swift
@@ -14,7 +14,7 @@ struct HotKeyRecorderRow: View {
.frame(width: SettingsRowMetrics.iconWidth)
.foregroundStyle(.tint)
- Text("APP 快捷键")
+ Text("settings.hotkey.title")
Spacer()
@@ -45,7 +45,7 @@ struct HotKeyRecorderRow: View {
iconButton(
systemName: "arrow.counterclockwise.circle",
- help: "恢复默认",
+ help: "common.action.restore-default",
isDisabled: !canRestoreDefaultShortcut
) {
settings.restoreDefaultShortcut()
@@ -54,7 +54,7 @@ struct HotKeyRecorderRow: View {
iconButton(
systemName: "xmark.circle",
- help: "清除 APP 快捷键",
+ help: "settings.hotkey.action.clear",
isDisabled: !canClearShortcut
) {
settings.clearShortcut()
@@ -73,10 +73,10 @@ struct HotKeyRecorderRow: View {
private var shortcutLabel: String {
if isRecording {
- return String(localized: "请设置快捷键")
+ return String(localized: "settings.hotkey.prompt")
}
- return settings.shortcut?.label ?? String(localized: "未设置")
+ return settings.shortcut?.label ?? String(localized: "common.status.not-set")
}
private var canStartRecording: Bool {
@@ -119,7 +119,7 @@ struct HotKeyRecorderRow: View {
}
guard let shortcut = GlobalHotKeyShortcut(event: event) else {
- settings.setRegistrationError(String(localized: "无法识别该快捷键"))
+ settings.setRegistrationError(String(localized: "hotkey.error.unrecognized"))
stopRecording()
return
}
diff --git a/CodexBar/Views/Settings/KeepAliveOptionsView.swift b/CodexBar/Views/Settings/KeepAliveOptionsView.swift
index 19e6177..e55b233 100644
--- a/CodexBar/Views/Settings/KeepAliveOptionsView.swift
+++ b/CodexBar/Views/Settings/KeepAliveOptionsView.swift
@@ -36,8 +36,8 @@ struct KeepAliveOptionsView: View {
private var maximumDurationRow: some View {
pickerRow(
- title: "最长防睡眠时间",
- caption: "防睡眠时长超过阈值后自动恢复系统睡眠",
+ title: "keep-alive.duration-limit.title",
+ caption: "keep-alive.duration-limit.caption",
selection: Binding(
get: { keepAliveController.maximumDuration },
set: { keepAliveController.setMaximumDuration($0) }
@@ -49,8 +49,8 @@ struct KeepAliveOptionsView: View {
private var activityProtectionRow: some View {
pickerRow(
- title: "异常会话保护",
- caption: "长时间没有进展时隐藏任务并停止参与防睡眠",
+ title: "activity-protection.title",
+ caption: "activity-protection.caption",
selection: Binding(
get: { activityProtectionSettings.inactivityDuration },
set: { activityProtectionSettings.setInactivityDuration($0) }
@@ -63,8 +63,8 @@ struct KeepAliveOptionsView: View {
/// 只改"哪些任务算数", 没有额外依赖, 所以不置灰也不隐藏
private var waitingApprovalRow: some View {
toggleRow(
- title: "等待批准时保持",
- caption: "任务等待批准期间继续防止系统睡眠",
+ title: "keep-alive.waiting.title",
+ caption: "keep-alive.waiting.caption",
isOn: Binding(
get: { keepAliveController.keepsAwakeWhileWaiting },
set: { keepAliveController.setKeepsAwakeWhileWaiting($0) }
@@ -75,8 +75,8 @@ struct KeepAliveOptionsView: View {
/// 只在防睡眠真的生效时留住屏幕, 所以和上面那一行一样没有额外依赖
private var displayAwakeRow: some View {
toggleRow(
- title: "保持屏幕常亮",
- caption: "同时阻止屏幕保护与自动锁屏",
+ title: "keep-alive.display.title",
+ caption: "keep-alive.display.caption",
isOn: Binding(
get: { keepAliveController.keepsDisplayAwake },
set: { keepAliveController.setKeepsDisplayAwake($0) }
@@ -86,8 +86,8 @@ struct KeepAliveOptionsView: View {
private var lowBatteryRow: some View {
pickerRow(
- title: "低电量保护",
- caption: "仅在使用电池供电时生效, 充电时自动恢复",
+ title: "keep-alive.low-battery.title",
+ caption: "keep-alive.low-battery.caption",
selection: Binding(
get: { keepAliveController.lowBatteryThreshold },
set: { keepAliveController.setLowBatteryThreshold($0) }
diff --git a/CodexBar/Views/Settings/NotificationOptionsView.swift b/CodexBar/Views/Settings/NotificationOptionsView.swift
index 29c3c47..4d64213 100644
--- a/CodexBar/Views/Settings/NotificationOptionsView.swift
+++ b/CodexBar/Views/Settings/NotificationOptionsView.swift
@@ -45,7 +45,7 @@ struct NotificationOptionsView: View {
private var lowQuotaRow: some View {
notificationOptionRow(
- title: "额度预警通知",
+ title: "settings.notifications.low-quota.title",
isOn: Binding(
get: { notificationSettings.isLowQuotaEnabled },
set: { notificationSettings.setLowQuotaEnabled($0) }
@@ -56,7 +56,7 @@ struct NotificationOptionsView: View {
)
) {
optionPicker(
- title: "低额度阈值",
+ title: "settings.notifications.low-quota.threshold",
selection: Binding(
get: { notificationSettings.lowQuotaThresholdPercent },
set: { notificationSettings.setLowQuotaThresholdPercent($0) }
@@ -69,7 +69,7 @@ struct NotificationOptionsView: View {
private var quotaResetRow: some View {
notificationOptionRow(
- title: "额度重置通知",
+ title: "settings.notifications.quota-reset.title",
isOn: Binding(
get: { notificationSettings.isQuotaResetEnabled },
set: { notificationSettings.setQuotaResetEnabled($0) }
@@ -86,7 +86,7 @@ struct NotificationOptionsView: View {
let isDisplayedOn = codexHookSettings.isOperable && notificationSettings.isTaskCompletionEnabled
return notificationOptionRow(
- title: "任务完成通知",
+ title: "settings.notifications.task-completion.title",
isOn: Binding(
get: { isDisplayedOn },
set: { notificationSettings.setTaskCompletionEnabled($0) }
@@ -98,7 +98,7 @@ struct NotificationOptionsView: View {
)
) {
optionPicker(
- title: "任务时长",
+ title: "settings.notifications.task-completion.minimum-duration",
selection: Binding(
get: { notificationSettings.taskCompletionMinimumDurationSeconds },
set: { notificationSettings.setTaskCompletionMinimumDurationSeconds($0) }
@@ -114,7 +114,7 @@ struct NotificationOptionsView: View {
let isDisplayedOn = codexHookSettings.isOperable && notificationSettings.isTaskWaitingEnabled
return notificationOptionRow(
- title: "任务等待通知",
+ title: "settings.notifications.task-waiting.title",
isOn: Binding(
get: { isDisplayedOn },
set: { notificationSettings.setTaskWaitingEnabled($0) }
@@ -133,7 +133,7 @@ struct NotificationOptionsView: View {
return VStack(spacing: 0) {
optionRow(
- title: "任务触觉反馈",
+ title: "settings.notifications.task-haptics.title",
isOn: Binding(
get: { isDisplayedOn },
set: { notificationSettings.setTaskHapticEnabled($0) }
@@ -141,13 +141,13 @@ struct NotificationOptionsView: View {
isEnabled: codexHookSettings.isOperable
)
- captionRow("任务完成或等待批准时触发触摸板震动")
+ captionRow("settings.notifications.task-haptics.caption")
}
}
private var creditExpiryRow: some View {
notificationOptionRow(
- title: "重置临期通知",
+ title: "settings.notifications.credit-expiry.title",
isOn: Binding(
get: { notificationSettings.isCreditExpiryEnabled },
set: { notificationSettings.setCreditExpiryEnabled($0) }
@@ -165,7 +165,7 @@ struct NotificationOptionsView: View {
let isDisplayedOn = isFeatureEnabled && notificationSettings.isAutoResetEnabled
return notificationOptionRow(
- title: "自动重置通知",
+ title: "settings.notifications.auto-reset.title",
isOn: Binding(
get: { isDisplayedOn },
set: { notificationSettings.setAutoResetEnabled($0) }
@@ -187,7 +187,7 @@ struct NotificationOptionsView: View {
let isDisplayedOn = isProtectionOn && notificationSettings.isLowBatteryEnabled
return notificationOptionRow(
- title: "低电量保护通知",
+ title: "settings.notifications.low-battery.title",
isOn: Binding(
get: { isDisplayedOn },
set: { notificationSettings.setLowBatteryEnabled($0) }
@@ -207,7 +207,7 @@ struct NotificationOptionsView: View {
let isDisplayedOn = hasLimit && notificationSettings.isKeepAliveLimitEnabled
return notificationOptionRow(
- title: "防睡眠上限通知",
+ title: "settings.notifications.keep-alive-limit.title",
isOn: Binding(
get: { isDisplayedOn },
set: { notificationSettings.setKeepAliveLimitEnabled($0) }
@@ -223,7 +223,7 @@ struct NotificationOptionsView: View {
private var codexCLINotificationRow: some View {
VStack(spacing: 0) {
optionRow(
- title: "Codex TUI 通知",
+ title: "settings.notifications.codex-tui.title",
isOn: Binding(
get: { codexCLINotificationSettings.isEnabled },
set: { codexCLINotificationSettings.setEnabled($0) }
@@ -242,7 +242,7 @@ struct NotificationOptionsView: View {
}
}
- captionRow("Codex TUI 通知, 独立于 CodexBar 通知")
+ captionRow("settings.notifications.codex-tui.caption")
}
}
@@ -342,7 +342,7 @@ struct NotificationOptionsView: View {
if showsSoundControls {
HStack(spacing: Metrics.notificationControlSpacing) {
- Text("通知音效")
+ Text("settings.notifications.sound.title")
.font(.caption2)
.foregroundStyle(.tertiary)
@@ -447,8 +447,8 @@ struct NotificationOptionsView: View {
private static func taskCompletionDurationLabel(_ seconds: Int) -> String {
seconds < 60
- ? String(localized: "\(seconds) 秒")
- : String(localized: "\(seconds / 60) 分钟")
+ ? String(localized: "duration.seconds", defaultValue: "\(seconds, specifier: "%lld")")
+ : String(localized: "duration.minutes", defaultValue: "\(seconds / 60, specifier: "%lld")")
}
private enum Metrics {
diff --git a/Docs/UserGuide/settings.md b/Docs/UserGuide/settings.md
index 1247515..62642e8 100644
--- a/Docs/UserGuide/settings.md
+++ b/Docs/UserGuide/settings.md
@@ -127,7 +127,7 @@ Hook 关闭时该选项会显示为关闭并置灰,保存的选择不会被覆
| 选项 | 默认值 | 可选值 |
| --- | --- | --- |
-| 等待批准时保持 | 关闭 | 开启或关闭 |
+| 等待批准时保持防睡眠 | 关闭 | 开启或关闭 |
| 保持屏幕常亮 | 关闭 | 开启或关闭 |
| 最长防睡眠时间 | 12 小时 | 1, 2, 4, 8, 12, 24 小时或无限制 |
| 异常会话保护 | 1 小时 | 30 分钟, 1, 2, 4 小时 |
diff --git a/Docs/UserGuide/sleep-prevention.md b/Docs/UserGuide/sleep-prevention.md
index aa8a7dc..5ad92f0 100644
--- a/Docs/UserGuide/sleep-prevention.md
+++ b/Docs/UserGuide/sleep-prevention.md
@@ -19,7 +19,7 @@ CodexBar 会根据实时任务状态自动管理系统睡眠,让长任务在
1. CodexBar 正在运行且没有进入退出流程
2. `防止系统睡眠` 主开关已打开
3. CodexBar Hook 已安装并通过最近一次明确校验
-4. 至少有一个非匿名运行中任务,或已开启等待批准时保持且存在非匿名等待任务
+4. 至少有一个非匿名运行中任务,或已开启 `等待批准时保持防睡眠` 且存在非匿名等待任务
5. CodexBarHelper 已注册并获得系统批准
6. CodexBarHelper 当前不在更新过程中
7. 低电量保护当前没有生效
@@ -35,7 +35,7 @@ CodexBar 会根据实时任务状态自动管理系统睡眠,让长任务在
| 选项 | 作用 | 默认值 | 可选值 |
| --- | --- | --- | --- |
-| 等待批准时保持 | 等待用户批准的任务也参与防睡眠 | 关闭 | 开启或关闭 |
+| 等待批准时保持防睡眠 | 等待用户批准的任务也参与防睡眠 | 关闭 | 开启或关闭 |
| 保持屏幕常亮 | 同时阻止显示器睡眠、屏保和闲置锁屏 | 关闭 | 开启或关闭 |
| 最长防睡眠时间 | 限制一轮实际防睡眠的累计时长 | 12 小时 | 1, 2, 4, 8, 12, 24 小时或无限制 |
| 异常会话保护 | 长时间无进展时隐藏任务并停止其防睡眠贡献 | 1 小时 | 30 分钟, 1, 2, 4 小时 |
@@ -43,7 +43,7 @@ CodexBar 会根据实时任务状态自动管理系统睡眠,让长任务在
没有内置电池的 Mac 不显示低电量保护。
-## 等待批准时保持
+## 等待批准时保持防睡眠
关闭时,任务从运行中进入等待批准后不再支撑防睡眠。
diff --git a/Docs/UserGuide/troubleshooting.md b/Docs/UserGuide/troubleshooting.md
index b8e0121..b244f52 100644
--- a/Docs/UserGuide/troubleshooting.md
+++ b/Docs/UserGuide/troubleshooting.md
@@ -82,7 +82,7 @@ Hook 配置位于 `$CODEX_HOME/hooks.json`,未设置 `CODEX_HOME` 时位于 `~
1. CodexBar Hook 是否有效
2. `防止系统睡眠` 是否开启
3. 当前是否存在运行中任务
-4. 只有等待任务时,`等待批准时保持` 是否开启
+4. 只有等待任务时,`等待批准时保持防睡眠` 是否开启
5. 设置页是否提示需要批准 CodexBar 后台运行
6. 是否正在触发低电量保护
7. 是否已经达到最长防睡眠时间