From 55212019ae0746681de3715ea1ecc5042d4e4a6e Mon Sep 17 00:00:00 2001 From: Aaron Ruan Date: Sat, 15 Mar 2025 17:53:00 +0800 Subject: [PATCH] add zh-Hans translations for macOS app Signed-off-by: Aaron Ruan --- macos/Ghostty.xcodeproj/project.pbxproj | 33 +- macos/Localizable.xcstrings | 512 +++++++ macos/Sources/App/macOS/AppDelegate.swift | 8 +- .../App/macOS/{ => Base.lproj}/MainMenu.xib | 4 +- .../App/macOS/mul.lproj/MainMenu.xcstrings | 1202 +++++++++++++++++ .../ClipboardConfirmationController.swift | 4 +- .../ClipboardConfirmationView.swift | 8 +- .../QuickTerminalController.swift | 6 +- .../Settings/ConfigurationErrorsView.swift | 2 +- .../Features/Settings/SettingsView.swift | 6 +- .../Terminal/BaseTerminalController.swift | 15 +- macos/Sources/Features/Terminal/Terminal.xib | 6 +- .../Terminal/TerminalController.swift | 12 +- .../Features/Terminal/TerminalManager.swift | 16 +- .../Features/Terminal/TerminalWindow.swift | 2 +- macos/Sources/Ghostty/Ghostty.App.swift | 6 +- .../Ghostty/Ghostty.TerminalSplit.swift | 12 +- .../Sources/Ghostty/SurfaceView_AppKit.swift | 26 +- 18 files changed, 1814 insertions(+), 66 deletions(-) create mode 100644 macos/Localizable.xcstrings rename macos/Sources/App/macOS/{ => Base.lproj}/MainMenu.xib (99%) create mode 100644 macos/Sources/App/macOS/mul.lproj/MainMenu.xcstrings diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index b4c00946c..e3c95692f 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -3,14 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 56; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ 29C15B1D2CDC3B2900520DD4 /* bat in Resources */ = {isa = PBXBuildFile; fileRef = 29C15B1C2CDC3B2000520DD4 /* bat */; }; 55154BE02B33911F001622DC /* ghostty in Resources */ = {isa = PBXBuildFile; fileRef = 55154BDF2B33911F001622DC /* ghostty */; }; 552964E62B34A9B400030505 /* vim in Resources */ = {isa = PBXBuildFile; fileRef = 552964E52B34A9B400030505 /* vim */; }; - 857F63812A5E64F200CA4815 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 857F63802A5E64F200CA4815 /* MainMenu.xib */; }; + 8DA16F602D84598D009A416E /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 8DA16F5F2D84598D009A416E /* Localizable.xcstrings */; }; + 8DA16F612D84598D009A416E /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 8DA16F5F2D84598D009A416E /* Localizable.xcstrings */; }; + 8DA16F662D845EF6009A416E /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8DA16F652D845EF6009A416E /* MainMenu.xib */; }; 9351BE8E3D22937F003B3499 /* nvim in Resources */ = {isa = PBXBuildFile; fileRef = 9351BE8E2D22937F003B3499 /* nvim */; }; A514C8D62B54A16400493A16 /* Ghostty.Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514C8D52B54A16400493A16 /* Ghostty.Config.swift */; }; A514C8D72B54A16400493A16 /* Ghostty.Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514C8D52B54A16400493A16 /* Ghostty.Config.swift */; }; @@ -117,7 +119,9 @@ 3B39CAA42B33949B00DABEB8 /* GhosttyReleaseLocal.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GhosttyReleaseLocal.entitlements; sourceTree = ""; }; 55154BDF2B33911F001622DC /* ghostty */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ghostty; path = "../zig-out/share/ghostty"; sourceTree = ""; }; 552964E52B34A9B400030505 /* vim */ = {isa = PBXFileReference; lastKnownFileType = folder; name = vim; path = "../zig-out/share/vim"; sourceTree = ""; }; - 857F63802A5E64F200CA4815 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = ""; }; + 8DA16F5F2D84598D009A416E /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; + 8DA16F642D845EF6009A416E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 8DA16F672D845EF6009A416E /* mul */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; name = mul; path = mul.lproj/MainMenu.xcstrings; sourceTree = ""; }; 9351BE8E2D22937F003B3499 /* nvim */ = {isa = PBXFileReference; lastKnownFileType = folder; name = nvim; path = "../zig-out/share/nvim"; sourceTree = ""; }; A514C8D52B54A16400493A16 /* Ghostty.Config.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Ghostty.Config.swift; sourceTree = ""; }; A51B78462AF4B58B00F3EDB9 /* TerminalWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TerminalWindow.swift; sourceTree = ""; }; @@ -336,7 +340,7 @@ children = ( A5FEB2FF2ABB69450068369E /* main.swift */, A53426342A7DA53D00EBB7A2 /* AppDelegate.swift */, - 857F63802A5E64F200CA4815 /* MainMenu.xib */, + 8DA16F652D845EF6009A416E /* MainMenu.xib */, C1F26EEA2B76CC2400404083 /* ghostty-bridging-header.h */, ); path = macOS; @@ -439,6 +443,7 @@ A5B30528299BEAAA0047F10C = { isa = PBXGroup; children = ( + 8DA16F5F2D84598D009A416E /* Localizable.xcstrings */, A571AB1C2A206FC600248498 /* Ghostty-Info.plist */, A5B30538299BEAAB0047F10C /* Assets.xcassets */, A5B3053D299BEAAB0047F10C /* Ghostty.entitlements */, @@ -575,6 +580,7 @@ knownRegions = ( en, Base, + "zh-Hans", ); mainGroup = A5B30528299BEAAA0047F10C; packageReferences = ( @@ -603,13 +609,14 @@ A5985CE62C33060F00C57AD3 /* man in Resources */, 9351BE8E3D22937F003B3499 /* nvim in Resources */, A5A1F8852A489D6800D1E8BC /* terminfo in Resources */, + 8DA16F602D84598D009A416E /* Localizable.xcstrings in Resources */, 552964E62B34A9B400030505 /* vim in Resources */, FC5218FA2D10FFCE004C93E0 /* zsh in Resources */, A5B30539299BEAAB0047F10C /* Assets.xcassets in Resources */, A51BFC1E2B2FB5CE00E92F16 /* About.xib in Resources */, A5E112932AF73E6E00C6E0C2 /* ClipboardConfirmation.xib in Resources */, A5CDF1912AAF9A5800513312 /* ConfigurationErrors.xib in Resources */, - 857F63812A5E64F200CA4815 /* MainMenu.xib in Resources */, + 8DA16F662D845EF6009A416E /* MainMenu.xib in Resources */, A596309A2AEE1C6400D64628 /* Terminal.xib in Resources */, A5CBD05C2CA0C5C70017A1AE /* QuickTerminal.xib in Resources */, ); @@ -619,6 +626,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8DA16F612D84598D009A416E /* Localizable.xcstrings in Resources */, A53D0C952B53B4D800305CE6 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -723,6 +731,18 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXVariantGroup section */ + 8DA16F652D845EF6009A416E /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 8DA16F642D845EF6009A416E /* Base */, + 8DA16F672D845EF6009A416E /* mul */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 3B39CAA22B33946300DABEB8 /* ReleaseLocal */ = { isa = XCBuildConfiguration; @@ -775,6 +795,7 @@ MTL_FAST_MATH = YES; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OPTIMIZATION_LEVEL = "-O"; }; name = ReleaseLocal; @@ -890,6 +911,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; @@ -945,6 +967,7 @@ MTL_FAST_MATH = YES; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OPTIMIZATION_LEVEL = "-O"; }; name = Release; diff --git a/macos/Localizable.xcstrings b/macos/Localizable.xcstrings new file mode 100644 index 000000000..d9b6497b8 --- /dev/null +++ b/macos/Localizable.xcstrings @@ -0,0 +1,512 @@ +{ + "sourceLanguage" : "en", + "strings" : { + "%lld error(s) was/were found while loading the configuration. Please review the errors below and reload your configuration or ignore the erroneous lines." : { + "localizations" : { + "en" : { + "variations" : { + "plural" : { + "one" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld error wasfound while loading the configuration. Please review the errors below and reload your configuration or ignore the erroneous lines." + } + }, + "other" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld errors were found while loading the configuration. Please review the errors below and reload your configuration or ignore the erroneous lines." + } + } + } + } + }, + "zh-Hans" : { + "variations" : { + "plural" : { + "other" : { + "stringUnit" : { + "state" : "translated", + "value" : "加载设置时发现了%lld个错误。请查看下方的错误,并重新加载您的设置或忽略出错的行。" + } + } + } + } + } + } + }, + "All terminal sessions in this window will be terminated." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "窗口内所有运行中的进程将被终止。" + } + } + } + }, + "All terminal sessions will be terminated." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "终端内所有运行中的进程将被终止。" + } + } + } + }, + "Allow" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "允许" + } + } + } + }, + "Authorize Clipboard Access" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "剪切板访问授权" + } + } + } + }, + "Cancel" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "取消" + } + } + } + }, + "Cannot Create New Tab" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "无法创建新的标签页" + } + } + } + }, + "Change Terminal Title" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "更改终端标题" + } + } + } + }, + "Change Title..." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "更改标题…" + } + } + } + }, + "Close" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭" + } + } + } + }, + "Close All Windows" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭所有窗口" + } + } + } + }, + "Close All Windows?" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭所有窗口吗?" + } + } + } + }, + "Close Ghostty" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭Ghostty" + } + } + } + }, + "Close Tab?" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭标签页吗?" + } + } + } + }, + "Close Terminal?" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭终端吗?" + } + } + } + }, + "Close the Terminal" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭这个终端" + } + } + } + }, + "Close Window?" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭窗口吗?" + } + } + } + }, + "Coming Soon. 🚧" : { + "shouldTranslate" : false + }, + "Copy" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "拷贝" + } + } + } + }, + "Debug builds of Ghostty are very slow and you may experience\nperformance problems. Debug builds are only recommended during\ndevelopment." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ghostty的调试版本运行非常缓慢,可能\n会出现性能问题。建议仅在开发过程中使\n用调试版本。" + } + } + } + }, + "Deny" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "拒绝" + } + } + } + }, + "Docs" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "文档" + } + } + } + }, + "Enable window decorations to use tabs" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "启用窗口装饰以使用标签页" + } + } + } + }, + "Fast, native, feature-rich terminal \nemulator pushing modern features." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "快速、原生、功能丰富的终端模拟器,提供现代功能。" + } + } + } + }, + "Ghostty" : { + "shouldTranslate" : false + }, + "GitHub" : { + "shouldTranslate" : false + }, + "Ignore" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "忽略" + } + } + } + }, + "Leave blank to restore the default." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "留空以重置至默认标题。" + } + } + } + }, + "Loading" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "加载中" + } + } + } + }, + "New tabs are unsupported while in non-native fullscreen. Exit fullscreen and try again." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "在非原生全屏幕模式下无法新建标签页。退出全屏幕后再试试。" + } + } + } + }, + "Oh, no. 😭" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "大事不妙😭" + } + } + } + }, + "OK" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "好" + } + } + } + }, + "Paste" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "粘贴" + } + } + } + }, + "Quit Ghostty?" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "退出Ghostty吗?" + } + } + } + }, + "Reload Configuration" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "重新加载设置" + } + } + } + }, + "Reset Terminal" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "重置终端" + } + } + } + }, + "Reset Zoom" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "重置缩放" + } + } + } + }, + "Secure Input is active. Secure Input is a macOS security feature that \nprevents applications from reading keyboard events. This is enabled \nautomatically whenever Ghostty detects a password prompt in the terminal, \nor at all times if `Ghostty > Secure Keyboard Entry` is active." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "安全输入已启用。安全输入是macOS的一项安全功能,\n可防止其他应用程序读取键盘事件。当Ghostty在终端\n中检测到密码输入提示时,会自动启用该功能;如果启用\n`Ghostty > 安全键盘输入`,则会始终保持启用状态。" + } + } + } + }, + "Something went fatally wrong.\nCheck the logs and restart Ghostty." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "发生致命错误。请检查日志并重新启动Ghostty。" + } + } + } + }, + "Split Down" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向下分屏" + } + } + } + }, + "Split Left" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向左分屏" + } + } + } + }, + "Split Right" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向右分屏" + } + } + } + }, + "Split Up" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向上分屏" + } + } + } + }, + "Tabs are disabled" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "标签页已被禁用" + } + } + } + }, + "Tabs aren't supported in the Quick Terminal." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "快捷终端不支持标签页" + } + } + } + }, + "The terminal still has a running process. If you close the tab the process will be killed." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "这个终端中有正在运行的进程。关闭这个标签页将终止该进程。" + } + } + } + }, + "The terminal still has a running process. If you close the terminal the process will be killed." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "这个终端中有正在运行的进程。关闭这个终端将终止该进程。" + } + } + } + }, + "Toggle Terminal Inspector" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "切换终端检视器" + } + } + } + }, + "Warning: Potentially Unsafe Paste" : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "警告:粘贴内容可能不安全" + } + } + } + }, + "You can't configure settings in the GUI yet. To modify settings, edit the file at $HOME/.config/ghostty/config and restart Ghostty." : { + "shouldTranslate" : false + }, + "You're running a debug build of Ghostty! Performance will be degraded." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ghostty正在以调试模式运行!性能将大打折扣。" + } + } + } + } + }, + "version" : "1.0" +} \ No newline at end of file diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift index 7d5e7cd25..f1aa0f677 100644 --- a/macos/Sources/App/macOS/AppDelegate.swift +++ b/macos/Sources/App/macOS/AppDelegate.swift @@ -287,10 +287,10 @@ class AppDelegate: NSObject, // We have some visible window. Show an app-wide modal to confirm quitting. let alert = NSAlert() - alert.messageText = "Quit Ghostty?" - alert.informativeText = "All terminal sessions will be terminated." - alert.addButton(withTitle: "Close Ghostty") - alert.addButton(withTitle: "Cancel") + alert.messageText = String(localized: "Quit Ghostty?") + alert.informativeText = String(localized: "All terminal sessions will be terminated.") + alert.addButton(withTitle: String(localized: "Close Ghostty")) + alert.addButton(withTitle: String(localized: "Cancel")) alert.alertStyle = .warning switch (alert.runModal()) { case .alertFirstButtonReturn: diff --git a/macos/Sources/App/macOS/MainMenu.xib b/macos/Sources/App/macOS/Base.lproj/MainMenu.xib similarity index 99% rename from macos/Sources/App/macOS/MainMenu.xib rename to macos/Sources/App/macOS/Base.lproj/MainMenu.xib index 88db6ed01..cded46412 100644 --- a/macos/Sources/App/macOS/MainMenu.xib +++ b/macos/Sources/App/macOS/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + diff --git a/macos/Sources/App/macOS/mul.lproj/MainMenu.xcstrings b/macos/Sources/App/macOS/mul.lproj/MainMenu.xcstrings new file mode 100644 index 000000000..874585a0c --- /dev/null +++ b/macos/Sources/App/macOS/mul.lproj/MainMenu.xcstrings @@ -0,0 +1,1202 @@ +{ + "sourceLanguage" : "en", + "strings" : { + "0yU-hC-8xF.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select Split Above\"; ObjectID = \"0yU-hC-8xF\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Split Above" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择上方的分屏" + } + } + } + }, + "1pv-LF-NBJ.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Quick Terminal\"; ObjectID = \"1pv-LF-NBJ\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Quick Terminal" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "快捷终端" + } + } + } + }, + "1Xt-HY-uBw.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Ghostty\"; ObjectID = \"1Xt-HY-uBw\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Ghostty" + } + } + }, + "shouldTranslate" : false + }, + "3gH-VD-vL9.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Equalize Splits\"; ObjectID = \"3gH-VD-vL9\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Equalize Splits" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "均衡分屏" + } + } + } + }, + "3L3-2p-Joi.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"View\"; ObjectID = \"3L3-2p-Joi\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "View" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "显示" + } + } + } + }, + "4sb-4s-VLi.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Quit Ghostty\"; ObjectID = \"4sb-4s-VLi\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Quit Ghostty" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "退出Ghostty" + } + } + } + }, + "5kV-Vb-QxS.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"About Ghostty\"; ObjectID = \"5kV-Vb-QxS\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "About Ghostty" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关于Ghostty" + } + } + } + }, + "8kY-Pi-KaY.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Toggle Full Screen\"; ObjectID = \"8kY-Pi-KaY\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Toggle Full Screen" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "切换全屏幕" + } + } + } + }, + "8tg-60-ZSU.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Select Split\"; ObjectID = \"8tg-60-ZSU\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Split" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择分屏" + } + } + } + }, + "24I-xg-qIq.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Change Title...\"; ObjectID = \"24I-xg-qIq\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Change Title..." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "更改标题…" + } + } + } + }, + "akq-ov-Jjh.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Paste Selection\"; ObjectID = \"akq-ov-Jjh\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Paste Selection" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "粘贴选区" + } + } + } + }, + "aQe-vS-j8Q.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Services\"; ObjectID = \"aQe-vS-j8Q\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Services" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "服务" + } + } + } + }, + "aUF-d1-5bR.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Window\"; ObjectID = \"aUF-d1-5bR\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Window" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "窗口" + } + } + } + }, + "AYu-sK-qS6.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Main Menu\"; ObjectID = \"AYu-sK-qS6\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Main Menu" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "主菜单" + } + } + } + }, + "bD7-ei-wKU.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select Next Split\"; ObjectID = \"bD7-ei-wKU\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Next Split" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择下一个分屏" + } + } + } + }, + "bib-Uj-vzu.title" : { + "comment" : "Class = \"NSMenu\"; title = \"File\"; ObjectID = \"bib-Uj-vzu\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "File" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "文件" + } + } + } + }, + "BJO-3W-fkO.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Resize Split\"; ObjectID = \"BJO-3W-fkO\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Resize Split" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "调整分屏大小" + } + } + } + }, + "BOF-NM-1cW.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Preferences…\"; ObjectID = \"BOF-NM-1cW\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Preferences…" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "偏好设置…" + } + } + } + }, + "CcX-ql-QU4.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Move Divider Right\"; ObjectID = \"CcX-ql-QU4\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Move Divider Right" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向右移动分隔" + } + } + } + }, + "CIH-ey-Z6x.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Increase Font Size\"; ObjectID = \"CIH-ey-Z6x\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Increase Font Size" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "增加字体大小" + } + } + } + }, + "cTK-oy-KuV.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select Split Left\"; ObjectID = \"cTK-oy-KuV\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Split Left" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择左侧的分屏" + } + } + } + }, + "dMs-cI-mzQ.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"File\"; ObjectID = \"dMs-cI-mzQ\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "File" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "文件" + } + } + } + }, + "dos-9S-LXC.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select Split\"; ObjectID = \"dos-9S-LXC\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Split" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择分屏" + } + } + } + }, + "DOX-wA-ilh.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Show/Hide All Terminals\"; ObjectID = \"DOX-wA-ilh\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Show/Hide All Terminals" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "显示/隐藏所有终端" + } + } + } + }, + "DVo-aG-piG.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Close\"; ObjectID = \"DVo-aG-piG\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Close" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭" + } + } + } + }, + "F2S-fz-NVQ.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Help\"; ObjectID = \"F2S-fz-NVQ\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Help" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "帮助" + } + } + } + }, + "FKE-Sm-Kum.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Ghostty Help\"; ObjectID = \"FKE-Sm-Kum\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Ghostty Help" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ghostty帮助" + } + } + } + }, + "Gbx-Vi-OGC.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Return To Default Size\"; ObjectID = \"Gbx-Vi-OGC\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Return To Default Size" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "恢复到初始大小" + } + } + } + }, + "GEA-5y-yzH.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Check for Updates...\"; ObjectID = \"GEA-5y-yzH\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Check for Updates..." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "检查更新…" + } + } + } + }, + "Ggp-7N-GbX.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Split Up\"; ObjectID = \"Ggp-7N-GbX\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Split Up" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向上分屏" + } + } + } + }, + "h9Y-40-3oo.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Move Divider Up\"; ObjectID = \"h9Y-40-3oo\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Move Divider Up" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向上移动分隔" + } + } + } + }, + "i27-pK-umN.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Paste\"; ObjectID = \"i27-pK-umN\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Paste" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "粘贴" + } + } + } + }, + "iU4-OB-ccf.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Edit\"; ObjectID = \"iU4-OB-ccf\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Edit" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "编辑" + } + } + } + }, + "Jah-MY-aLX.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Reset Font Size\"; ObjectID = \"Jah-MY-aLX\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Reset Font Size" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "重置字体大小" + } + } + } + }, + "Jqf-pv-Zcu.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Copy\"; ObjectID = \"Jqf-pv-Zcu\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Copy" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "拷贝" + } + } + } + }, + "Kd2-mp-pUS.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Show All\"; ObjectID = \"Kd2-mp-pUS\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Show All" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "全部显示" + } + } + } + }, + "KKH-XX-5py.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Reload Configuration\"; ObjectID = \"KKH-XX-5py\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Reload Configuration" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "重新加载设置" + } + } + } + }, + "kzb-SZ-dOA.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Decrease Font Size\"; ObjectID = \"kzb-SZ-dOA\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Decrease Font Size" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "减少字体大小" + } + } + } + }, + "LE2-aR-0XJ.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Bring All to Front\"; ObjectID = \"LE2-aR-0XJ\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Bring All to Front" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "前置全部窗口" + } + } + } + }, + "Lic-px-1wg.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select Previous Split\"; ObjectID = \"Lic-px-1wg\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Previous Split" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择上一个分屏" + } + } + } + }, + "m6z-2H-VW7.title" : { + "comment" : "Class = \"NSMenu\"; title = \"View\"; ObjectID = \"m6z-2H-VW7\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "View" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "显示" + } + } + } + }, + "Obb-Mk-j8J.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Close Tab\"; ObjectID = \"Obb-Mk-j8J\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Close Tab" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭标签页" + } + } + } + }, + "oC6-w4-qI7.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Secure Keyboard Entry\"; ObjectID = \"oC6-w4-qI7\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Secure Keyboard Entry" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "安全键盘输入" + } + } + } + }, + "Olw-nP-bQN.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Hide Ghostty\"; ObjectID = \"Olw-nP-bQN\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Hide Ghostty" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "隐藏Ghostty" + } + } + } + }, + "oPd-mn-IEH.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Zoom Split\"; ObjectID = \"oPd-mn-IEH\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Zoom Split" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "缩放分屏" + } + } + } + }, + "OY7-WF-poV.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Minimize\"; ObjectID = \"OY7-WF-poV\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Minimize" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "最小化" + } + } + } + }, + "Ppv-GP-lQU.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Split Left\"; ObjectID = \"Ppv-GP-lQU\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Split Left" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向左分屏" + } + } + } + }, + "q2h-lq-e4r.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select All\"; ObjectID = \"q2h-lq-e4r\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select All" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "全选" + } + } + } + }, + "QDz-d9-CBr.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select Split Below\"; ObjectID = \"QDz-d9-CBr\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Split Below" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择下方的分屏" + } + } + } + }, + "QwP-M5-fvh.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Terminal Inspector\"; ObjectID = \"QwP-M5-fvh\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Terminal Inspector" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "终端检视器" + } + } + } + }, + "R4o-n2-Eq4.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Zoom\"; ObjectID = \"R4o-n2-Eq4\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Zoom" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "缩放" + } + } + } + }, + "rJe-5J-bwL.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Services\"; ObjectID = \"rJe-5J-bwL\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Services" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "服务" + } + } + } + }, + "t7T-Ti-0im.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Resize Split\"; ObjectID = \"t7T-Ti-0im\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Resize Split" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "调整分屏大小" + } + } + } + }, + "Td7-aD-5lo.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Window\"; ObjectID = \"Td7-aD-5lo\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Window" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "窗口" + } + } + } + }, + "UDZ-4y-6xL.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Split Down\"; ObjectID = \"UDZ-4y-6xL\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Split Down" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向下分屏" + } + } + } + }, + "upj-mc-L7X.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Select Split Right\"; ObjectID = \"upj-mc-L7X\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Select Split Right" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "选择右侧的分屏" + } + } + } + }, + "uQy-DD-JDr.title" : { + "comment" : "Class = \"NSMenu\"; title = \"Ghostty\"; ObjectID = \"uQy-DD-JDr\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Ghostty" + } + } + }, + "shouldTranslate" : false + }, + "uTG-Vz-hJU.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"New Tab\"; ObjectID = \"uTG-Vz-hJU\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "New Tab" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "新建标签页" + } + } + } + }, + "Vdr-fp-XzO.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Hide Others\"; ObjectID = \"Vdr-fp-XzO\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Hide Others" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "隐藏其他" + } + } + } + }, + "VUR-Ld-nLx.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Split Right\"; ObjectID = \"VUR-Ld-nLx\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Split Right" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向右分屏" + } + } + } + }, + "W5w-UZ-crk.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Close Window\"; ObjectID = \"W5w-UZ-crk\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Close Window" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭窗口" + } + } + } + }, + "Was-JA-tGl.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"New Window\"; ObjectID = \"Was-JA-tGl\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "New Window" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "新建窗口" + } + } + } + }, + "wpr-3q-Mcd.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Help\"; ObjectID = \"wpr-3q-Mcd\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Help" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "帮助" + } + } + } + }, + "wSR-ny-j1a.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Move Divider Left\"; ObjectID = \"wSR-ny-j1a\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Move Divider Left" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向左移动分隔" + } + } + } + }, + "yKr-Vi-Yqw.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Close All Windows\"; ObjectID = \"yKr-Vi-Yqw\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Close All Windows" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭所有窗口" + } + } + } + }, + "Zj7-2W-fdF.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Move Divider Down\"; ObjectID = \"Zj7-2W-fdF\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Move Divider Down" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "向下移动分隔" + } + } + } + }, + "ZUG-Nx-Wkj.title" : { + "comment" : "Class = \"NSMenuItem\"; title = \"Edit\"; ObjectID = \"ZUG-Nx-Wkj\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Edit" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "编辑" + } + } + } + } + }, + "version" : "1.0" +} \ No newline at end of file diff --git a/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationController.swift b/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationController.swift index 2040dcfae..2472cdd12 100644 --- a/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationController.swift +++ b/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationController.swift @@ -35,9 +35,9 @@ class ClipboardConfirmationController: NSWindowController { switch (request) { case .paste: - window.title = "Warning: Potentially Unsafe Paste" + window.title = String(localized: "Warning: Potentially Unsafe Paste") case .osc_52_read, .osc_52_write: - window.title = "Authorize Clipboard Access" + window.title = String(localized: "Authorize Clipboard Access") } window.contentView = NSHostingView(rootView: ClipboardConfirmationView( diff --git a/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationView.swift b/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationView.swift index 1a7272e16..122e5a527 100644 --- a/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationView.swift +++ b/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationView.swift @@ -14,13 +14,13 @@ struct ClipboardConfirmationView: View { static func text(_ action: Action, _ reason: Ghostty.ClipboardRequest) -> String { switch (action, reason) { case (.cancel, .paste): - return "Cancel" + return String(localized: "Cancel") case (.cancel, .osc_52_read), (.cancel, .osc_52_write): - return "Deny" + return String(localized: "Deny") case (.confirm, .paste): - return "Paste" + return String(localized: "Paste") case (.confirm, .osc_52_read), (.confirm, .osc_52_write): - return "Allow" + return String(localized: "Allow") } } } diff --git a/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift index fac3a2fbb..7526872aa 100644 --- a/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift +++ b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift @@ -445,9 +445,9 @@ class QuickTerminalController: BaseTerminalController { private func showNoNewTabAlert() { guard let window else { return } let alert = NSAlert() - alert.messageText = "Cannot Create New Tab" - alert.informativeText = "Tabs aren't supported in the Quick Terminal." - alert.addButton(withTitle: "OK") + alert.messageText = String(localized: "Cannot Create New Tab") + alert.informativeText = String(localized: "Tabs aren't supported in the Quick Terminal.") + alert.addButton(withTitle: String(localized: "OK")) alert.alertStyle = .warning alert.beginSheetModal(for: window) } diff --git a/macos/Sources/Features/Settings/ConfigurationErrorsView.swift b/macos/Sources/Features/Settings/ConfigurationErrorsView.swift index 3ed84e3f0..8ba73a2bf 100644 --- a/macos/Sources/Features/Settings/ConfigurationErrorsView.swift +++ b/macos/Sources/Features/Settings/ConfigurationErrorsView.swift @@ -17,7 +17,7 @@ struct ConfigurationErrorsView: View { .frame(alignment: .center) Text(""" - ^[\(model.errors.count) error(s) were](inflect: true) found while loading the configuration. \ + \(model.errors.count) error(s) was/were found while loading the configuration. \ Please review the errors below and reload your configuration or ignore the erroneous lines. """) .frame(maxWidth: .infinity, alignment: .leading) diff --git a/macos/Sources/Features/Settings/SettingsView.swift b/macos/Sources/Features/Settings/SettingsView.swift index 82d24181a..b304b8dd9 100644 --- a/macos/Sources/Features/Settings/SettingsView.swift +++ b/macos/Sources/Features/Settings/SettingsView.swift @@ -13,8 +13,10 @@ struct SettingsView: View { VStack(alignment: .leading) { Text("Coming Soon. 🚧").font(.title) - Text("You can't configure settings in the GUI yet. To modify settings, " + - "edit the file at $HOME/.config/ghostty/config and restart Ghostty.") + Text(""" + You can't configure settings in the GUI yet. To modify settings, \ + edit the file at $HOME/.config/ghostty/config and restart Ghostty. + """) .multilineTextAlignment(.leading) .lineLimit(nil) } diff --git a/macos/Sources/Features/Terminal/BaseTerminalController.swift b/macos/Sources/Features/Terminal/BaseTerminalController.swift index 3b4b1a2ef..457726461 100644 --- a/macos/Sources/Features/Terminal/BaseTerminalController.swift +++ b/macos/Sources/Features/Terminal/BaseTerminalController.swift @@ -450,11 +450,16 @@ class BaseTerminalController: NSWindowController, // We require confirmation, so show an alert as long as we aren't already. let alert = NSAlert() - alert.messageText = "Close Terminal?" - alert.informativeText = "The terminal still has a running process. If you close the " + - "terminal the process will be killed." - alert.addButton(withTitle: "Close the Terminal") - alert.addButton(withTitle: "Cancel") + alert.messageText = String(localized: "Close Terminal?") + alert.informativeText = String( + localized: + """ + The terminal still has a running process. If you close the \ + terminal the process will be killed. + """ + ) + alert.addButton(withTitle: String(localized: "Close the Terminal")) + alert.addButton(withTitle: String(localized: "Cancel")) alert.alertStyle = .warning alert.beginSheetModal(for: window, completionHandler: { response in self.alert = nil diff --git a/macos/Sources/Features/Terminal/Terminal.xib b/macos/Sources/Features/Terminal/Terminal.xib index 65b03b6eb..013022a12 100644 --- a/macos/Sources/Features/Terminal/Terminal.xib +++ b/macos/Sources/Features/Terminal/Terminal.xib @@ -1,8 +1,8 @@ - + - + @@ -17,7 +17,7 @@ - + diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index ddc459c5b..9d9d94797 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -592,8 +592,8 @@ class TerminalController: BaseTerminalController { let alert = NSAlert() alert.messageText = messageText alert.informativeText = informativeText - alert.addButton(withTitle: "Close") - alert.addButton(withTitle: "Cancel") + alert.addButton(withTitle: String(localized: "Close")) + alert.addButton(withTitle: String(localized: "Cancel")) alert.alertStyle = .warning alert.beginSheetModal(for: window) { response in if response == .alertFirstButtonReturn { @@ -613,8 +613,8 @@ class TerminalController: BaseTerminalController { if surfaceTree?.needsConfirmQuit() ?? false { confirmClose( window: window, - messageText: "Close Tab?", - informativeText: "The terminal still has a running process. If you close the tab the process will be killed." + messageText: String(localized: "Close Tab?"), + informativeText: String(localized: "The terminal still has a running process. If you close the tab the process will be killed.") ) { window.close() } @@ -659,8 +659,8 @@ class TerminalController: BaseTerminalController { confirmClose( window: window, - messageText: "Close Window?", - informativeText: "All terminal sessions in this window will be terminated." + messageText: String(localized: "Close Window?"), + informativeText: String(localized: "All terminal sessions in this window will be terminated.") ) { tabGroup.windows.forEach { $0.close() } } diff --git a/macos/Sources/Features/Terminal/TerminalManager.swift b/macos/Sources/Features/Terminal/TerminalManager.swift index 07735cb58..0819f5b17 100644 --- a/macos/Sources/Features/Terminal/TerminalManager.swift +++ b/macos/Sources/Features/Terminal/TerminalManager.swift @@ -134,9 +134,11 @@ class TerminalManager { let fullscreenStyle = controller.fullscreenStyle, fullscreenStyle.isFullscreen && !fullscreenStyle.supportsTabs { let alert = NSAlert() - alert.messageText = "Cannot Create New Tab" - alert.informativeText = "New tabs are unsupported while in non-native fullscreen. Exit fullscreen and try again." - alert.addButton(withTitle: "OK") + alert.messageText = String(localized: "Cannot Create New Tab") + alert.informativeText = String( + localized: "New tabs are unsupported while in non-native fullscreen. Exit fullscreen and try again." + ) + alert.addButton(withTitle: String(localized: "OK")) alert.alertStyle = .warning alert.beginSheetModal(for: parent) return @@ -296,10 +298,10 @@ class TerminalManager { // If we need confirmation by any, show one confirmation for all windows let alert = NSAlert() - alert.messageText = "Close All Windows?" - alert.informativeText = "All terminal sessions will be terminated." - alert.addButton(withTitle: "Close All Windows") - alert.addButton(withTitle: "Cancel") + alert.messageText = String(localized: "Close All Windows?") + alert.informativeText = String(localized: "All terminal sessions will be terminated.") + alert.addButton(withTitle: String(localized: "Close All Windows")) + alert.addButton(withTitle: String(localized: "Cancel")) alert.alertStyle = .warning alert.beginSheetModal(for: alertWindow, completionHandler: { response in if (response == .alertFirstButtonReturn) { diff --git a/macos/Sources/Features/Terminal/TerminalWindow.swift b/macos/Sources/Features/Terminal/TerminalWindow.swift index 3209449e4..7a343d89f 100644 --- a/macos/Sources/Features/Terminal/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/TerminalWindow.swift @@ -390,7 +390,7 @@ class TerminalWindow: NSWindow { button.action = #selector(TerminalController.splitZoom(_:)) button.isBordered = false button.allowsExpansionToolTips = true - button.toolTip = "Reset Zoom" + button.toolTip = String(localized: "Reset Zoom") button.contentTintColor = .controlAccentColor button.state = .on button.image = NSImage(named:"ResetZoom") diff --git a/macos/Sources/Ghostty/Ghostty.App.swift b/macos/Sources/Ghostty/Ghostty.App.swift index 88f8d1dc9..c7108089d 100644 --- a/macos/Sources/Ghostty/Ghostty.App.swift +++ b/macos/Sources/Ghostty/Ghostty.App.swift @@ -614,9 +614,9 @@ extension Ghostty { guard let appState = self.appState(fromView: surfaceView) else { return } guard appState.config.windowDecorations else { let alert = NSAlert() - alert.messageText = "Tabs are disabled" - alert.informativeText = "Enable window decorations to use tabs" - alert.addButton(withTitle: "OK") + alert.messageText = String(localized: "Tabs are disabled") + alert.informativeText = String(localized: "Enable window decorations to use tabs") + alert.addButton(withTitle: String(localized: "OK")) alert.alertStyle = .warning _ = alert.runModal() return diff --git a/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift b/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift index 127c925e1..de4bfe05d 100644 --- a/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift +++ b/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift @@ -189,11 +189,13 @@ extension Ghostty { // so SwiftUI does not update any of the bindings to note that window is no longer // being shown, and provides no callback to detect this. let alert = NSAlert() - alert.messageText = "Close Terminal?" - alert.informativeText = "The terminal still has a running process. If you close the " + - "terminal the process will be killed." - alert.addButton(withTitle: "Close the Terminal") - alert.addButton(withTitle: "Cancel") + alert.messageText = String(localized: "Close Terminal?") + alert.informativeText = String(localized: """ + The terminal still has a running process. If you close the \ + terminal the process will be killed. + """) + alert.addButton(withTitle: String(localized: "Close the Terminal")) + alert.addButton(withTitle: String(localized: "Cancel")) alert.alertStyle = .warning alert.beginSheetModal(for: window, completionHandler: { response in switch (response) { diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index e4c9072f3..68e41099a 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -389,8 +389,8 @@ extension Ghostty { func promptTitle() { // Create an alert dialog let alert = NSAlert() - alert.messageText = "Change Terminal Title" - alert.informativeText = "Leave blank to restore the default." + alert.messageText = String(localized: "Change Terminal Title") + alert.informativeText = String(localized: "Leave blank to restore the default.") alert.alertStyle = .informational // Add a text field to the alert @@ -399,8 +399,8 @@ extension Ghostty { alert.accessoryView = textField // Add buttons - alert.addButton(withTitle: "OK") - alert.addButton(withTitle: "Cancel") + alert.addButton(withTitle: String(localized: "OK")) + alert.addButton(withTitle: String(localized: "Cancel")) let response = alert.runModal() @@ -1155,21 +1155,21 @@ extension Ghostty { // If we have a selection, add copy if self.selectedRange().length > 0 { - menu.addItem(withTitle: "Copy", action: #selector(copy(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Copy"), action: #selector(copy(_:)), keyEquivalent: "") } - menu.addItem(withTitle: "Paste", action: #selector(paste(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Paste"), action: #selector(paste(_:)), keyEquivalent: "") menu.addItem(.separator()) - menu.addItem(withTitle: "Split Right", action: #selector(splitRight(_:)), keyEquivalent: "") - menu.addItem(withTitle: "Split Left", action: #selector(splitLeft(_:)), keyEquivalent: "") - menu.addItem(withTitle: "Split Down", action: #selector(splitDown(_:)), keyEquivalent: "") - menu.addItem(withTitle: "Split Up", action: #selector(splitUp(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Split Right"), action: #selector(splitRight(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Split Left"), action: #selector(splitLeft(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Split Down"), action: #selector(splitDown(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Split Up"), action: #selector(splitUp(_:)), keyEquivalent: "") menu.addItem(.separator()) - menu.addItem(withTitle: "Reset Terminal", action: #selector(resetTerminal(_:)), keyEquivalent: "") - menu.addItem(withTitle: "Toggle Terminal Inspector", action: #selector(toggleTerminalInspector(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Reset Terminal"), action: #selector(resetTerminal(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Toggle Terminal Inspector"), action: #selector(toggleTerminalInspector(_:)), keyEquivalent: "") menu.addItem(.separator()) - menu.addItem(withTitle: "Change Title...", action: #selector(changeTitle(_:)), keyEquivalent: "") + menu.addItem(withTitle: String(localized: "Change Title..."), action: #selector(changeTitle(_:)), keyEquivalent: "") return menu }