Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleExecutable</key>
<string>Signal</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<string>1.0.1</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.0.1</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleIconFile</key>
Expand Down
14 changes: 14 additions & 0 deletions Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@
"Project" = "Project";
"User Prompts" = "User Prompts";
"Back" = "Back";
"Breathes every %.1fs" = "Breathes every %.1fs";
"Only Red and Yellow breathe" = "Only Red and Yellow breathe";
"Launch automatically on startup" = "Launch automatically on startup";
"CLI Helper Tool" = "CLI Helper Tool";
"Control Signal directly from your terminal or scripts using the sgnl tool." = "Control Signal directly from your terminal or scripts using the sgnl tool.";
"Install 'sgnl' CLI Command" = "Install 'sgnl' CLI Command";
"Session ID:" = "Session ID:";
"Installation Successful" = "Installation Successful";
"The 'sgnl' command-line tool has been installed to:\n%@\n\nPlease make sure '%@' is in your PATH." = "The 'sgnl' command-line tool has been installed to:\n%@\n\nPlease make sure '%@' is in your PATH.";
"Installation Failed" = "Installation Failed";
"Could not locate the 'sgnl' binary inside the application bundle resources." = "Could not locate the 'sgnl' binary inside the application bundle resources.";
"An error occurred during installation:\n%@" = "An error occurred during installation:\n%@";
"OK" = "OK";

14 changes: 14 additions & 0 deletions Resources/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@
"Project" = "项目";
"User Prompts" = "用户输入";
"Back" = "返回";
"Breathes every %.1fs" = "每 %.1f 秒呼吸一次";
"Only Red and Yellow breathe" = "仅红灯和黄灯支持呼吸效果";
"Launch automatically on startup" = "开机时自动启动";
"CLI Helper Tool" = "命令行辅助工具";
"Control Signal directly from your terminal or scripts using the sgnl tool." = "使用 sgnl 工具直接从终端或脚本控制 Signal。";
"Install 'sgnl' CLI Command" = "安装 'sgnl' 命令行工具";
"Session ID:" = "会话 ID:";
"Installation Successful" = "安装成功";
"The 'sgnl' command-line tool has been installed to:\n%@\n\nPlease make sure '%@' is in your PATH." = "sgnl 命令行工具已成功安装至:\n%@\n\n请确保将 '%@' 添加到了您的 PATH 环境变量中。";
"Installation Failed" = "安装失败";
"Could not locate the 'sgnl' binary inside the application bundle resources." = "无法在应用包资源中找到 'sgnl' 二进制文件。";
"An error occurred during installation:\n%@" = "安装过程中发生错误:\n%@";
"OK" = "确定";

16 changes: 9 additions & 7 deletions Sources/Signal/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
let targetURL = targetDir.appendingPathComponent("sgnl")

guard let sourceURL = Bundle.main.url(forResource: "sgnl", withExtension: nil) else {
showCLIError(message: "Could not locate the 'sgnl' binary inside the application bundle resources.")
showCLIError(message: NSLocalizedString("Could not locate the 'sgnl' binary inside the application bundle resources.", comment: ""))
return
}

Expand All @@ -166,23 +166,25 @@ class AppDelegate: NSObject, NSApplicationDelegate {

// Show success alert
let alert = NSAlert()
alert.messageText = "Installation Successful"
alert.informativeText = "The 'sgnl' command-line tool has been installed to:\n\(targetURL.path)\n\nPlease make sure '\(targetDir.path)' is in your PATH."
alert.messageText = NSLocalizedString("Installation Successful", comment: "")
let format = NSLocalizedString("The 'sgnl' command-line tool has been installed to:\n%@\n\nPlease make sure '%@' is in your PATH.", comment: "")
alert.informativeText = String(format: format, targetURL.path, targetDir.path)
alert.alertStyle = .informational
alert.addButton(withTitle: "OK")
alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
alert.runModal()

} catch {
showCLIError(message: "An error occurred during installation:\n\(error.localizedDescription)")
let format = NSLocalizedString("An error occurred during installation:\n%@", comment: "")
showCLIError(message: String(format: format, error.localizedDescription))
}
}

private func showCLIError(message: String) {
let alert = NSAlert()
alert.messageText = "Installation Failed"
alert.messageText = NSLocalizedString("Installation Failed", comment: "")
alert.informativeText = message
alert.alertStyle = .critical
alert.addButton(withTitle: "OK")
alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
alert.runModal()
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Signal/Views/ClaudeDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct ClaudeDetailView: View {
}

HStack {
Text("Session ID:")
Text(NSLocalizedString("Session ID:", comment: ""))
.font(.system(size: 10, weight: .bold))
.foregroundColor(.secondary)
Text(session.sessionId)
Expand Down
Loading