diff --git a/crates/tty7-core/src/core/config.rs b/crates/tty7-core/src/core/config.rs index e94438c5..f54b6543 100644 --- a/crates/tty7-core/src/core/config.rs +++ b/crates/tty7-core/src/core/config.rs @@ -4,6 +4,8 @@ use std::sync::{Arc, OnceLock}; use serde::{Deserialize, Serialize}; +pub const SUPPORTED_GUI_LANGUAGES: &[&str] = &["en", "zh-CN", "ja-JP"]; + #[derive(Default, Clone, Eq, PartialEq, Hash)] pub struct FontFeatures(pub Arc>); @@ -519,9 +521,8 @@ impl Config { .take() .map(|proxy| proxy.trim().to_string()) .filter(|proxy| !proxy.is_empty()); - match self.gui_language.as_str() { - "en" | "zh-CN" => {} - _ => self.gui_language = default_gui_language(), + if !SUPPORTED_GUI_LANGUAGES.contains(&self.gui_language.as_str()) { + self.gui_language = default_gui_language(); } } @@ -1138,6 +1139,9 @@ mod tests { let cfg: Config = serde_json::from_str(r#"{"gui_language": "zh-CN"}"#).unwrap(); assert_eq!(cfg.gui_language, "zh-CN"); + let cfg: Config = serde_json::from_str(r#"{"gui_language": "ja-JP"}"#).unwrap(); + assert_eq!(cfg.gui_language, "ja-JP"); + let mut cfg: Config = serde_json::from_str(r#"{"gui_language": "ko"}"#).unwrap(); cfg.sanitize(); assert_eq!(cfg.gui_language, "en"); diff --git a/docs/features.md b/docs/features.md index e8ea8231..d8672561 100644 --- a/docs/features.md +++ b/docs/features.md @@ -143,13 +143,14 @@ whatever you ran in the pane, and you can revoke it under Privacy & Security. ## Localization -The GUI ships English and Simplified Chinese strings. Pick one in Settings → -Appearance → Language, or in `config.json`: +The GUI ships English, Simplified Chinese and Japanese strings. Pick one in +Settings → Appearance → Language, or in `config.json`: ```json { "gui_language": "zh-CN" } ``` -`en` and `zh-CN` are the only accepted values; anything else falls back to `en`. +`en`, `zh-CN` and `ja-JP` are the only accepted values; anything else falls back +to `en`. The choice is explicit — the system language is never inferred. CLI output stays English so agent and script integrations keep a stable, predictable surface. diff --git a/docs/features.zh-CN.md b/docs/features.zh-CN.md index 99cc7af4..982524a0 100644 --- a/docs/features.zh-CN.md +++ b/docs/features.zh-CN.md @@ -137,12 +137,12 @@ Apple Events、系统管理),这样程序才能正常弹出一次性授权 ## 本地化 -GUI 目前提供英文和简体中文两套文案。在「设置 → 外观 → 语言」中选择,或直接改 +GUI 目前提供英文、简体中文和日文三套文案。在「设置 → 外观 → 语言」中选择,或直接改 `config.json`: ```json { "gui_language": "zh-CN" } ``` -只接受 `en` 和 `zh-CN` 两个值,其它值一律回落到 `en`。语言必须显式指定,不会 +只接受 `en`、`zh-CN` 和 `ja-JP` 三个值,其它值一律回落到 `en`。语言必须显式指定,不会 去猜系统语言。CLI 输出保持英文,保证 agent、脚本和开发者工作流的输出稳定可预测。 diff --git a/src/ui/app.rs b/src/ui/app.rs index e79f0ce3..3bc5e3b7 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -3702,17 +3702,19 @@ impl Tty7App { window: &mut Window, cx: &mut Context, ) -> Entity>> { - const CODES: &[&str] = &["en", "zh-CN"]; let labels = || { - vec![ - t(L10nKey::SettingsLanguageEnglish).to_string(), - t(L10nKey::SettingsLanguageChinese).to_string(), - ] + crate::ui::i18n::SUPPORTED_LANGUAGES + .iter() + .map(|lang| t(lang.label_key).to_string()) + .collect::>() }; let cfg = cx.global::(); let current = Self::normalize_gui_language(&cfg.gui_language); let rows = labels(); - let selected = CODES.iter().position(|c| *c == current).unwrap_or(0); + let selected = crate::ui::i18n::SUPPORTED_LANGUAGES + .iter() + .position(|lang| lang.code == current) + .unwrap_or(0); let language_select = cx.new(|cx| { SelectState::new( SearchableVec::new(rows), @@ -3728,7 +3730,9 @@ impl Tty7App { if let SelectEvent::Confirm(Some(label)) = ev { let rows = labels(); if let Some(idx) = rows.iter().position(|r| r == label) { - this.set_gui_language(CODES[idx], window, cx); + if let Some(lang) = crate::ui::i18n::SUPPORTED_LANGUAGES.get(idx) { + this.set_gui_language(lang.code, window, cx); + } } } }, @@ -3737,10 +3741,9 @@ impl Tty7App { } fn normalize_gui_language(code: &str) -> &'static str { - match code { - "zh-CN" => "zh-CN", - _ => "en", - } + crate::ui::i18n::find_language(code) + .map(|lang| lang.code) + .unwrap_or_else(crate::ui::i18n::default_language_code) } pub(crate) fn set_gui_language( @@ -3762,7 +3765,6 @@ impl Tty7App { } pub(crate) fn refresh_locale_state(&mut self, window: &mut Window, cx: &mut Context) { - const CODES: &[&str] = &["en", "zh-CN"]; self.sidebar_search.update(cx, |state, cx| { state.set_placeholder(t(L10nKey::SearchTabs), window, cx) }); @@ -3770,14 +3772,17 @@ impl Tty7App { state.set_placeholder(t(L10nKey::SearchFiles), window, cx) }); if let Some(s) = self.active_settings() { - let rows = vec![ - t(L10nKey::SettingsLanguageEnglish).to_string(), - t(L10nKey::SettingsLanguageChinese).to_string(), - ]; + let rows = crate::ui::i18n::SUPPORTED_LANGUAGES + .iter() + .map(|lang| t(lang.label_key).to_string()) + .collect::>(); s.language_select.update(cx, |state, cx| { state.set_items(SearchableVec::new(rows), window, cx); let code = Self::normalize_gui_language(&cx.global::().gui_language); - let selected = CODES.iter().position(|c| *c == code).unwrap_or(0); + let selected = crate::ui::i18n::SUPPORTED_LANGUAGES + .iter() + .position(|lang| lang.code == code) + .unwrap_or(0); state.set_selected_index(Some(IndexPath::default().row(selected)), window, cx); }); s.search.update(cx, |state, cx| { diff --git a/src/ui/i18n.rs b/src/ui/i18n.rs deleted file mode 100644 index 87ce8f13..00000000 --- a/src/ui/i18n.rs +++ /dev/null @@ -1,3909 +0,0 @@ -use std::sync::atomic::{AtomicU8, Ordering}; - -const EN: u8 = 0; -const ZH_HANS: u8 = 1; - -static CURRENT: AtomicU8 = AtomicU8::new(EN); - -// Tests run in parallel and every one of them reads the same process-wide -// locale, so a test that switches to Chinese would flip the language out from -// under another thread's English assertions. libtest gives each test its own -// thread, so an override that lives in thread-local storage keeps them apart. -#[cfg(test)] -thread_local! { - static TEST_LOCALE: std::cell::Cell> = const { std::cell::Cell::new(None) }; -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum L10nKey { - SearchTabs, - SearchFiles, - SearchThemes, - SearchSettings, - FilterHosts, - SearchCommandsOrHost, - SearchTheme, - Search, - SearchWorkspacesAndMachines, - SearchFonts, - NewFolderName, - NewFileName, - HomeNewTab, - HomeReopenClosedTab, - HomeSwitchWorkspace, - HomeCommandPalette, - HomeSplitRight, - HomeSplitDown, - HomeSettings, - TrayQuitStopServer, - Reconnect, - None, - TryAgain, - Refreshing, - Binary, - Delete, - NoMatchingCommands, - ConnectSshHint, - EditHint, - OpenFileFromTree, - FileChangedOnDisk, - Reload, - KeepMine, - Dismiss, - StoredPasswordRejected, - Trust, - Abort, - HostKeyOverrideMessage, - Override, - RememberKeychain, - CloseWindowTitle, - CloseWindowBody, - Cancel, - Close, - QuitStopServerTitle, - QuitStopServerBody, - QuitAndStop, - CloseSshConnectionTitle, - CloseSshConnectionBody, - Keep, - SettingsNavAppearance, - SettingsNavTerminal, - SettingsNavInput, - SettingsNavSsh, - SettingsNavAgents, - SettingsNavWindowTabs, - SettingsNavKeybindings, - SettingsNavAbout, - SettingsHeader, - Reset, - Save, - Connect, - Download, - Link, - SettingsThemeIntroTitle, - SettingsThemeIntroDesc, - SettingsTypography, - SettingsFontSize, - SettingsFontSizeDesc, - SettingsLineHeight, - SettingsLineHeightDesc, - SettingsFontFamily, - SettingsFontFamilyDesc, - SettingsBoldFont, - SettingsBoldFontDesc, - SettingsItalicFont, - SettingsItalicFontDesc, - SettingsFontLigatures, - SettingsFontLigaturesDesc, - SettingsCursor, - SettingsCursorShape, - SettingsCursorShapeDesc, - SettingsCursorBlink, - SettingsCursorBlinkDesc, - SettingsLanguage, - SettingsLanguageDesc, - SettingsLanguageEnglish, - SettingsLanguageChinese, - SettingsSearchLanguageKeywords, - SettingsTransparency, - SettingsOpacity, - SettingsOpacityDesc, - SettingsBlur, - SettingsBlurDesc, - FollowTheme, - SettingsDimInactivePanes, - SettingsDimInactivePanesDesc, - SettingsOpenThemesFolder, - SettingsChangeThemeImage, - SettingsChooseThemeImage, - SettingsRemoveThemeImage, - SettingsImageOpacity, - SettingsImageOpacityDesc, - SettingsEditTheme, - SettingsEditThemeIntro, - SettingsBackgroundImage, - SettingsBackgroundImageDesc, - SettingsAnsiColors, - SettingsCustomThemes, - SettingsCustomThemesIntro, - SettingsDuplicateToEdit, - SettingsHosts, - SettingsDefaults, - SettingsInheritedByEveryHost, - SettingsNoSavedHosts, - SettingsNothingMatches, - SettingsInTty7, - SettingsImportFromSshConfig, - SettingsExpandAllGroups, - SettingsNoHostsYet, - SettingsNothingSelected, - SettingsTypeAddressToConnect, - SettingsMoreInSshConfig, - SettingsAliasesLinked, - SettingsImportAliases, - SettingsImportAliasesDesc, - SettingsImportNow, - SettingsDefaultsIntro, - SettingsCopyAddress, - SettingsDuplicate, - SettingsForgetPassword, - SettingsForgotPasswordFor, - SettingsCouldntForgetPassword, - SettingsSecurity, - SettingsSecurityIntro, - SettingsVerifyHostKeys, - SettingsVerifyHostKeysDesc, - WarnBeforeClosing, - SettingsWarnBeforeClosingDesc, - SettingsNewHost, - SettingsName, - SettingsNameDesc, - SettingsHost, - SettingsHostDesc, - SettingsUser, - SettingsUserDesc, - SettingsAuth, - SettingsAuthDesc, - SettingsAuthModeAuto, - SettingsAuthModePassword, - SettingsAuthModeKey, - SettingsAuthModeAgent, - SettingsAuthMode2Fa, - SettingsJumpHost, - SettingsJumpHostDesc, - SettingsNoneSummary, - SettingsNoneLower, - SettingsPortForwarding, - SettingsRulesOpenedWithConnection, - SettingsAddRule, - SettingsFwdLegendLocal, - SettingsFwdLegendRemote, - SettingsFwdLegendDynamic, - SettingsFwdNeedsBoth, - SettingsFwdNeedsListen, - SettingsAdvanced, - SettingsAdvancedSummary, - SettingsIdentityFiles, - SettingsIdentityFilesDesc, - SettingsAgentForwarding, - SettingsAgentForwardingDesc, - SettingsProxyCommand, - SettingsProxyCommandDesc, - SettingsSocks5Proxy, - SettingsSocks5ProxyDesc, - SettingsHttpProxy, - SettingsHttpProxyDesc, - SettingsKexAlgorithms, - SettingsKexAlgorithmsDesc, - SettingsCiphers, - SettingsCiphersDesc, - SettingsMacs, - SettingsMacsDesc, - SettingsHostKeyAlgorithms, - SettingsHostKeyAlgorithmsDesc, - SettingsCompression, - SettingsJumpHostVia, - SettingsConnected, - SettingsProfileCopied, - SettingsCompressionDesc, - SettingsKeepaliveInterval, - SettingsKeepaliveIntervalDesc, - SettingsKeepaliveCountMax, - SettingsKeepaliveCountMaxDesc, - SettingsConnectTimeout, - SettingsConnectTimeoutDesc, - SettingsX11Forwarding, - SettingsX11ForwardingDesc, - SettingsShellIntegration, - SettingsShellIntegrationDesc, - SettingsLoginScripts, - SettingsLoginScriptsDesc, - SettingsSkipBanner, - SettingsSkipBannerDesc, - SettingsDefaultFollowsDefaults, - SettingsValueOn, - SettingsValueOff, - SettingsDefault, - SettingsOn, - SettingsOff, - SettingsShell, - SettingsShellIntro, - SettingsProgram, - SettingsProgramDesc, - SettingsArguments, - SettingsArgumentsDesc, - SettingsStartIn, - SettingsStartInDesc, - SettingsCustomPath, - SettingsCustomPathDesc, - SettingsWdInherit, - SettingsWdHome, - SettingsWdCustom, - SettingsShellFooter, - SettingsScrolling, - SettingsScrollback, - SettingsScrollbackDesc, - SettingsScrollSpeed, - SettingsScrollSpeedDesc, - SettingsMouse, - SettingsFocusFollowsMouse, - SettingsFocusFollowsMouseDesc, - SettingsHideMouseWhileTyping, - SettingsHideMouseWhileTypingDesc, - SettingsReportMouseToApps, - SettingsReportMouseToAppsDesc, - SettingsBell, - SettingsTerminalBell, - SettingsTerminalBellDesc, - SettingsLinks, - DetectUrls, - SettingsDetectUrlsDesc, - ForwardSshLoopbackLinks, - SettingsForwardSshLoopbackLinksDesc, - OpenFilesWith, - SettingsOpenFilesWithDesc, - SettingsBellModeOff, - SettingsBellModeVisual, - SettingsBellModeAudible, - SettingsBellModeBoth, - SettingsPrompt, - SettingsPromptIntro, - SettingsTabCompletion, - SettingsTabCompletionDesc, - SettingsHistorySearch, - SettingsHistorySearchDesc, - SettingsSelectionClipboard, - SettingsSmartSelection, - SettingsSmartSelectionDesc, - SettingsCopyOnSelect, - SettingsCopyOnSelectDesc, - SettingsTrimTrailingSpaces, - SettingsTrimTrailingSpacesDesc, - SettingsKeyboard, - SettingsOptionAsMeta, - SettingsOptionAsMetaDesc, - SettingsAgentsIntro, - SettingsAgentsIntroDesc, - SettingsReadingAgentConfig, - SettingsStatusNotInstalled, - SettingsStatusInstalled, - SettingsStatusOutdated, - SettingsInstall, - SettingsReinstall, - SettingsUpdate, - SettingsUninstall, - SettingsOfflineMachines, - SettingsSyncWithSystem, - SettingsSyncWithSystemDesc, - SettingsChangeTheme, - SettingsThemes, - SettingsThemePanelManual, - SettingsThemePanelLight, - SettingsThemePanelDark, - SettingsCustom, - SettingsBuiltIn, - SettingsDark, - SettingsLight, - SettingsLightMode, - SettingsDarkMode, - SettingsActive, - SettingsStartupWindow, - SettingsStartupWindowDesc, - SettingsRememberWindowSize, - SettingsRememberWindowSizeDesc, - SettingsRestoreLastLayout, - SettingsRestoreLastLayoutDesc, - SettingsConfirmLastWindowClose, - SettingsConfirmLastWindowCloseDesc, - SettingsShowTrayIcon, - SettingsShowTrayIconDesc, - SettingsTabs, - SettingsNewTabPosition, - SettingsNewTabPositionDesc, - SettingsTabBarPosition, - SettingsTabBarPositionDesc, - SettingsSidebarGrouping, - SettingsSidebarGroupingDesc, - SettingsDiffPreviewFromCounts, - SettingsDiffPreviewFromCountsDesc, - SettingsNotifications, - SettingsWindow, - SettingsNotifyOnCommandFinish, - SettingsNotifyOnCommandFinishDesc, - SettingsNotifyThreshold, - SettingsNotifyThresholdDesc, - NotifyModeNever, - NotifyModeUnfocused, - NotifyModeAlways, - SettingsStartupNormal, - SettingsStartupMaximized, - SettingsStartupFullscreen, - SettingsAfterCurrent, - SettingsAtEnd, - SettingsTop, - SettingsLeft, - SettingsByRepo, - SettingsFlat, - SettingsPreset, - SettingsPresetDesc, - SettingsPrefix, - SettingsPressKeys, - SettingsPauseToSaveEsc, - SettingsKeybindingsIntroDesc, - SettingsPrefixNote, - SettingsRestoreAllDefaults, - SettingsAboutDesc1, - SettingsAboutTech, - SettingsVersion, - SettingsUpdates, - SettingsUpdateAndRelaunch, - SettingsUpdateViewRelease, - SettingsUpdateChecking, - SettingsUpdateUpToDate, - SettingsUpdateDownloading, - SettingsUpdateInstalling, - SettingsUpdateCheckNow, - SettingsUpdateCheckFailed, - SettingsUpdatePrepareFailed, - SettingsUpdateLaunchFailed, - SettingsUpdateUnsupportedMacos, - SettingsUpdateUnsupportedLinux, - SettingsUpdateUnsupportedWindows, - SettingsUpdateWindowsAllUsers, - SettingsUpdateUnsupportedPlatform, - SettingsUpdateMissingPackage, - SettingsUpdateMissingChecksums, - SettingsVersionAvailable, - SettingsCheckUpdatesDesc, - SettingsCheckUpdatesOnLaunch, - SettingsCommandLine, - SettingsCommandLineDesc, - SettingsInstallCliOnPath, - SettingsServer, - SettingsServerDesc, - SettingsRestartServer, - SettingsAppHttpProxy, - SettingsAppHttpProxyDesc, - SettingsAppHttpProxyInvalid, - SettingsAgentClaudeCode, - SettingsAgentCodex, - SettingsAgentCopilotCli, - SettingsAgentOpencode, - SettingsAgentPi, - SettingsAgentGrokBuild, - SettingsSearchAppHttpProxyKeywords, - SettingsSearchAboutKeywords, - SettingsSearchAnsiColorsKeywords, - SettingsSearchArgumentsKeywords, - SettingsSearchBlurKeywords, - SettingsSearchBoldFontKeywords, - SettingsSearchClaudeCodeKeywords, - SettingsSearchCodexKeywords, - SettingsSearchCommandLineToolKeywords, - SettingsSearchCommandLineToolTitle, - SettingsSearchConfirmLastWindowCloseKeywords, - SettingsSearchCopilotCliKeywords, - SettingsSearchCopyOnSelectKeywords, - SettingsSearchCursorBlinkKeywords, - SettingsSearchCursorShapeKeywords, - SettingsSearchCustomThemesKeywords, - SettingsSearchDetectUrlsKeywords, - SettingsSearchDiffPreviewFromCountsKeywords, - SettingsSearchDimInactivePanesKeywords, - SettingsSearchFocusFollowsMouseKeywords, - SettingsSearchFontFamilyKeywords, - SettingsSearchFontLigaturesKeywords, - SettingsSearchFontSizeKeywords, - SettingsSearchForwardSshLoopbackLinksKeywords, - SettingsSearchGrokBuildKeywords, - SettingsSearchHideMouseWhileTypingKeywords, - SettingsSearchHistorySearchKeywords, - SettingsSearchHostsKeywords, - SettingsSearchHowShellsWorkKeywords, - SettingsSearchHowShellsWorkTitle, - SettingsSearchItalicFontKeywords, - SettingsSearchKeybindingsKeywords, - SettingsSearchKeybindingsTitle, - SettingsSearchLineHeightKeywords, - SettingsSearchNewTabPositionKeywords, - SettingsSearchNotifyOnCommandFinishKeywords, - SettingsSearchNotifyThresholdKeywords, - SettingsSearchOpacityKeywords, - SettingsSearchOpenFilesWithKeywords, - SettingsSearchOpencodeKeywords, - SettingsSearchOptionAsMetaKeywords, - SettingsSearchPiKeywords, - SettingsSearchPortForwardingKeywords, - SettingsSearchProgramKeywords, - SettingsSearchRememberWindowSizeKeywords, - SettingsSearchReportMouseToAppsKeywords, - SettingsSearchRestoreLastLayoutKeywords, - SettingsSearchScrollSpeedKeywords, - SettingsSearchScrollbackKeywords, - SettingsSearchShowTrayIconKeywords, - SettingsSearchSidebarGroupingKeywords, - SettingsSearchSmartSelectionKeywords, - SettingsSearchStartInKeywords, - SettingsSearchSyncWithSystemKeywords, - SettingsSearchTabBarPositionKeywords, - SettingsSearchTabCompletionKeywords, - SettingsSearchTerminalBellKeywords, - SettingsSearchThemeKeywords, - SettingsSearchTrimTrailingSpacesKeywords, - SettingsSearchVerifyHostKeysKeywords, - SettingsSearchWarnBeforeClosingKeywords, - SettingsSearchStartupWindowKeywords, - SwitcherNoMatch, - AddSshHost, - ClickForNewWindow, - RestartServer, - OtherMachines, - Ok, - SftpNoTransfers, - SftpPanelTitleFiles, - SftpTooltipRefresh, - SftpTooltipMore, - SftpMenuNewFolder, - SftpMenuNewFile, - SftpMenuUpload, - SftpMenuGotoShellCwd, - SftpMenuHideTransferHistory, - SftpMenuTransferHistory, - SftpEditNewFolder, - SftpEditNewFile, - SftpEditRename, - SftpEditPermissions, - SftpLoading, - SftpEmptyDirectory, - SftpContextOpen, - SftpContextFollowSymlink, - SftpContextRename, - SftpContextChmod, - SftpTransferSummaryRunning, - SftpTransferSummaryFailed, - SftpTransferSummaryIdle, - SftpTransferProgress, - SftpTransferDone, - SftpTransferCancelled, - SftpTransferError, - SftpImagePasteUploadFailed, - ForwardPanelTitle, - ForwardDisconnected, - ForwardDisconnectedFrom, - ForwardTooltipAdd, - ForwardTooltipRemove, - ForwardLocal, - ForwardRemote, - ForwardDynamic, - ForwardBindLabel, - ForwardToLabel, - ForwardSocksLabel, - ForwardAdd, - FileTreePlaceholderFileName, - FileTreePlaceholderFolderName, - FileTreePlaceholderNewName, - FileTreeDeleteTitle, - FileTreeDeleteFolderBody, - FileTreeDeleteFileBody, - FileTreeDeleteFailed, - FileTreeContextOpen, - FileTreeContextCdHere, - FileTreeContextInsertPath, - FileTreeContextAttachAgent, - FileTreeContextNewFile, - FileTreeContextNewFolder, - FileTreeContextRename, - FileTreeContextCopyPath, - FileTreeContextHideDotfiles, - FileTreeContextShowDotfiles, - SshPromptNewKey, - SshPromptOldKey, - EditorCantOpen, - EditorCantRead, - EditorNotUtf8, - EditorSaveFailed, - EditorUnsavedChanges, - EditorDiscard, - EditorNoFileOpen, - EditorBackToTerminal, - EditorLnCol, - EditorEdit, - EditorPreview, - EditorWrapOn, - EditorWrapOff, - EditorFileTooLarge, - EditorBinaryFile, - PanelInfoTitle, - PanelChangesTitle, - PanelFilesTitle, - PanelNoSession, - PanelNoSessionHint, - PanelNoWorkingDirectory, - PanelNoWorkingDirectoryHint, - PanelLoading, - PanelNotAGitRepo, - PanelNotAGitRepoHint, - PanelNoChanges, - PanelNoChangesHint, - PanelMoreChangedFiles, - PanelUntracked, - PanelSessionSubtitle, - PanelProcessesSubtitle, - PanelPortsSubtitle, - PanelCwd, - PanelShell, - PanelSsh, - PanelBranch, - PanelChangesRow, - PanelAgent, - PanelAgentIdle, - PanelAgentWorking, - PanelAgentWaiting, - PanelAgentDone, - PanelRevealInFinder, - PanelOpenFolder, - WindowStop, - WindowDelete, - WindowThisWorkspace, - WindowConfirmTitle, - WindowStopUnreachable, - WindowDeleteUnreachable, - WindowStopShells, - WindowDeleteShells, - DiffReading, - DiffNotARepo, - DiffReadFailed, - DiffWorkingTreeClean, - DiffCloseTooltip, - DiffChangedFiles, - DiffUntrackedCount, - DiffMoreFiles, - DiffOversizedNotice, - DiffTruncatedPerFile, - DiffTruncatedBudget, - DiffUntrackedHeader, - DiffMoreUntracked, - DiffLines, - DiffChangedLines, - DiffBudgetAndCap, - DiffBudget, - DiffPerFileCap, - DiffUntrackedSummary, - PendingConnecting, - PendingUnreachable, - WorktreePromptNeedsName, - WorktreePromptTitle, - WorktreePromptName, - WorktreePromptBranch, - WorktreePromptBase, - WorktreePromptCreating, - WorktreePromptCreate, - AppNewWorktreeFailed, - HomeTimeJustNow, - HomeTimeMinutesAgo, - HomeTimeHourAgo, - HomeTimeHoursAgo, - HomeTimeYesterday, - HomeTimeDaysAgo, - HomeTimeOverWeekAgo, - HomeReopenNamed, - AppMenuAbout, - AppMenuCheckForUpdates, - AppMenuSettings, - AppMenuServices, - AppMenuHideApp, - AppMenuHideOthers, - AppMenuShowAll, - AppMenuQuit, - AppMenuFile, - AppMenuEdit, - AppMenuView, - AppMenuWindow, - AppMenuHelp, - AppMenuNewTab, - AppMenuNewWorkspace, - AppMenuNewWorktreeTab, - AppMenuSplitRight, - AppMenuSplitDown, - AppMenuRenameTab, - AppMenuCopyWorkingDirectory, - AppMenuCopySessionId, - AppMenuForkSession, - AppMenuClosePaneTab, - AppMenuCloseOtherTabs, - AppMenuCloseTabsRight, - AppMenuReopenClosedTab, - AppMenuRenameWorkspace, - AppMenuStopWorkspace, - AppMenuDeleteWorkspace, - AppMenuUndo, - AppMenuRedo, - AppMenuCut, - AppMenuCopy, - AppMenuPaste, - AppMenuSelectAll, - AppMenuFind, - AppMenuFindNext, - AppMenuFindPrevious, - AppMenuCommandPalette, - AppMenuIncreaseFontSize, - AppMenuDecreaseFontSize, - AppMenuResetFontSize, - AppMenuLeftSidebar, - AppMenuRightPanel, - AppMenuCodePanel, - AppMenuTabBarPosition, - AppMenuFocusNextPane, - AppMenuFocusPreviousPane, - AppMenuZoomPane, - AppMenuClearScrollback, - AppMenuEnterFullscreen, - AppMenuDocumentation, - AppMenuKeyboardShortcuts, - AppMenuJoinDiscord, - AppMenuReportIssue, - AppMenuRestartServer, - WindowUntitled, - TrayShowTty7, - TrayNotifications, - TrayAgentNeedsInput, - NotifyCommandFinished, - NotifyCommandFinishedWithCommand, - NotifyAgentFinished, - NotifyAgentWaiting, - NotifyTurnFinished, - TabTooltipMore, - TabTooltipShowSidebar, - TabTooltipHideSidebar, - TabTooltipHideDetailPanel, - TabTooltipShowDetailPanel, - TabUnnamedShell, - ShellDefault, - SidebarScratchGroup, - TabContextCloseTab, - TabContextCloseTabsBelow, - TabContextMarkUnread, - RemoteStripDisconnected, - RemoteStripConnecting, - RemoteStripReconnecting, - RemoteStripReconnectingAttempt, - RemoteStripPreempted, - RemoteStripFailed, - RemoteNoticePreempted, - RemoteNoticeDisconnected, - RemoteActionRetryNow, - RemoteActionTakeBack, - RemoteActionConnect, - RemoteActionRetry, - RemoteNoConnectionDetails, - RemoteThisComputer, - RemoteRestartTitle, - RemoteRestartBody, - RemoteReplaceBody, - RemoteRestartFailedTitle, - RemoteRestartFailedBody, - RemoteHostUnreachable, - RemoteInstallTitle, - RemoteInstallDetail, - RemoteInstallPathLabel, - RemoteInstallVersionLabel, - RemoteInstallSizeLabel, - RemoteInstallFromLabel, - RemoteInstallShaLabel, - RemoteInstallSilentUpgrades, - RemoteInstallBytes, - RemoteMismatchTitle, - RemoteMismatchDetail, - RemoteMismatchUnknownBuild, - RemoteMismatchUnknownBuildFromExe, - RemoteMismatchReplaceServer, - RemoteDaemonStartFailed, - RemoteDaemonUnreachable, - RemoteDaemonTooOld, - RemoteProfileMissing, - RemoteAliasMissing, - RemoteWslNoSsh, - RemoteLocalStdioNoSsh, - RemoteHostNotTty7, - RemoteWorkspaceListFailed, - RemoteServerRestartFailed, - RemoteNoRouteToHost, - RemoteMachineTreeUnexpectedReply, - RemoteMismatchVersionFromExe, - AppNoRunningCodingAgent, - SwitcherThisComputer, - SwitcherRestartingServer, - SwitcherDownloadingServerWithTotal, - SwitcherDownloadingServerNoTotal, - SwitcherCopyingServer, - SwitcherThisWindow, - SwitcherOpen, - SwitcherDisconnect, - SwitcherOpenInNewWindow, - SwitcherRename, - SshPromptPasswordFor, - SshPromptPassphraseFor, - SshPromptTwoFactor, - SshPromptUnknownHost, - SshPromptHostKeyChanged, - SshPromptHostKeyChangedBody, - SshPromptConnect, - SshPromptUnlock, - SshPromptSubmit, - HostOpsError, - CmdGroupTabsPanes, - CmdGroupWorkspaces, - CmdGroupView, - CmdGroupTerminal, - CmdGroupSsh, - CmdGroupAgents, - CmdGroupApplication, - CmdNewTab, - CmdNewWorktreeTab, - CmdNewWorktreeTabSubtitle, - CmdRenameTab, - CmdSplitRight, - CmdSplitDown, - CmdZoomPane, - CmdNextPane, - CmdPreviousPane, - CmdFocusPaneLeft, - CmdFocusPaneRight, - CmdFocusPaneUp, - CmdFocusPaneDown, - CmdResizePaneLeft, - CmdResizePaneRight, - CmdResizePaneUp, - CmdResizePaneDown, - CmdSwapPaneNext, - CmdSwapPanePrevious, - CmdNextTab, - CmdPreviousTab, - CmdCopyWorkingDirectory, - CmdCopySessionId, - CmdCopySessionIdSubtitle, - CmdForkSession, - CmdForkSessionSubtitle, - CmdMarkTabAsUnread, - CmdClosePaneTab, - CmdCloseOtherTabs, - CmdCloseTabsToTheRight, - CmdReopenClosedTab, - CmdNewWorkspace, - CmdSwitchWorkspace, - CmdRenameWorkspace, - CmdStopWorkspace, - CmdStopWorkspaceSubtitle, - CmdDeleteWorkspace, - CmdDeleteWorkspaceSubtitle, - CmdShowLeftSidebar, - CmdHideLeftSidebar, - CmdHideRightPanel, - CmdShowRightPanel, - CmdShowCodePanel, - CmdTabBarMoveToTop, - CmdTabBarMoveToLeftSidebar, - CmdRightPanelInfo, - CmdRightPanelChanges, - CmdRightPanelFiles, - CmdChangeTheme, - CmdResetFontSize, - CmdEnterFullScreen, - CmdClearScrollback, - CmdFindInTerminal, - CmdFindNext, - CmdFindPrevious, - CmdCopy, - CmdCut, - CmdPaste, - CmdSelectAll, - CmdSshAddConnection, - CmdSshManageProfiles, - CmdSshReconnect, - CmdSshRemoteFiles, - CmdSshPortForwarding, - CmdSshConnectWithInput, - CmdAgentSendSelection, - CmdAgentSendSelectionSubtitle, - CmdAgentSendGitDiffForReview, - CmdAgentSendGitDiffSubtitle, - CmdSettings, - CmdKeyboardShortcuts, - CmdAboutTty7, - CmdCheckForUpdates, - CmdDocumentation, - CmdJoinDiscord, - CmdReportIssue, - CmdRestartServer, - CmdRestartServerSubtitle, - CmdQuitTty7, - CmdQuitTty7Subtitle, - CmdQuickConnect, - CmdQuickConnectSaveProfile, - CmdRecent, - AppRestartServerTitle, - AppRestartServerMismatchDetail, - AppRestartServerOldDetail, - AppKeepShells, - AppRestart, - AppRestartServerNotSsh, - AppRestartServerBody, - AppWorktreeRemoveDetailDirty, - AppWorktreeRemoveDetailClean, - AppWorktreeRemoveTitle, - AppWorktreeDiscardAndRemove, - AppWorktreeRemove, - AppWorktreeKeep, - AppReopenTabFailed, - AppOpenTerminalFailed, - AppSshConnectionFailed, - AppSshReconnectFailed, - AppSplitPaneFailed, - AppWorktreeRemoved, - AppWorktreeRemoveFailed, - AppForkStillConnecting, - AppPaneNoCodingAgent, - AppForkNoCommand, - AppForkLocalOnly, - AppForkNoSessionId, - AppForkSessionIdNotToken, - AppForkMidTurn, - AppTabNoWorkingDirectory, - AppNothingSelected, - AppPaneNoKnownDirectory, - AppNoUncommittedChanges, - AppCmdSshProfileTitle, - AppCmdSwitchToTab, - AppPlaceholderDescription, - AppPlaceholderSshQuickConnect, - AppPlaceholderLoginShell, - AppPlaceholderNone, - AppPlaceholderOpenInDefaultApp, - AppThemeColorBackground, - AppThemeColorForeground, - AppThemeColorAccent, - AppThemeColorCursor, - AppThemeColorSelection, - AppAgentHooksThisComputer, - AppAgentHooksRemoteMachine, - AppAgentHooksNoHomeDir, - AppAgentHooksOffline, - AppAgentHooksHomeDirUnresolved, - AppAgentHooksOpFailed, - AppKeybindingDisplacedNote, - AppLocalServerName, - AppSshParseUnbalancedQuotes, - AppSshParseNoRemoteCommands, - AppSshParseFlagNeedsValue, - AppSshParseInvalidPort, - AppSshParseUnsupportedOption, - AppSshParseEnterHost, - AppSshParseBadHost, - AppMenuMinimize, - AppMenuZoom, - SwitcherStatusRestarting, - SwitcherStatusInstalling, - SwitcherStatusConnecting, - SwitcherStatusConnectFailed, - SwitcherStatusNotConnected, - SettingsFontDefault, - ForwardDescriptionPlaceholder, - SettingsShellDefaultLoginShell, - SftpErrorUnexpectedReply, - SftpErrorUnsafeRemoteName, - SftpErrorInvalidOctalMode, -} - -pub fn set_locale(gui_language: &str) { - let locale = if gui_language == "zh-CN" { ZH_HANS } else { EN }; - #[cfg(test)] - TEST_LOCALE.with(|slot| slot.set(Some(locale))); - #[cfg(not(test))] - CURRENT.store(locale, Ordering::Relaxed); -} - -pub fn t(key: L10nKey) -> &'static str { - translate(current_locale(), key) -} - -pub fn t_fmt(key: L10nKey, args: &[(&str, &str)]) -> String { - apply_template(t(key), args, None) -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PluralCategory { - Zero, - One, - Other, -} - -impl PluralCategory { - pub fn from_count(n: usize) -> Self { - match n { - 0 => Self::Zero, - 1 => Self::One, - _ => Self::Other, - } - } - - pub fn as_str(self) -> &'static str { - match self { - Self::Zero => "zero", - Self::One => "one", - Self::Other => "other", - } - } -} - -/// Select a plural-aware translation and fill placeholders. -/// The template may use `{count}`; it is always substituted first. -pub fn t_plural(key: L10nKey, count: usize, args: &[(&str, &str)]) -> String { - let branch = PluralCategory::from_count(count).as_str(); - apply_template( - translate_variant(current_locale(), key, branch), - args, - Some(count), - ) -} - -/// Select a named branch of a translation and fill placeholders. -pub fn t_select(key: L10nKey, branch: &'static str, args: &[(&str, &str)]) -> String { - apply_template(translate_variant(current_locale(), key, branch), args, None) -} - -fn apply_template(template: &'static str, args: &[(&str, &str)], count: Option) -> String { - let mut text = template.to_string(); - if let Some(n) = count { - text = text.replace("{count}", &n.to_string()); - } - for (name, value) in args { - text = text.replace(&format!("{{{name}}}"), value); - } - text -} - -fn current_locale() -> Locale { - #[cfg(test)] - if let Some(locale) = TEST_LOCALE.with(|slot| slot.get()) { - return locale_of(locale); - } - locale_of(CURRENT.load(Ordering::Relaxed)) -} - -fn locale_of(raw: u8) -> Locale { - if raw == ZH_HANS { - Locale::ZhHans - } else { - Locale::En - } -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -enum Locale { - En, - ZhHans, -} - -fn translate(locale: Locale, key: L10nKey) -> &'static str { - let (en, zh) = match key { - L10nKey::SearchTabs => ("Search tabs…", "搜索标签页…"), - L10nKey::SearchFiles => ("Search files…", "搜索文件…"), - L10nKey::SearchThemes => ("Search themes…", "搜索主题…"), - L10nKey::SearchSettings => ("Search settings…", "搜索设置…"), - L10nKey::FilterHosts => ("Filter hosts…", "筛选主机…"), - L10nKey::SearchCommandsOrHost => ( - "Search or type user@host to connect…", - "搜索或输入 user@host 连接…", - ), - L10nKey::SearchTheme => ("Search…", "搜索…"), - L10nKey::Search => ("Search", "搜索"), - L10nKey::SearchWorkspacesAndMachines => { - ("Search workspaces and machines", "搜索工作区与机器") - } - L10nKey::SearchFonts => ("Search fonts…", "搜索字体…"), - L10nKey::NewFolderName => ("New folder name", "新文件夹名"), - L10nKey::NewFileName => ("New file name", "新文件名"), - L10nKey::HomeNewTab => ("New Tab", "新标签页"), - L10nKey::HomeReopenClosedTab => ("Reopen Closed Tab", "重新打开已关闭的标签页"), - L10nKey::HomeSwitchWorkspace => ("Switch Workspace", "切换工作区"), - L10nKey::HomeCommandPalette => ("Command Palette", "命令面板"), - L10nKey::HomeSplitRight => ("Split Right", "向右分屏"), - L10nKey::HomeSplitDown => ("Split Down", "向下分屏"), - L10nKey::HomeSettings => ("Settings…", "设置…"), - L10nKey::TrayQuitStopServer => ("Quit and Stop Server…", "退出并停止服务器…"), - L10nKey::Reconnect => ("Reconnect", "重新连接"), - L10nKey::None => ("None.", "无。"), - L10nKey::TryAgain => ("Try Again", "重试"), - L10nKey::Refreshing => ("refreshing…", "正在刷新…"), - L10nKey::Binary => ("binary", "二进制文件"), - L10nKey::Delete => ("Delete", "删除"), - L10nKey::NoMatchingCommands => ("No matching commands", "没有匹配的命令"), - L10nKey::ConnectSshHint => ( - "Type user@host to connect over SSH instead.", - "输入 user@host 改为通过 SSH 连接。", - ), - L10nKey::EditHint => ("→ edit", "→ 编辑"), - L10nKey::OpenFileFromTree => ("Open a file from the file tree", "从文件树打开文件"), - L10nKey::FileChangedOnDisk => ("File changed on disk", "文件在磁盘上已被修改"), - L10nKey::Reload => ("Reload", "重新加载"), - L10nKey::KeepMine => ("Keep mine", "保留我的版本"), - L10nKey::Dismiss => ("Dismiss", "关闭"), - L10nKey::StoredPasswordRejected => ( - "The stored password was rejected. Enter a new one.", - "已存储的密码被拒绝,请输入新密码。", - ), - L10nKey::Trust => ("Trust", "信任"), - L10nKey::Abort => ("Abort", "中止"), - L10nKey::HostKeyOverrideMessage => ( - "Type \"yes\" to override and trust the new key, or Esc to abort.", - "输入 yes 覆盖并信任新密钥,或按 Esc 中止。", - ), - L10nKey::Override => ("Override", "覆盖"), - L10nKey::RememberKeychain => ("Remember (keychain)", "记住(钥匙串)"), - L10nKey::CloseWindowTitle => ("Close Window?", "是否关闭窗口?"), - L10nKey::CloseWindowBody => ( - "Your sessions keep running in the background. This workspace will be \ - waiting on the home page, and in the workspace menu in the title bar, the \ - next time you open tty7.", - "你的会话会继续在后台运行。此工作区将保留,下次启动时可在主页和标题栏工作区菜单中找到。", - ), - L10nKey::Cancel => ("Cancel", "取消"), - L10nKey::Close => ("Close", "关闭"), - L10nKey::QuitStopServerTitle => ("Quit and Stop Server?", "退出并停止服务器?"), - L10nKey::QuitStopServerBody => ( - "This quits tty7 and stops the background server — anything still running \ - in your shells is terminated. Your tabs and layout are kept and reopen with \ - fresh shells next launch. (Plain Quit keeps shells running.)", - "这会退出 tty7 并停止后台服务器,所有仍在运行的 shell 都会被终止。你的标签页和布局会被保留,下次启动时以全新的 shell 重新打开。(普通退出会保持 shell 运行。)", - ), - L10nKey::QuitAndStop => ("Quit and Stop", "退出并停止"), - L10nKey::CloseSshConnectionTitle => ("Close this SSH connection?", "关闭这个 SSH 连接?"), - L10nKey::CloseSshConnectionBody => ( - "The connection is live. Closing will end it.", - "连接仍处于活动状态,关闭会断开它。", - ), - L10nKey::Keep => ("Keep", "保留"), - L10nKey::SettingsNavAppearance => ("Appearance", "外观"), - L10nKey::SettingsNavTerminal => ("Terminal", "终端"), - L10nKey::SettingsNavInput => ("Input", "输入"), - L10nKey::SettingsNavSsh => ("SSH", "SSH"), - L10nKey::SettingsNavAgents => ("Agents", "Agents"), - L10nKey::SettingsNavWindowTabs => ("Window & Tabs", "窗口与标签页"), - L10nKey::SettingsNavKeybindings => ("Keybindings", "按键绑定"), - L10nKey::SettingsNavAbout => ("About", "关于"), - L10nKey::SettingsHeader => ("SETTINGS", "设置"), - L10nKey::Reset => ("Reset", "重置"), - L10nKey::Save => ("Save", "保存"), - L10nKey::Connect => ("Connect", "连接"), - L10nKey::Download => ("Download", "下载"), - L10nKey::Link => ("Link", "关联"), - L10nKey::SettingsThemeIntroTitle => ("Theme", "主题"), - L10nKey::SettingsThemeIntroDesc => ( - "Pick a color theme. Each one sets its own light or dark look.", - "选择配色主题。每个主题都有各自的浅色或深色外观。", - ), - L10nKey::SettingsTypography => ("Typography", "字体排版"), - L10nKey::SettingsFontSize => ("Font size", "字号"), - L10nKey::SettingsFontSizeDesc => { - ("Terminal text size in pixels.", "终端文字大小(像素)。") - } - L10nKey::SettingsLineHeight => ("Line height", "行高"), - L10nKey::SettingsLineHeightDesc => ( - "Row spacing as a multiple of the font size.", - "行间距为字号的倍数。", - ), - L10nKey::SettingsFontFamily => ("Font family", "字体族"), - L10nKey::SettingsFontFamilyDesc => ( - "Pick from fonts installed on your system.", - "从系统已安装的字体中选择。", - ), - L10nKey::SettingsBoldFont => ("Bold font", "粗体字体"), - L10nKey::SettingsBoldFontDesc => ( - "Face for bold text; Default synthesizes it from the primary.", - "粗体文字使用的字体;默认由主字体合成。", - ), - L10nKey::SettingsItalicFont => ("Italic font", "斜体字体"), - L10nKey::SettingsItalicFontDesc => ( - "Face for italic text; Default synthesizes it from the primary.", - "斜体文字使用的字体;默认由主字体合成。", - ), - L10nKey::SettingsFontLigatures => ("Font ligatures", "字体连字"), - L10nKey::SettingsFontLigaturesDesc => ( - "Enable common programming ligature features for terminal text.", - "为终端文字启用常见的编程连字特性。", - ), - L10nKey::SettingsCursor => ("Cursor", "光标"), - L10nKey::SettingsCursorShape => ("Cursor shape", "光标形状"), - L10nKey::SettingsCursorShapeDesc => { - ("How the terminal cursor is drawn.", "终端光标的绘制方式。") - } - L10nKey::SettingsCursorBlink => ("Cursor blink", "光标闪烁"), - L10nKey::SettingsCursorBlinkDesc => ( - "Pulse the cursor while the terminal is focused.", - "终端获得焦点时让光标闪烁。", - ), - L10nKey::SettingsLanguage => ("Language", "语言"), - L10nKey::SettingsLanguageDesc => ( - "Choose the language used for the tty7 interface.", - "选择 tty7 界面使用的语言。", - ), - L10nKey::SettingsLanguageEnglish => ("English", "English"), - L10nKey::SettingsLanguageChinese => ("简体中文", "简体中文"), - L10nKey::SettingsSearchLanguageKeywords => ( - "language, locale, english, chinese", - "语言 区域设置 英文 中文 language locale english chinese", - ), - L10nKey::SettingsTransparency => ("Transparency", "透明度"), - L10nKey::SettingsOpacity => ("Opacity", "不透明度"), - L10nKey::SettingsOpacityDesc => ( - "How opaque the window background is, for every theme. Below 100% the desktop shows through.", - "窗口背景的不透明度,适用于所有主题。低于 100% 时可以看到桌面。", - ), - L10nKey::SettingsBlur => ("Blur", "模糊"), - L10nKey::SettingsBlurDesc => ( - "Blur whatever is behind a translucent window (macOS).", - "模糊半透明窗口背后的内容(macOS)。", - ), - L10nKey::FollowTheme => ("Follow theme", "跟随主题"), - L10nKey::SettingsDimInactivePanes => ("Dim inactive panes", "调暗非活动窗格"), - L10nKey::SettingsDimInactivePanesDesc => ( - "Fade unfocused panes in a split so the active one stands out.", - "在分屏中淡化未聚焦的窗格,让活动窗格更突出。", - ), - L10nKey::SettingsOpenThemesFolder => ("Open themes folder", "打开主题文件夹"), - L10nKey::SettingsChangeThemeImage => ("Change…", "更改…"), - L10nKey::SettingsChooseThemeImage => ("Choose…", "选择…"), - L10nKey::SettingsRemoveThemeImage => ("Remove", "移除"), - L10nKey::SettingsImageOpacity => ("Image opacity", "图片不透明度"), - L10nKey::SettingsImageOpacityDesc => ( - "How strongly the image shows over the background color.", - "图片叠加在背景色上的显示强度。", - ), - L10nKey::SettingsEditTheme => ("Edit theme", "编辑主题"), - L10nKey::SettingsEditThemeIntro => ( - "You're editing a copy. Changes save to its file in the themes folder and apply live.", - "你正在编辑一份副本。更改会保存到主题文件夹中的对应文件并实时生效。", - ), - L10nKey::SettingsBackgroundImage => ("Background image", "背景图片"), - L10nKey::SettingsBackgroundImageDesc => ( - "Composited over the background color, under the text.", - "叠加在背景色之上、文字之下。", - ), - L10nKey::SettingsAnsiColors => ("ANSI colors", "ANSI 颜色"), - L10nKey::SettingsCustomThemes => ("Custom themes", "自定义主题"), - L10nKey::SettingsCustomThemesIntro => ( - "Duplicate a theme to edit its colors here, or drop your own in the themes folder: a tty7 YAML theme or an iTerm2 .itermcolors scheme.", - "复制一个主题后可在此编辑其颜色,或者把自定义主题放入主题文件夹:tty7 YAML 主题或 iTerm2 的 .itermcolors 方案。", - ), - L10nKey::SettingsDuplicateToEdit => ("Duplicate to edit", "复制以编辑"), - L10nKey::SettingsHosts => ("Hosts", "主机"), - L10nKey::SettingsDefaults => ("Defaults", "默认值"), - L10nKey::SettingsInheritedByEveryHost => ("Inherited by every host", "对所有主机生效"), - L10nKey::SettingsNoSavedHosts => ("No saved hosts yet.", "还没有保存的主机。"), - L10nKey::SettingsNothingMatches => { - ("Nothing matches {query}.", "没有匹配 {query} 的内容。") - } - L10nKey::SettingsInTty7 => ("In tty7", "在 tty7 中"), - L10nKey::SettingsImportFromSshConfig => { - ("Import from ~/.ssh/config", "从 ~/.ssh/config 导入") - } - L10nKey::SettingsExpandAllGroups => ("Expand all groups", "展开所有分组"), - L10nKey::SettingsNoHostsYet => ("No hosts yet", "还没有主机"), - L10nKey::SettingsNothingSelected => ("Nothing selected", "未选择任何内容"), - L10nKey::SettingsTypeAddressToConnect => ( - "Type an address to connect now — tty7 offers to save it afterwards.", - "输入地址即可立刻连接,之后 tty7 会提示保存。", - ), - L10nKey::SettingsMoreInSshConfig => ( - "{count} more in ~/.ssh/config", - "~/.ssh/config 中还有 {count} 个", - ), - L10nKey::SettingsAliasesLinked => ("{count} aliases linked.", "已关联 {count} 个别名。"), - L10nKey::SettingsImportAliases => ("Import aliases", "导入别名"), - L10nKey::SettingsImportAliasesDesc => ( - "Re-reads the file and adds anything new. Edits you make here are stored by tty7 — the file itself is never written.", - "重新读取文件并添加新内容。你在这里做的编辑由 tty7 保存——不会写入该文件本身。", - ), - L10nKey::SettingsImportNow => ("Import now", "立即导入"), - L10nKey::SettingsDefaultsIntro => ( - "Every host starts from these. Any host can override one under its own Advanced.", - "所有主机都从这些设置开始。每个主机都可以在自己的高级选项中覆盖某项。", - ), - L10nKey::SettingsCopyAddress => ("Copy address", "复制地址"), - L10nKey::SettingsDuplicate => ("Duplicate", "复制"), - L10nKey::SettingsForgetPassword => ("Forget password", "清除已保存的密码"), - L10nKey::SettingsForgotPasswordFor => ( - "Forgot saved password for {endpoint}", - "已清除 {endpoint} 的已保存密码", - ), - L10nKey::SettingsCouldntForgetPassword => ( - "Couldn't forget password for {endpoint}: {error}", - "无法清除 {endpoint} 的已保存密码:{error}", - ), - L10nKey::SettingsSecurity => ("Security", "安全"), - L10nKey::SettingsSecurityIntro => ( - "A host can override either of these under its own Advanced.", - "主机可以在自己的高级选项中覆盖这些设置。", - ), - L10nKey::SettingsVerifyHostKeys => ("Verify host keys", "校验主机密钥"), - L10nKey::SettingsVerifyHostKeysDesc => ( - "Check each server's key against known_hosts and confirm unknown or changed keys before connecting. Off connects without checking, so a spoofed server would go unnoticed.", - "在连接前对照 known_hosts 检查每台服务器的密钥,并确认未知或已更改的密钥。关闭后连接不做检查,被仿冒的服务器也不会被察觉。", - ), - L10nKey::WarnBeforeClosing => ("Warn before closing", "关闭前警告"), - L10nKey::SettingsWarnBeforeClosingDesc => ( - "Ask for confirmation before closing a tab or pane with a live SSH session.", - "在关闭带有活动 SSH 会话的标签页或窗格前请求确认。", - ), - L10nKey::SettingsNewHost => ("New host", "新主机"), - L10nKey::SettingsName => ("Name", "名称"), - L10nKey::SettingsNameDesc => ("A label for this connection.", "此连接的标签。"), - L10nKey::SettingsHost => ("Host", "主机"), - L10nKey::SettingsHostDesc => ("Hostname or IP address.", "主机名或 IP 地址。"), - L10nKey::SettingsUser => ("User", "用户"), - L10nKey::SettingsUserDesc => ( - "Login user (blank = resolve at connect).", - "登录用户(留空表示连接时解析)。", - ), - L10nKey::SettingsAuth => ("Auth", "认证"), - L10nKey::SettingsAuthDesc => ( - "Authentication method. Auto tries every applicable method.", - "认证方式。自动会依次尝试所有适用的方式。", - ), - L10nKey::SettingsAuthModeAuto => ("Auto", "自动"), - L10nKey::SettingsAuthModePassword => ("Password", "密码"), - L10nKey::SettingsAuthModeKey => ("Key", "密钥"), - L10nKey::SettingsAuthModeAgent => ("Agent", "ssh-agent"), - L10nKey::SettingsAuthMode2Fa => ("2FA", "2FA"), - L10nKey::SettingsJumpHost => ("Jump host", "跳板主机"), - L10nKey::SettingsJumpHostDesc => ( - "Name of another profile to tunnel through (blank = direct).", - "用于中转的另一个主机配置的名称(留空 = 直连)。", - ), - L10nKey::SettingsNoneSummary => ("(none)", "(无)"), - L10nKey::SettingsNoneLower => ("none", "无"), - L10nKey::SettingsPortForwarding => ("Port forwarding", "端口转发"), - L10nKey::SettingsRulesOpenedWithConnection => { - ("1 rule, opened with the connection", "1 条规则,随连接打开") - } - L10nKey::SettingsAddRule => ("+ Add rule", "+ 添加规则"), - L10nKey::SettingsFwdLegendLocal => ( - "L — a local port reaches the remote side", - "L — 本地端口可达远程侧", - ), - L10nKey::SettingsFwdLegendRemote => ( - "R — a remote port reaches this machine", - "R — 远程端口可达本机", - ), - L10nKey::SettingsFwdLegendDynamic => ("D — dynamic SOCKS proxy", "D — 动态 SOCKS 代理"), - L10nKey::SettingsFwdNeedsBoth => ( - "Needs a listen port and a target host:port — won't be saved.", - "需要监听端口和目标 host:port——不会被保存。", - ), - L10nKey::SettingsFwdNeedsListen => ( - "Needs a listen port — won't be saved.", - "需要监听端口——不会被保存。", - ), - L10nKey::SettingsAdvanced => ("Advanced", "高级"), - L10nKey::SettingsAdvancedSummary => ( - "algorithms / keepalive / proxies / X11 / login scripts", - "算法 / 保活 / 代理 / X11 / 登录脚本", - ), - L10nKey::SettingsIdentityFiles => ("Identity files", "身份文件"), - L10nKey::SettingsIdentityFilesDesc => ( - "Private-key paths, one per line (%h/%r expand).", - "私钥路径,每行一个(支持 %h/%r 展开)。", - ), - L10nKey::SettingsAgentForwarding => ("Agent forwarding", "ssh-agent 转发"), - L10nKey::SettingsAgentForwardingDesc => ( - "Forward the local ssh-agent to the connection.", - "将本机 ssh-agent 转发到该连接。", - ), - L10nKey::SettingsProxyCommand => ("ProxyCommand", "代理命令"), - L10nKey::SettingsProxyCommandDesc => ( - "Transport command (%h/%p/%r substituted).", - "传输命令(%h/%p/%r 会被替换)。", - ), - L10nKey::SettingsSocks5Proxy => ("SOCKS5 proxy", "SOCKS5 代理"), - L10nKey::SettingsSocks5ProxyDesc => { - ("host:port (blank = none).", "host:port(留空 = 无)。") - } - L10nKey::SettingsHttpProxy => ("HTTP proxy", "HTTP 代理"), - L10nKey::SettingsHttpProxyDesc => ("host:port (blank = none).", "host:port(留空 = 无)。"), - L10nKey::SettingsKexAlgorithms => ("KEX algorithms", "KEX 算法"), - L10nKey::SettingsKexAlgorithmsDesc => ( - "Comma-separated (blank = library default).", - "逗号分隔(留空 = 库默认值)。", - ), - L10nKey::SettingsCiphers => ("Ciphers", "加密算法"), - L10nKey::SettingsCiphersDesc => ( - "Comma-separated (blank = default).", - "逗号分隔(留空 = 默认值)。", - ), - L10nKey::SettingsMacs => ("MACs", "MAC 算法"), - L10nKey::SettingsMacsDesc => ( - "Comma-separated (blank = default).", - "逗号分隔(留空 = 默认值)。", - ), - L10nKey::SettingsHostKeyAlgorithms => ("Host-key algorithms", "主机密钥算法"), - L10nKey::SettingsHostKeyAlgorithmsDesc => ( - "Comma-separated (blank = default).", - "逗号分隔(留空 = 默认值)。", - ), - L10nKey::SettingsCompression => ("Compression", "压缩"), - L10nKey::SettingsJumpHostVia => ("via {jump_name}", "经由 {jump_name}"), - L10nKey::SettingsConnected => ("connected", "已连接"), - L10nKey::SettingsProfileCopied => ("{name} (copy)", "{name}(副本)"), - L10nKey::SettingsCompressionDesc => ( - "Comma-separated (blank = default).", - "逗号分隔(留空 = 默认值)。", - ), - L10nKey::SettingsKeepaliveInterval => ("Keepalive interval (s)", "保活间隔(秒)"), - L10nKey::SettingsKeepaliveIntervalDesc => ("Blank = library default.", "留空 = 库默认值。"), - L10nKey::SettingsKeepaliveCountMax => ("Keepalive count max", "最大保活次数"), - L10nKey::SettingsKeepaliveCountMaxDesc => ( - "Missed keepalives before dead.", - "判定断连前允许丢失的保活次数。", - ), - L10nKey::SettingsConnectTimeout => ("Connect timeout (s)", "连接超时(秒)"), - L10nKey::SettingsConnectTimeoutDesc => ("Blank = library default.", "留空 = 库默认值。"), - L10nKey::SettingsX11Forwarding => ("X11 forwarding", "X11 转发"), - L10nKey::SettingsX11ForwardingDesc => ( - "Request X11 forwarding (needs XQuartz on macOS).", - "请求 X11 转发(macOS 上需要 XQuartz)。", - ), - L10nKey::SettingsShellIntegration => ("Shell integration", "Shell 集成"), - L10nKey::SettingsShellIntegrationDesc => ( - "Let the remote shell report prompts, exit codes and directory.", - "让远程 shell 报告提示符、退出码和目录。", - ), - L10nKey::SettingsLoginScripts => ("Login scripts", "登录脚本"), - L10nKey::SettingsLoginScriptsDesc => ( - "Commands sent after the shell opens, one per line.", - "shell 打开后发送的命令,每行一个。", - ), - L10nKey::SettingsSkipBanner => ("Skip banner", "跳过横幅"), - L10nKey::SettingsSkipBannerDesc => { - ("Suppress the server login banner.", "抑制服务器登录横幅。") - } - L10nKey::SettingsDefaultFollowsDefaults => ( - "Default follows Defaults, which is {value}.", - "默认跟随默认设置,当前为 {value}。", - ), - L10nKey::SettingsValueOn => ("on", "开"), - L10nKey::SettingsValueOff => ("off", "关"), - L10nKey::SettingsDefault => ("Default", "默认"), - L10nKey::SettingsOn => ("On", "开"), - L10nKey::SettingsOff => ("Off", "关"), - L10nKey::SettingsShell => ("Shell", "Shell"), - L10nKey::SettingsShellIntro => ( - "The program each new terminal launches. Leave Program empty to use the platform default ({default}).", - "每个新终端启动的程序。将“程序”留空可使用平台默认值({default})。", - ), - L10nKey::SettingsProgram => ("Program", "程序"), - L10nKey::SettingsProgramDesc => ( - "Executable name on PATH or an absolute path. e.g. zsh, fish, pwsh.", - "PATH 中的可执行文件名或绝对路径,例如 zsh、fish、pwsh。", - ), - L10nKey::SettingsArguments => ("Arguments", "参数"), - L10nKey::SettingsArgumentsDesc => ( - "Space-separated launch flags. e.g. -l for a login shell.", - "以空格分隔的启动参数,例如登录 shell 用 -l。", - ), - L10nKey::SettingsStartIn => ("Start in", "起始目录"), - L10nKey::SettingsStartInDesc => ( - "What a fresh shell starts in: tty7's launch directory, your home folder, or a fixed path.", - "新 shell 的启动目录:tty7 的启动目录、主目录或固定路径。", - ), - L10nKey::SettingsCustomPath => ("Custom path", "自定义路径"), - L10nKey::SettingsCustomPathDesc => ( - "The directory new shells start in.", - "新 shell 启动的目录。", - ), - L10nKey::SettingsWdInherit => ("Inherit", "继承"), - L10nKey::SettingsWdHome => ("Home", "主目录"), - L10nKey::SettingsWdCustom => ("Custom", "自定义"), - L10nKey::SettingsShellFooter => ( - "Applies to shells with nothing to inherit — like the first tab of a window. New tabs and splits keep inheriting the active pane's directory, and shells already open keep running.", - "仅适用于没有可继承目录的 shell,例如窗口的第一个标签页。新标签页和分屏仍会继承活动窗格的目录,已经打开的 shell 会继续运行。", - ), - L10nKey::SettingsScrolling => ("Scrolling", "滚动"), - L10nKey::SettingsScrollback => ("Scrollback", "Scrollback"), - L10nKey::SettingsScrollbackDesc => ( - "Lines of history kept per pane. Applies to new panes.", - "每个窗格保留的历史行数。仅适用于新窗格。", - ), - L10nKey::SettingsScrollSpeed => ("Scroll speed", "滚动速度"), - L10nKey::SettingsScrollSpeedDesc => ( - "Multiplier applied to mouse-wheel scrolling.", - "应用于鼠标滚轮滚动的倍率。", - ), - L10nKey::SettingsMouse => ("Mouse", "鼠标"), - L10nKey::SettingsFocusFollowsMouse => ("Focus follows mouse", "焦点跟随鼠标"), - L10nKey::SettingsFocusFollowsMouseDesc => ( - "Hovering a pane focuses it without a click.", - "悬停窗格即聚焦,无需点击。", - ), - L10nKey::SettingsHideMouseWhileTyping => ("Hide mouse while typing", "输入时隐藏鼠标"), - L10nKey::SettingsHideMouseWhileTypingDesc => ( - "Hide the pointer as you type; it returns on the next move.", - "输入时隐藏指针;下次移动鼠标时恢复。", - ), - L10nKey::SettingsReportMouseToApps => ("Report mouse to apps", "向应用报告鼠标"), - L10nKey::SettingsReportMouseToAppsDesc => ( - "Let full-screen apps (vim, tmux) handle clicks and scrolling; hold Shift to keep a gesture local.", - "让全屏应用(如 vim、tmux)处理点击和滚动;按住 Shift 可让操作保持本地。", - ), - L10nKey::SettingsBell => ("Bell", "铃声"), - L10nKey::SettingsTerminalBell => ("Terminal bell", "终端铃声"), - L10nKey::SettingsTerminalBellDesc => ( - "How a bell (^G) is signalled: silenced, a brief flash, the system sound, or both.", - "铃声(^G)的通知方式:静音、短暂闪烁、系统声音,或两者同时。", - ), - L10nKey::SettingsLinks => ("Links", "链接"), - L10nKey::DetectUrls => ("Detect URLs", "检测 URL"), - L10nKey::SettingsDetectUrlsDesc => ( - "Underline links on hover and open them on {modifier}-click.", - "悬停时给链接加下划线,通过 {modifier}+点击 打开。", - ), - L10nKey::ForwardSshLoopbackLinks => ("Forward SSH loopback links", "转发 SSH 回环链接"), - L10nKey::SettingsForwardSshLoopbackLinksDesc => ( - "When a pane is in SSH, open localhost links through a temporary port forward.", - "当窗格处于 SSH 中时,通过临时端口转发打开 localhost 链接。", - ), - L10nKey::OpenFilesWith => ("Open files with", "打开文件方式"), - L10nKey::SettingsOpenFilesWithDesc => ( - "Command run when {modifier}-clicking a file link, instead of the default app. Use {path}, {line}, {column}; a flag whose value is absent is dropped (e.g. herdr edit {path} --line={line}). Empty uses the default app.", - "{modifier}+点击 文件链接时运行的命令,而不是默认应用。可使用 {path}、{line}、{column};参数值缺失的标志会被丢弃(例如 herdr edit {path} --line={line})。留空使用默认应用。", - ), - L10nKey::SettingsBellModeOff => ("Off", "关"), - L10nKey::SettingsBellModeVisual => ("Visual", "闪烁"), - L10nKey::SettingsBellModeAudible => ("Audible", "声音"), - L10nKey::SettingsBellModeBoth => ("Both", "闪烁 + 声音"), - L10nKey::SettingsPrompt => ("Prompt", "提示符"), - L10nKey::SettingsPromptIntro => ( - "tty7's own menus at the shell prompt. Turn one off to hand the key back to the shell.", - "shell 提示符处的 tty7 自带菜单。关闭某项即可把按键交还给 shell。", - ), - L10nKey::SettingsTabCompletion => ("Tab completion", "Tab 补全"), - L10nKey::SettingsTabCompletionDesc => ( - "Tab at the prompt opens tty7's completion menu. When off, Tab goes to the shell's own completion instead.", - "在提示符按 Tab 打开 tty7 的补全菜单。关闭后 Tab 交由 shell 自身的补全处理。", - ), - L10nKey::SettingsHistorySearch => ("History search", "历史搜索"), - L10nKey::SettingsHistorySearchDesc => ( - "⌃R at the prompt opens tty7's fuzzy history menu. When off, ⌃R goes to the shell instead — its own reverse-i-search, or whatever you've bound there (fzf, percol).", - "在提示符按 ⌃R 打开 tty7 的模糊历史菜单。关闭后 ⌃R 交由 shell 处理——它自带的反向搜索,或你在那里绑定的其它功能(fzf、percol)。", - ), - L10nKey::SettingsSelectionClipboard => ("Selection & clipboard", "选择与剪贴板"), - L10nKey::SettingsSmartSelection => ("Smart selection", "智能选择"), - L10nKey::SettingsSmartSelectionDesc => ( - "Double-click selects the whole URL, file path, email, or bracket pair under the cursor.", - "双击选择光标下的完整 URL、文件路径、邮箱或成对的括号。", - ), - L10nKey::SettingsCopyOnSelect => ("Copy on select", "选中即复制"), - L10nKey::SettingsCopyOnSelectDesc => ( - "Selecting text with the mouse copies it to the clipboard right away, no ⌘C needed.", - "用鼠标选中文本时立即复制到剪贴板,无需按 ⌘C。", - ), - L10nKey::SettingsTrimTrailingSpaces => { - ("Trim trailing spaces on copy", "复制时去除末尾空格") - } - L10nKey::SettingsTrimTrailingSpacesDesc => ( - "Strip trailing whitespace from each copied line.", - "去除每行复制文本末尾的空白。", - ), - L10nKey::SettingsKeyboard => ("Keyboard", "键盘"), - L10nKey::SettingsOptionAsMeta => ("Option (⌥) acts as Meta", "Option (⌥) 作为 Meta"), - L10nKey::SettingsOptionAsMetaDesc => ( - "⌥+key sends the escape chord shells expect (⌥B = back one word) instead of typing a special character (∫).", - "⌥+按键 发送 shell 期望的转义组合键(⌥B = 后退一个词),而不是输入特殊字符(∫)。", - ), - L10nKey::SettingsAgentsIntro => ("Agents", "Agents"), - L10nKey::SettingsAgentsIntroDesc => ( - "Hook integrations give panes running these agents live session status (working / waiting / done) in the tab bar. Only active inside tty7.", - "hook 集成让标签栏中的窗格实时显示这些 agent 的会话状态(进行中 / 等待中 / 已完成)。仅在 tty7 内生效。", - ), - L10nKey::SettingsReadingAgentConfig => ( - "Reading this machine's agent config…", - "正在读取这台机器的 agent 配置…", - ), - L10nKey::SettingsStatusNotInstalled => ("Not installed", "未安装"), - L10nKey::SettingsStatusInstalled => ("Installed", "已安装"), - L10nKey::SettingsStatusOutdated => ("Outdated", "已过时"), - L10nKey::SettingsInstall => ("Install", "安装"), - L10nKey::SettingsReinstall => ("Reinstall", "重新安装"), - L10nKey::SettingsUpdate => ("Update", "更新"), - L10nKey::SettingsUninstall => ("Uninstall", "卸载"), - L10nKey::SettingsOfflineMachines => ( - "{count} more saved machines are not connected — open a workspace on one to install its hooks there.", - "还有 {count} 台已保存的机器未连接——在其中一台上打开工作区,即可在那台机器上安装 hook。", - ), - L10nKey::SettingsSyncWithSystem => ("Sync with system", "跟随系统"), - L10nKey::SettingsSyncWithSystemDesc => ( - "Follow the OS appearance with separate light and dark themes.", - "跟随操作系统外观,并分别使用浅色与深色主题。", - ), - L10nKey::SettingsChangeTheme => ("Change theme", "更换主题"), - L10nKey::SettingsThemes => ("Themes", "主题"), - L10nKey::SettingsThemePanelManual => ("Change your current theme.", "更改当前主题。"), - L10nKey::SettingsThemePanelLight => { - ("Choose the theme for light mode.", "选择浅色模式的主题。") - } - L10nKey::SettingsThemePanelDark => { - ("Choose the theme for dark mode.", "选择深色模式的主题。") - } - L10nKey::SettingsCustom => ("Custom", "自定义"), - L10nKey::SettingsBuiltIn => ("Built-in", "内置"), - L10nKey::SettingsDark => ("Dark", "深色"), - L10nKey::SettingsLight => ("Light", "浅色"), - L10nKey::SettingsLightMode => ("Light mode", "浅色模式"), - L10nKey::SettingsDarkMode => ("Dark mode", "深色模式"), - L10nKey::SettingsActive => ("Active", "使用中"), - L10nKey::SettingsStartupWindow => ("Startup window", "启动窗口"), - L10nKey::SettingsStartupWindowDesc => ( - "Window state when tty7 launches.", - "tty7 启动时的窗口状态。", - ), - L10nKey::SettingsRememberWindowSize => { - ("Remember window size & position", "记住窗口大小与位置") - } - L10nKey::SettingsRememberWindowSizeDesc => ( - "Reopen at the size and position the window had when tty7 last quit. Off opens centered at the default size.", - "以 tty7 上次退出时窗口的大小和位置重新打开。关闭时以默认大小居中打开。", - ), - L10nKey::SettingsRestoreLastLayout => ("Restore last layout", "恢复上次布局"), - L10nKey::SettingsRestoreLastLayoutDesc => ( - "Reopen the last window's tabs, splits, and directories on launch. Off starts with a single fresh terminal.", - "启动时恢复上次窗口的标签页、分屏和目录。关闭时从单个新终端开始。", - ), - L10nKey::SettingsConfirmLastWindowClose => ( - "Confirm before closing the last window", - "关闭最后一个窗口前确认", - ), - L10nKey::SettingsConfirmLastWindowCloseDesc => ( - "Ask first, since that close also quits tty7. Off closes straight away — either way your shells keep running in the background.", - "关闭最后一个窗口会同时退出 tty7,所以先问一句。关掉此项则直接关窗——两种情况下你的 shell 都会在后台继续运行。", - ), - L10nKey::SettingsShowTrayIcon => ("Show tray icon", "显示托盘图标"), - L10nKey::SettingsShowTrayIconDesc => ( - "Keep a status item in the system tray / menu bar: it signals when a coding agent needs your input, and its menu jumps to agent panes.", - "在系统托盘/菜单栏保留状态项:当编码 agent 需要输入时发出提示,其菜单可跳转到该 agent 的窗格。", - ), - L10nKey::SettingsTabs => ("Tabs", "标签页"), - L10nKey::SettingsNewTabPosition => ("New tab position", "新标签页位置"), - L10nKey::SettingsNewTabPositionDesc => ( - "Where a freshly opened tab is inserted.", - "新打开的标签页插入的位置。", - ), - L10nKey::SettingsTabBarPosition => ("Tab bar position", "标签栏位置"), - L10nKey::SettingsTabBarPositionDesc => ( - "Show tabs as a horizontal strip on top or a vertical sidebar on the left.", - "将标签页显示为顶部横向条或左侧垂直侧栏。", - ), - L10nKey::SettingsSidebarGrouping => ("Sidebar grouping", "侧栏分组"), - L10nKey::SettingsSidebarGroupingDesc => ( - "Group sidebar tabs under a header per git repository, with non-repo tabs in a Scratch section. Only applies to the left sidebar.", - "按 git 仓库在标题下对侧栏标签页分组,非仓库标签页放在“草稿”分组。仅适用于左侧栏。", - ), - L10nKey::SettingsDiffPreviewFromCounts => ( - "Open diff preview from sidebar counts", - "从侧栏计数打开 diff 预览", - ), - L10nKey::SettingsDiffPreviewFromCountsDesc => ( - "Click a row's +N −N to open the working-tree diff in an overlay. Off keeps the branch and the counts on the row and just stops them being clickable.", - "点击行上的 +N −N 可在浮层中打开 worktree diff。关闭时行上仍显示分支和计数,但不再可点击。", - ), - L10nKey::SettingsNotifications => ("Notifications", "通知"), - L10nKey::SettingsNotifyOnCommandFinish => ("Notify on command finish", "命令完成时通知"), - L10nKey::SettingsNotifyOnCommandFinishDesc => ( - "Desktop alert after a long foreground command completes.", - "较长的前台命令完成后发出桌面提醒。", - ), - L10nKey::SettingsNotifyThreshold => ("Notify threshold", "通知阈值"), - L10nKey::SettingsNotifyThresholdDesc => ( - "How long a command must run to qualify as \"long\".", - "命令需运行多久才能算作\"较长\"。", - ), - L10nKey::SettingsWindow => ("Window", "窗口"), - L10nKey::NotifyModeNever => ("Never", "从不"), - L10nKey::NotifyModeUnfocused => ("When Unfocused", "窗口未聚焦时"), - L10nKey::NotifyModeAlways => ("Always", "总是"), - L10nKey::SettingsStartupNormal => ("Normal", "普通"), - L10nKey::SettingsStartupMaximized => ("Maximized", "最大化"), - L10nKey::SettingsStartupFullscreen => ("Fullscreen", "全屏"), - L10nKey::SettingsAfterCurrent => ("After current", "当前之后"), - L10nKey::SettingsAtEnd => ("At end", "末尾"), - L10nKey::SettingsTop => ("Top", "顶部"), - L10nKey::SettingsLeft => ("Left", "左侧"), - L10nKey::SettingsByRepo => ("By repo", "按仓库"), - L10nKey::SettingsFlat => ("Flat", "平铺"), - L10nKey::SettingsPreset => ("Preset", "预设"), - L10nKey::SettingsPresetDesc => ( - "tmux remaps pane/tab actions onto prefix sequences (e.g. Ctrl-B then C).", - "tmux 预设把窗格/标签页操作映射为前缀序列(例如 Ctrl-B 后按 C)。", - ), - L10nKey::SettingsPrefix => ("Prefix", "前缀"), - L10nKey::SettingsPressKeys => ("Press keys…", "按下按键…"), - L10nKey::SettingsPauseToSaveEsc => ("pause to save · Esc", "暂停以保存 · Esc"), - L10nKey::SettingsKeybindingsIntroDesc => ( - "Click a shortcut, then press the new keys — it saves after a brief pause. Chain keys for a sequence like Ctrl-B then X. Esc cancels; Backspace removes the last key, or resets the shortcut to default when pressed first.", - "点击某个快捷键,然后按下新按键,短暂停顿后便会保存。可连续按键组成序列,例如 Ctrl-B 后按 X。Esc 取消;Backspace 移除最后一个按键,若最先按下则重置为默认。", - ), - L10nKey::SettingsPrefixNote => ( - "With a prefix active, a bare prefix key reaches the shell after a ~1s pause, and prefix + an unbound key is sent through to the terminal.", - "启用前缀后,单独按前缀键约 1 秒后会传给 shell,前缀 + 未绑定的按键会直接发送到终端。", - ), - L10nKey::SettingsRestoreAllDefaults => ("Restore all defaults", "恢复全部默认值"), - L10nKey::SettingsAboutDesc1 => ( - "A terminal workbench: persistent sessions, remote work, agents.", - "终端工作台:常驻会话、远程工作、agent。", - ), - L10nKey::SettingsAboutTech => ( - "Pure Rust · GPU rendering on Zed's gpui · VT core from Alacritty", - "纯 Rust · GPU 渲染基于 Zed 的 gpui · VT 内核来自 Alacritty", - ), - L10nKey::SettingsVersion => ("Version", "版本"), - L10nKey::SettingsUpdates => ("Updates", "更新"), - L10nKey::SettingsUpdateAndRelaunch => ("Update and Relaunch", "更新并重新启动"), - L10nKey::SettingsUpdateViewRelease => ("View Release", "查看发布页面"), - L10nKey::SettingsUpdateChecking => ("Checking for updates…", "正在检查更新…"), - L10nKey::SettingsUpdateUpToDate => { - ("You're running the latest version.", "当前已是最新版本。") - } - L10nKey::SettingsUpdateDownloading => ( - "Downloading and verifying the update…", - "正在下载并验证更新…", - ), - L10nKey::SettingsUpdateInstalling => { - ("Relaunching with the update…", "正在通过更新重新启动…") - } - L10nKey::SettingsUpdateCheckNow => ("Check Now", "立即检查"), - L10nKey::SettingsUpdateCheckFailed => ( - "Could not check for updates: {error}", - "无法检查更新:{error}", - ), - L10nKey::SettingsUpdatePrepareFailed => ("Update failed: {error}", "更新失败:{error}"), - L10nKey::SettingsUpdateLaunchFailed => ( - "Could not start the installer: {error}", - "无法启动安装程序:{error}", - ), - L10nKey::SettingsUpdateUnsupportedMacos => ( - "This copy is not running from a writable tty7.app bundle, so replacing it would be unsafe. Move tty7 to Applications or another writable folder, or open the release page to install the update.", - "当前副本并非从可写的 tty7.app 包运行,直接替换并不安全。请将 tty7 移到“应用程序”或其他可写文件夹,或者打开发布页面安装更新。", - ), - L10nKey::SettingsUpdateUnsupportedLinux => ( - "The first in-app updater supports packaged macOS app bundles. Use the release page or your package manager to update this Linux installation.", - "当前应用内更新器支持打包的 macOS 应用。请通过发布页面或包管理器更新此 Linux 安装。", - ), - L10nKey::SettingsUpdateUnsupportedWindows => ( - "Automatic Windows updates are available for recognized Inno Setup and portable ZIP installations. This copy is missing a valid installation marker, updater, or writable portable directory, so open the release page to update it manually.", - "Windows 自动更新适用于可识别的 Inno Setup 安装版和便携 ZIP 版。当前副本缺少有效的安装标记、更新程序或可写的便携目录,请打开发布页面手动更新。", - ), - L10nKey::SettingsUpdateWindowsAllUsers => ( - "tty7 is installed for all users, which needs administrator rights to replace. tty7 will not raise an elevation prompt on its own behalf, so open the release page and run the installer yourself to update it.", - "tty7 是为所有用户安装的,替换它需要管理员权限。tty7 不会自行弹出提权请求,请打开发布页面并自行运行安装程序进行更新。", - ), - L10nKey::SettingsUpdateUnsupportedPlatform => ( - "Automatic installation is not available on this platform. Open the release page.", - "此平台不支持自动安装,请打开发布页面。", - ), - L10nKey::SettingsUpdateMissingPackage => ( - "The release has no {name} package for this installation. Open the release page to choose another package.", - "该版本没有适用于当前安装的 {name} 包。请打开发布页面选择其他包。", - ), - L10nKey::SettingsUpdateMissingChecksums => ( - "The release has no checksums.txt, so tty7 refuses to install it automatically.", - "该版本缺少 checksums.txt,因此 tty7 拒绝自动安装。", - ), - L10nKey::SettingsVersionAvailable => { - ("Version {version} is available.", "新版本 {version} 可用。") - } - L10nKey::SettingsCheckUpdatesDesc => ( - "Installations that cannot update in place open the release page instead.", - "无法就地更新的安装方式会改为打开发布页面。", - ), - L10nKey::SettingsCheckUpdatesOnLaunch => ("Check for updates on launch", "启动时检查更新"), - L10nKey::SettingsCommandLine => ("Command line", "命令行"), - L10nKey::SettingsCommandLineDesc => ( - "Put the bundled `tty7` command on your PATH at launch, so scripts and coding agents can drive tty7 from any terminal. Inside a tty7 pane it works either way. Turn this off if you keep your own `tty7` — one you built or installed yourself — and do not want it shadowed. Takes effect at next launch.", - "启动时将自带的 `tty7` 命令加入 PATH,让脚本和编码 agent 可在任意终端驱动 tty7。在 tty7 窗格内两种情况都可用。如果你自己构建或安装了 `tty7` 且不希望被遮蔽,请关闭此选项。下次启动时生效。", - ), - L10nKey::SettingsInstallCliOnPath => ( - "Install the `tty7` command on PATH", - "将 `tty7` 命令安装到 PATH", - ), - L10nKey::SettingsServer => ("Server", "服务器"), - L10nKey::SettingsServerDesc => ( - "Restarts the background server that keeps your shells running. This ends every shell on this computer; your tabs and layout reopen with fresh ones.", - "重启在后台维持 shell 运行的服务器。这会结束这台计算机上所有正在运行的 shell;你的标签页和布局会以全新的 shell 重新打开。", - ), - L10nKey::SettingsRestartServer => ("Restart server…", "重启服务器…"), - L10nKey::SettingsAppHttpProxy => ("Proxy for updates", "更新代理"), - L10nKey::SettingsAppHttpProxyDesc => ( - "Optional proxy for tty7's own update checks and downloads. It does not affect programs running in your panes — those use their own environment. Leave empty to follow the system proxy. Examples: http://127.0.0.1:7890, socks5://127.0.0.1:1080.", - "供 tty7 自身的更新检查和下载使用的可选代理。不影响面板中运行的程序,它们仍按各自的环境变量走。留空则跟随系统代理。例如:http://127.0.0.1:7890、socks5://127.0.0.1:1080。", - ), - L10nKey::SettingsAppHttpProxyInvalid => ( - "Not a valid proxy address — this value was not saved.", - "不是有效的代理地址,该值未保存。", - ), - L10nKey::SettingsAgentClaudeCode => ("Claude Code", "Claude Code"), - L10nKey::SettingsAgentCodex => ("Codex", "Codex"), - L10nKey::SettingsAgentCopilotCli => ("Copilot CLI", "Copilot CLI"), - L10nKey::SettingsAgentOpencode => ("OpenCode", "OpenCode"), - L10nKey::SettingsAgentPi => ("Pi", "Pi"), - L10nKey::SettingsAgentGrokBuild => ("Grok Build", "Grok Build"), - L10nKey::SettingsSearchAboutKeywords => ( - "version license credits build update check github", - "关于 版本 许可证 致谢 构建 更新 检查 github about version license credits update", - ), - L10nKey::SettingsSearchAppHttpProxyKeywords => ( - "proxy http https socks socks5 clash v2ray network download update", - "代理 proxy http https socks socks5 clash v2ray 网络 下载 更新", - ), - L10nKey::SettingsSearchAnsiColorsKeywords => ( - "palette 16 terminal colours theme", - "ANSI颜色 调色板 终端颜色 主题 ansi colors palette terminal theme", - ), - L10nKey::SettingsSearchArgumentsKeywords => ( - "shell flags login args", - "参数 shell 启动参数 登录参数 arguments shell flags login args", - ), - L10nKey::SettingsSearchBlurKeywords => ( - "transparency translucent frosted vibrancy window background", - "模糊 毛玻璃 半透明 窗口 背景 blur frosted vibrancy window background", - ), - L10nKey::SettingsSearchBoldFontKeywords => ( - "typeface weight", - "粗体 字体粗细 字重 bold font weight typeface", - ), - L10nKey::SettingsSearchClaudeCodeKeywords => ( - "agent integration hooks install uninstall status rich session working waiting tab bar sidebar badge claude", - "Claude Code agent 集成 hook 安装 卸载 状态 会话 claude agent integration hooks install", - ), - L10nKey::SettingsSearchCodexKeywords => ( - "agent integration hooks install openai codex", - "Codex agent 集成 hook 安装 OpenAI codex agent integration hooks install", - ), - L10nKey::SettingsSearchCommandLineToolKeywords => ( - "cli tty7 path shell command install symlink terminal iterm agent script", - "命令行工具 cli tty7 路径 shell 命令 安装 符号链接 terminal command line tool", - ), - L10nKey::SettingsSearchCommandLineToolTitle => ("Command line tool", "命令行工具"), - L10nKey::SettingsSearchConfirmLastWindowCloseKeywords => ( - "close quit confirm prompt dialog ask again warn last window cmd-w ctrl-w", - "关闭最后一个窗口前确认 关闭 退出 确认 提示 最后一个窗口 confirm close last window quit", - ), - L10nKey::SettingsSearchCopilotCliKeywords => ( - "agent integration hooks install github copilot", - "Copilot CLI agent 集成 hook 安装 GitHub copilot agent integration hooks install", - ), - L10nKey::SettingsSearchCopyOnSelectKeywords => ( - "clipboard selection yank mouse", - "选中即复制 复制 剪贴板 选择 鼠标 copy on select clipboard yank", - ), - L10nKey::SettingsSearchCursorBlinkKeywords => ( - "caret blinking flash", - "光标闪烁 闪烁 光标 blink cursor blinking flash", - ), - L10nKey::SettingsSearchCursorShapeKeywords => ( - "caret block bar underline beam", - "光标形状 光标 块 竖线 下划线 cursor shape caret block bar underline beam", - ), - L10nKey::SettingsSearchCustomThemesKeywords => ( - "theme duplicate edit colors folder yaml import", - "自定义主题 复制 编辑 颜色 文件夹 yaml 导入 theme custom edit duplicate colors import", - ), - L10nKey::SettingsSearchDetectUrlsKeywords => ( - "links hyperlink clickable open", - "检测URL 链接 超链接 可点击 打开 detect urls links hyperlink open", - ), - L10nKey::SettingsSearchDiffPreviewFromCountsKeywords => ( - "diff overlay preview sidebar counts git changes click branch lines", - "从侧栏计数打开 diff 预览 diff 预览 侧栏 git diff preview sidebar counts git changes", - ), - L10nKey::SettingsSearchDimInactivePanesKeywords => ( - "fade unfocused inactive split pane focus opacity highlight active dimming", - "调暗 非活动窗格 淡化 未聚焦 分屏 高亮 active dimming pane focus", - ), - L10nKey::SettingsSearchFocusFollowsMouseKeywords => ( - "pane hover activate", - "焦点跟随鼠标 悬停 激活 窗格 focus follows mouse hover activate pane", - ), - L10nKey::SettingsSearchFontFamilyKeywords => ( - "typeface monospace typography", - "字体 字体族 等宽 排版 font family monospace typography typeface", - ), - L10nKey::SettingsSearchFontLigaturesKeywords => ( - "typography glyph fira", - "字体连字 连字 字形 typography ligatures glyph fira", - ), - L10nKey::SettingsSearchFontSizeKeywords => ( - "typography text bigger smaller zoom", - "字号 字体大小 文字 放大 缩小 typography font size bigger smaller zoom", - ), - L10nKey::SettingsSearchForwardSshLoopbackLinksKeywords => ( - "ssh remote port tunnel localhost forward links", - "SSH回环链接 端口转发 隧道 localhost 转发 forward ssh loopback links tunnel", - ), - L10nKey::SettingsSearchGrokBuildKeywords => ( - "agent integration hooks install xai grok build", - "Grok Build agent 集成 hook 安装 xai grok build agent integration hooks install", - ), - L10nKey::SettingsSearchHideMouseWhileTypingKeywords => ( - "cursor pointer autohide", - "输入时隐藏鼠标 隐藏鼠标 指针 自动隐藏 hide mouse typing cursor pointer autohide", - ), - L10nKey::SettingsSearchHistorySearchKeywords => ( - "ctrl-r reverse search fuzzy history recall fzf prompt", - "历史搜索 反向搜索 模糊搜索 ctrl-r fzf history search recall", - ), - L10nKey::SettingsSearchHostsKeywords => ( - "ssh host connection saved profile import ssh_config manage add edit quick connect", - "主机 SSH 连接 保存 主机配置 配置文件 导入 ssh_config 管理 添加 编辑 快速连接 hosts ssh profile import connect", - ), - L10nKey::SettingsSearchHowShellsWorkKeywords => ( - "shell session daemon server detach persist background close quit stop delete workspace layout survive reboot tmux", - "Shell工作原理 shell 会话 守护进程 持久化 后台 工作区 布局 survive reboot daemon how shells work", - ), - L10nKey::SettingsSearchHowShellsWorkTitle => ("How shells work", "Shell 工作原理"), - L10nKey::SettingsSearchItalicFontKeywords => { - ("typeface oblique", "斜体 字体样式 italic oblique typeface") - } - L10nKey::SettingsSearchKeybindingsKeywords => ( - "shortcut hotkey keyboard binding chord tmux preset rebind prefix", - "按键绑定 快捷键 热键 键盘 绑定 前缀 tmux keybindings shortcut hotkey binding prefix", - ), - L10nKey::SettingsSearchKeybindingsTitle => ("Keybindings", "按键绑定"), - L10nKey::SettingsSearchLineHeightKeywords => ( - "typography leading spacing", - "行高 行间距 行距 typography line height spacing leading", - ), - L10nKey::SettingsSearchNewTabPositionKeywords => ( - "tabs order end after current", - "新标签页位置 标签页 顺序 末尾 当前之后 new tab position tabs order end after current", - ), - L10nKey::SettingsSearchNotifyOnCommandFinishKeywords => ( - "notification alert done osc desktop banner long command", - "命令完成时通知 通知 提醒 命令 notify command finish notification alert desktop", - ), - L10nKey::SettingsSearchNotifyThresholdKeywords => ( - "notification alert seconds duration long command delay", - "通知阈值 通知 秒数 时长 命令 notify threshold notification duration seconds", - ), - L10nKey::SettingsSearchOpacityKeywords => ( - "transparency translucent see through window alpha", - "不透明度 透明度 窗口 半透明 alpha opacity transparency translucent window", - ), - L10nKey::SettingsSearchOpenFilesWithKeywords => ( - "links file editor command external app path line column", - "打开文件 链接 编辑器 命令 外部应用 路径 行号 列号 open files editor command path line column", - ), - L10nKey::SettingsSearchOpencodeKeywords => ( - "agent integration plugin install opencode", - "OpenCode agent 集成 插件 安装 opencode agent integration plugin install", - ), - L10nKey::SettingsSearchOptionAsMetaKeywords => ( - "alt keyboard modifier escape macos option meta option acts as meta", - "Option作为Meta 修饰键 alt option meta 转义 escape macos keyboard modifier", - ), - L10nKey::SettingsSearchPiKeywords => ( - "agent integration extension install pi", - "Pi agent 集成 扩展 安装 pi agent integration extension install", - ), - L10nKey::SettingsSearchPortForwardingKeywords => ( - "ssh tunnel local remote dynamic socks forward rule", - "端口转发 SSH 隧道 本地 远程 动态 SOCKS 转发 port forwarding ssh tunnel local remote", - ), - L10nKey::SettingsSearchProgramKeywords => ( - "shell binary zsh bash fish nu nushell pwsh powershell executable launch", - "程序 shell 二进制 zsh bash fish nu nushell pwsh powershell 可执行文件 启动 program shell binary launch", - ), - L10nKey::SettingsSearchRememberWindowSizeKeywords => ( - "window size position bounds geometry launch startup remember", - "记住窗口大小位置 窗口 大小 位置 启动 记住 remember window size position geometry", - ), - L10nKey::SettingsSearchReportMouseToAppsKeywords => ( - "mouse reporting vim tmux click scroll shift passthrough", - "鼠标报告 鼠标 vim tmux 点击 滚动 shift report mouse apps", - ), - L10nKey::SettingsSearchRestoreLastLayoutKeywords => ( - "restore session previous tabs splits reopen launch startup layout", - "恢复上次布局 恢复 会话 标签页 分屏 布局 restore last layout tabs splits", - ), - L10nKey::SettingsSearchScrollSpeedKeywords => ( - "mouse wheel multiplier scrolling", - "滚动速度 鼠标滚轮 滚动倍率 scroll speed mouse wheel multiplier scrolling", - ), - L10nKey::SettingsSearchScrollbackKeywords => ( - "history buffer lines scroll", - "scrollback 回看 向上滚动 历史 缓冲区 行数 scrollback history buffer lines", - ), - L10nKey::SettingsSearchShowTrayIconKeywords => ( - "tray menu bar status item agent attention system icon", - "显示托盘图标 托盘 菜单栏 状态 图标 show tray icon menu bar status", - ), - L10nKey::SettingsSearchSidebarGroupingKeywords => ( - "tabs group repo repository git scratch header sidebar flat", - "侧栏分组 标签页 分组 仓库 git 侧栏 sidebar grouping tabs repo repository", - ), - L10nKey::SettingsSearchSmartSelectionKeywords => ( - "double click word url path select semantic bracket email", - "智能选择 双击 选择 单词 URL 路径 邮箱 括号 smart selection double click", - ), - L10nKey::SettingsSearchStartInKeywords => ( - "cwd working directory start folder path home inherit custom", - "起始目录 工作目录 启动目录 主目录 继承 自定义 cwd working directory start home inherit custom", - ), - L10nKey::SettingsSearchSyncWithSystemKeywords => ( - "theme dark light auto follow os appearance mode", - "主题 跟随系统 自动 深色 浅色 外观 模式 theme dark light auto follow system", - ), - L10nKey::SettingsSearchTabBarPositionKeywords => ( - "tabs vertical sidebar left top layout rail", - "标签栏位置 标签栏 侧边栏 左侧 顶部 布局 tab bar position tabs sidebar left top", - ), - L10nKey::SettingsSearchTabCompletionKeywords => ( - "complete completion menu suggestions tab prompt", - "Tab补全 补全 菜单 建议 tab completion suggestions prompt", - ), - L10nKey::SettingsSearchTerminalBellKeywords => ( - "bell audible visual flash sound silence beep both ^g", - "终端铃声 铃声 提示音 闪烁 静音 两者 同时 beep bell terminal audible visual both", - ), - L10nKey::SettingsSearchThemeKeywords => ( - "appearance color colours scheme dark light palette background foreground accent sync system os auto follow", - "外观 颜色 主题 配色 深色 浅色 背景 前景 强调色 跟随系统 appearance color scheme dark light palette", - ), - L10nKey::SettingsSearchTrimTrailingSpacesKeywords => ( - "clipboard whitespace copy", - "复制时去除空格 去除末尾空格 剪贴板 空白 trim trailing spaces copy whitespace", - ), - L10nKey::SettingsSearchVerifyHostKeysKeywords => ( - "ssh security known_hosts fingerprint mitm host key verification", - "校验主机密钥 主机密钥 known_hosts 指纹 mitm 安全 verification ssh host keys", - ), - L10nKey::SettingsSearchWarnBeforeClosingKeywords => ( - "ssh confirm close tab pane live session security", - "关闭前警告 确认关闭 SSH 标签页 窗格 会话 warn before closing ssh confirm", - ), - L10nKey::SettingsSearchStartupWindowKeywords => ( - "launch open maximized fullscreen normal", - "启动窗口 启动 最大化 全屏 普通 startup window launch maximized fullscreen normal", - ), - L10nKey::SwitcherNoMatch => ( - "No workspace or machine matches.", - "没有匹配的工作区或机器。", - ), - L10nKey::AddSshHost => ("Add SSH Host…", "添加 SSH 主机…"), - L10nKey::ClickForNewWindow => ("click for a new window", "点击打开新窗口"), - L10nKey::RestartServer => ("Restart Server", "重启服务器"), - L10nKey::OtherMachines => ("Other Machines", "其他机器"), - L10nKey::Ok => ("OK", "确定"), - L10nKey::SftpNoTransfers => ("No transfers yet.", "还没有传输任务。"), - L10nKey::SftpPanelTitleFiles => ("Files", "文件"), - L10nKey::SftpTooltipRefresh => ("Refresh", "刷新"), - L10nKey::SftpTooltipMore => ("More", "更多"), - L10nKey::SftpMenuNewFolder => ("New folder", "新建文件夹"), - L10nKey::SftpMenuNewFile => ("New file", "新建文件"), - L10nKey::SftpMenuUpload => ("Upload…", "上传…"), - L10nKey::SftpMenuGotoShellCwd => ("Go to shell directory", "转到 shell 目录"), - L10nKey::SftpMenuHideTransferHistory => ("Hide transfer history", "隐藏传输历史"), - L10nKey::SftpMenuTransferHistory => ("Transfer history", "传输历史"), - L10nKey::SftpEditNewFolder => ("New folder", "新建文件夹"), - L10nKey::SftpEditNewFile => ("New file", "新建文件"), - L10nKey::SftpEditRename => ("Rename", "重命名"), - L10nKey::SftpEditPermissions => ("Permissions · {mode}", "权限 · {mode}"), - L10nKey::SftpLoading => ("Loading…", "加载中…"), - L10nKey::SftpEmptyDirectory => ("Empty directory.", "空文件夹。"), - L10nKey::SftpContextOpen => ("Open", "打开"), - L10nKey::SftpContextFollowSymlink => ("Follow symlink", "跟随符号链接"), - L10nKey::SftpContextRename => ("Rename", "重命名"), - L10nKey::SftpContextChmod => ("chmod…", "权限…"), - L10nKey::SftpTransferSummaryRunning => { - ("{count} transferring · {pct}%", "{count} 个传输中 · {pct}%") - } - L10nKey::SftpTransferSummaryFailed => ("{count} failed", "{count} 个失败"), - L10nKey::SftpTransferSummaryIdle => ("Transfers", "传输"), - L10nKey::SftpTransferProgress => ("{done} / {total} ({pct}%)", "{done} / {total} ({pct}%)"), - L10nKey::SftpTransferDone => ("done", "完成"), - L10nKey::SftpTransferCancelled => ("cancelled", "已取消"), - L10nKey::SftpTransferError => ("error", "错误"), - L10nKey::SftpImagePasteUploadFailed => ( - "Could not upload the pasted image to {host}: {error}", - "无法将粘贴的图片上传到 {host}:{error}", - ), - L10nKey::ForwardPanelTitle => ("Forwards", "端口转发"), - L10nKey::ForwardDisconnected => ("Disconnected", "已断开"), - L10nKey::ForwardDisconnectedFrom => ("Disconnected from {host}", "与 {host} 的连接已断开"), - L10nKey::ForwardTooltipAdd => ("Add forward", "添加转发"), - L10nKey::ForwardTooltipRemove => ("Remove", "移除"), - L10nKey::ForwardLocal => ("Local", "本地"), - L10nKey::ForwardRemote => ("Remote", "远程"), - L10nKey::ForwardDynamic => ("Dynamic", "动态"), - L10nKey::ForwardBindLabel => ("bind", "绑定"), - L10nKey::ForwardToLabel => ("to", "到"), - L10nKey::ForwardSocksLabel => ("SOCKS", "SOCKS"), - L10nKey::ForwardAdd => ("Add", "添加"), - L10nKey::FileTreePlaceholderFileName => ("file name", "文件名"), - L10nKey::FileTreePlaceholderFolderName => ("folder name", "文件夹名"), - L10nKey::FileTreePlaceholderNewName => ("new name", "新名称"), - L10nKey::FileTreeDeleteTitle => ("Delete \"{name}\"?", "删除\"{name}\"?"), - L10nKey::FileTreeDeleteFolderBody => ( - "The folder and everything inside it will be deleted.", - "该文件夹及其中的所有内容都将被删除。", - ), - L10nKey::FileTreeDeleteFileBody => ("The file will be deleted.", "该文件将被删除。"), - L10nKey::FileTreeDeleteFailed => ("Delete failed", "删除失败"), - L10nKey::FileTreeContextOpen => ("Open", "打开"), - L10nKey::FileTreeContextCdHere => ("cd Here", "cd 到此处"), - L10nKey::FileTreeContextInsertPath => ("Insert Path in Terminal", "在终端中插入路径"), - L10nKey::FileTreeContextAttachAgent => ("Attach to Agent", "附加到 agent"), - L10nKey::FileTreeContextNewFile => ("New File", "新建文件"), - L10nKey::FileTreeContextNewFolder => ("New Folder", "新建文件夹"), - L10nKey::FileTreeContextRename => ("Rename", "重命名"), - L10nKey::FileTreeContextCopyPath => ("Copy Path", "复制路径"), - L10nKey::FileTreeContextHideDotfiles => ("Hide Dotfiles", "隐藏点文件"), - L10nKey::FileTreeContextShowDotfiles => ("Show Dotfiles", "显示点文件"), - L10nKey::SshPromptNewKey => ("new {fingerprint}", "新 {fingerprint}"), - L10nKey::SshPromptOldKey => ("old {old_fingerprint}", "旧 {old_fingerprint}"), - L10nKey::EditorCantOpen => ("Can't open {path}: {e}", "无法打开 {path}:{e}"), - L10nKey::EditorCantRead => ("Can't read {path}: {e}", "无法读取 {path}:{e}"), - L10nKey::EditorNotUtf8 => ( - "\"{path}\" is not valid UTF-8", - "\"{path}\" 不是有效的 UTF-8", - ), - L10nKey::EditorSaveFailed => ("Save failed", "保存失败"), - L10nKey::EditorUnsavedChanges => ( - "\"{name}\" has unsaved changes", - "\"{name}\" 有未保存的更改", - ), - L10nKey::EditorDiscard => ("Discard", "放弃"), - L10nKey::EditorNoFileOpen => ("No file open", "没有打开的文件"), - L10nKey::EditorBackToTerminal => ("Back to Terminal (Esc)", "返回终端 (Esc)"), - L10nKey::EditorLnCol => ("Ln {line}, Col {column}", "行 {line},列 {column}"), - L10nKey::EditorEdit => ("Edit", "编辑"), - L10nKey::EditorPreview => ("Preview", "预览"), - L10nKey::EditorWrapOn => ("Wrap: on", "自动换行:开"), - L10nKey::EditorWrapOff => ("Wrap: off", "自动换行:关"), - L10nKey::EditorFileTooLarge => ( - "\"{path}\" is too large for the editor ({size} MB)", - "\"{path}\" 太大,无法在编辑器中打开({size} MB)", - ), - L10nKey::EditorBinaryFile => ( - "\"{path}\" looks like a binary file", - "\"{path}\" 看起来是二进制文件", - ), - L10nKey::PanelInfoTitle => ("Info", "信息"), - L10nKey::PanelChangesTitle => ("Changes", "变更"), - L10nKey::PanelFilesTitle => ("Files", "文件"), - L10nKey::PanelNoSession => ("No active session.", "没有活动会话。"), - L10nKey::PanelNoSessionHint => ( - "Open a tab to see its shell, directory, and processes here.", - "打开一个标签页以在此处查看其 shell、目录和进程。", - ), - L10nKey::PanelNoWorkingDirectory => ("No working directory.", "没有工作目录。"), - L10nKey::PanelNoWorkingDirectoryHint => ( - "This pane has not reported one yet.", - "此窗格尚未报告工作目录。", - ), - L10nKey::PanelLoading => ("Loading…", "加载中…"), - L10nKey::PanelNotAGitRepo => ("Not a git repository.", "不是 git 仓库。"), - L10nKey::PanelNotAGitRepoHint => ( - "cd into one and this tab lists its uncommitted changes.", - "进入 git 仓库后,此标签页会列出未提交的变更。", - ), - L10nKey::PanelNoChanges => ("No uncommitted changes.", "没有未提交的变更。"), - L10nKey::PanelNoChangesHint => ("The working tree is clean.", "worktree 是干净的。"), - L10nKey::PanelSessionSubtitle => ("Session", "会话"), - L10nKey::PanelProcessesSubtitle => ("Processes", "进程"), - L10nKey::PanelPortsSubtitle => ("Ports", "端口"), - L10nKey::PanelCwd => ("cwd", "工作目录"), - L10nKey::PanelShell => ("shell", "shell"), - L10nKey::PanelSsh => ("ssh", "ssh"), - L10nKey::PanelBranch => ("branch", "分支"), - L10nKey::PanelChangesRow => ("changes", "变更"), - L10nKey::PanelAgent => ("agent", "agent"), - L10nKey::PanelAgentIdle => ("idle", "空闲"), - L10nKey::PanelAgentWorking => ("working", "进行中"), - L10nKey::PanelAgentWaiting => ("waiting", "等待中"), - L10nKey::PanelAgentDone => ("done", "已完成"), - L10nKey::PanelRevealInFinder => ("Reveal in Finder", "在 Finder 中显示"), - L10nKey::PanelOpenFolder => ("Open Folder", "打开文件夹"), - L10nKey::WindowStop => ("Stop", "停止"), - L10nKey::WindowDelete => ("Delete", "删除"), - L10nKey::WindowThisWorkspace => ("this workspace", "此工作区"), - L10nKey::WindowConfirmTitle => ("{verb} Workspace \"{name}\"?", "{verb}工作区\"{name}\"?"), - L10nKey::WindowStopUnreachable => ( - "Its machine could not be reached. Any shells still running there will be ended.", - "无法连接到其所在机器。仍在运行的 shell 将会被终止。", - ), - L10nKey::WindowDeleteUnreachable => ( - "Its machine could not be reached. Any shells still running there will be ended, and the layout forgotten.", - "无法连接到其所在机器。仍在运行的 shell 将会被终止,布局也将被清除。", - ), - L10nKey::WindowStopShells => ( - "{count} running shells will be ended.", - "{count} 个正在运行的 shell 将会被终止。", - ), - L10nKey::WindowDeleteShells => ( - "{count} running shells will be ended and the layout forgotten.", - "{count} 个正在运行的 shell 将会被终止,布局也将被清除。", - ), - L10nKey::DiffReading => ("Reading diff…", "正在读取 diff…"), - L10nKey::DiffNotARepo => ("Not a git repository", "不是 git 仓库"), - L10nKey::DiffReadFailed => ( - "Couldn't read the working-tree diff — retrying on the next refresh.", - "无法读取 worktree diff——下次刷新时重试。", - ), - L10nKey::DiffWorkingTreeClean => ("Working tree clean", "worktree 干净"), - L10nKey::DiffCloseTooltip => ("Close Diff (Esc)", "关闭 diff (Esc)"), - L10nKey::DiffChangedFiles => ("{count} changed files", "{count} 个变更文件"), - L10nKey::DiffUntrackedCount => (" · {count} untracked", " · {count} 个未跟踪文件"), - L10nKey::DiffMoreFiles => ( - "… and {count} more changed files — run `git diff` in the terminal to see them.", - "…还有 {count} 个变更文件——在终端中运行 `git diff` 查看。", - ), - L10nKey::DiffOversizedNotice => ( - "This working tree is too large to render efficiently ({summary}). Every file is collapsed — expand individual files, or run `git diff` in the terminal.", - "此 worktree 太大,无法高效渲染({summary})。每个文件都已折叠——可展开单个文件,或在终端中运行 `git diff`。", - ), - L10nKey::DiffTruncatedPerFile => ( - "Diff truncated at {limit} lines — run `git diff` in the terminal for the rest.", - "diff 在 {limit} 行处截断——在终端中运行 `git diff` 查看其余部分。", - ), - L10nKey::DiffTruncatedBudget => ( - "Body not loaded — this working tree is past tty7's diff budget. Run `git diff` in the terminal for this file.", - "内容未加载——此 worktree 已超出 tty7 的 diff 预算。在终端中运行 `git diff` 查看此文件。", - ), - L10nKey::DiffUntrackedHeader => ("Untracked files ({count})", "未跟踪文件 ({count})"), - L10nKey::DiffMoreUntracked => ( - "… and {count} more — run `git status` in the terminal to see them.", - "…还有 {count} 个——在终端中运行 `git status` 查看。", - ), - L10nKey::DiffLines => ("{count} diff lines", "{count} 行 diff"), - L10nKey::DiffChangedLines => ( - "{total} changed lines, {loaded} diff rows loaded before {cap} cut the rest", - "{total} 行变更,在 {cap} 截断前已加载 {loaded} 行 diff", - ), - L10nKey::DiffBudgetAndCap => ( - "tty7's budget and the per-file cap", - "tty7 的预算和单文件上限", - ), - L10nKey::DiffBudget => ("tty7's budget", "tty7 的预算"), - L10nKey::DiffPerFileCap => ("the per-file cap", "单文件上限"), - L10nKey::DiffUntrackedSummary => ("{count} untracked", "{count} 个未跟踪"), - L10nKey::PendingConnecting => ("Connecting to {machine}…", "正在连接 {machine}…"), - L10nKey::PendingUnreachable => ("Couldn't reach {machine}", "无法连接到 {machine}"), - L10nKey::WorktreePromptNeedsName => ("The worktree needs a name", "worktree 需要一个名称"), - L10nKey::WorktreePromptTitle => ("New Worktree Tab", "新建 worktree 标签页"), - L10nKey::WorktreePromptName => ("Worktree Name", "worktree 名称"), - L10nKey::WorktreePromptBranch => ("New Branch", "新分支"), - L10nKey::WorktreePromptBase => ("Start From", "起始分支"), - L10nKey::WorktreePromptCreating => ("Creating…", "正在创建…"), - L10nKey::WorktreePromptCreate => ("Create", "创建"), - L10nKey::AppNewWorktreeFailed => ( - "New worktree failed: {error}", - "新建 worktree 失败:{error}", - ), - L10nKey::HomeTimeJustNow => ("just now", "刚刚"), - L10nKey::HomeTimeMinutesAgo => ("{count} min ago", "{count} 分钟前"), - L10nKey::HomeTimeHourAgo => ("1 hour ago", "1 小时前"), - L10nKey::HomeTimeHoursAgo => ("{count} hours ago", "{count} 小时前"), - L10nKey::HomeTimeYesterday => ("yesterday", "昨天"), - L10nKey::HomeTimeDaysAgo => ("{count} days ago", "{count} 天前"), - L10nKey::HomeTimeOverWeekAgo => ("over a week ago", "一周多前"), - L10nKey::HomeReopenNamed => ("Reopen \"{name}\"", "重新打开\"{name}\""), - L10nKey::RemoteStripDisconnected => ("Not connected to {machine}", "未连接到 {machine}"), - L10nKey::RemoteStripConnecting => ("Connecting to {machine}…", "正在连接 {machine}…"), - L10nKey::RemoteStripReconnecting => { - ("Reconnecting to {machine}…", "正在重新连接 {machine}…") - } - L10nKey::RemoteStripReconnectingAttempt => ( - "Reconnecting to {machine}… (attempt {count})", - "正在重新连接 {machine}…(第 {count} 次尝试)", - ), - L10nKey::RemoteStripPreempted => ( - "This workspace was opened on {by}", - "此工作区已在 {by} 上打开", - ), - L10nKey::RemoteStripFailed => ( - "Not connected to {machine} — {error}", - "未连接到 {machine}——{error}", - ), - L10nKey::RemoteNoticePreempted => ( - "Opened elsewhere — typing has no effect", - "已在别处打开——输入无效", - ), - L10nKey::RemoteNoticeDisconnected => { - ("Not connected — typing has no effect", "未连接——输入无效") - } - L10nKey::RemoteActionRetryNow => ("Retry Now", "立即重试"), - L10nKey::RemoteActionTakeBack => ("Take Back", "收回"), - L10nKey::RemoteActionConnect => ("Connect", "连接"), - L10nKey::RemoteActionRetry => ("Retry", "重试"), - L10nKey::RemoteNoConnectionDetails => ( - "This window is a workspace on {machine}, but tty7 has no connection \ - details for it any more — check that its SSH profile or ~/.ssh/config \ - entry still exists.", - "此窗口是 {machine} 上的工作区,但 tty7 已没有它的连接详情——\ - 请检查其 SSH 主机配置或 ~/.ssh/config 条目是否仍然存在。", - ), - L10nKey::RemoteThisComputer => ("this computer", "本机"), - L10nKey::RemoteRestartTitle => ( - "Restart tty7's server on \"{machine}\"?", - "重启 \"{machine}\" 上的 tty7 服务器?", - ), - L10nKey::RemoteRestartBody => ( - "This stops every shell on {machine} — anything still running in them \ - will be terminated, including shells this window is not showing. \ - Workspaces and layouts are kept and come back with fresh shells.", - "这将停止 {machine} 上的所有 shell——其中仍在运行的任何内容都会被终止,\ - 包括此窗口未显示的 shell。工作区和布局会被保留,并以全新的 shell 恢复。", - ), - L10nKey::RemoteReplaceBody => ( - "The tty7-server running on {machine} speaks a protocol this client \ - cannot. tty7 will restart the service there onto one that does, installing it \ - first if {machine} does not already have it.\n\ - \n\ - Every session running on {machine} ends, including any this window is not \ - connected to.", - "{machine} 上运行的 tty7-server 使用了此客户端无法识别的协议。\ - tty7 会在该机器上重启为可识别的服务,如果 {machine} 尚未安装则会先安装。\n\ - \n\ - {machine} 上运行的所有会话都会结束,包括此窗口未连接的会话。", - ), - L10nKey::RemoteRestartFailedTitle => ( - "tty7's server on \"{machine}\" was not restarted", - "\"{machine}\" 上的 tty7 服务器未被重启", - ), - L10nKey::RemoteRestartFailedBody => ( - "{error}\n\ - \n\ - Sessions still running there are on the older build. If they are \ - gone, reconnecting starts this build's server.", - "{error}\n\ - \n\ - 那里仍在运行的会话用的还是旧版本。如果它们已经结束,重新连接就会启动此版本的服务器。", - ), - L10nKey::RemoteHostUnreachable => ( - "could not reach {machine}: {error}", - "无法连接到 {machine}:{error}", - ), - L10nKey::RemoteInstallTitle => ( - "Install tty7's server on \"{machine}\"?", - "在 \"{machine}\" 上安装 tty7 服务器?", - ), - L10nKey::RemoteInstallDetail => ( - "tty7 will write its server binary to {machine} so this machine can host \ - workspaces there. Nothing else on {machine} is touched, and no sudo is used.\n\ - \n\ - {path_label}\u{2003}{path}\n\ - {version_label}\u{2003}{version}\n\ - {size_label}\u{2003}{size}\n\ - {from_label}\u{2003}{from}\n\ - {sha_label}\u{2003}{sha256}\n\ - \n\ - {silent_upgrades}", - "tty7 会将其服务器二进制文件写入 {machine},以便本机可以在那里托管\ - 工作区。{machine} 上的其他内容不会被修改,也不会使用 sudo。\n\ - \n\ - {path_label}\u{2003}{path}\n\ - {version_label}\u{2003}{version}\n\ - {size_label}\u{2003}{size}\n\ - {from_label}\u{2003}{from}\n\ - {sha_label}\u{2003}{sha256}\n\ - \n\ - {silent_upgrades}", - ), - L10nKey::RemoteInstallPathLabel => ("Path", "路径"), - L10nKey::RemoteInstallVersionLabel => ("Version", "版本"), - L10nKey::RemoteInstallSizeLabel => ("Size", "大小"), - L10nKey::RemoteInstallFromLabel => ("From", "来源"), - L10nKey::RemoteInstallShaLabel => ("SHA-256", "SHA-256"), - L10nKey::RemoteInstallSilentUpgrades => ( - "Later upgrades on this machine install silently.", - "此后在该机器上的升级将静默安装。", - ), - L10nKey::RemoteInstallBytes => ("bytes", "字节"), - L10nKey::RemoteMismatchTitle => ( - "Update tty7's server on \"{machine}\"?", - "更新 \"{machine}\" 上的 tty7 服务器端?", - ), - L10nKey::RemoteMismatchDetail => ( - "{machine} is serving tty7 sessions from {running}, which speaks a protocol \ - this client ({wanted}) cannot. tty7 has installed a matching server there, \ - but the one already running is the one your sessions are on.\n\ - \n\ - {replace_server}\u{2003}replaces it with {wanted} and ends every session it is hosting.\n\ - {cancel}\u{2003}leaves {machine} exactly as it is. This window will not connect.", - "{machine} 正在使用 {running} 提供 tty7 会话,该版本使用的协议无法被\ - 此客户端({wanted})识别。tty7 已在那里安装了匹配的服务器端,\ - 但正在运行的是你当前会话所在的版本。\n\ - \n\ - {replace_server}\u{2003}会将其替换为 {wanted} 并结束其托管的所有会话。\n\ - {cancel}\u{2003}会保持 {machine} 现状不变。此窗口将不会连接。", - ), - L10nKey::RemoteMismatchReplaceServer => ("Update Server", "更新服务器端"), - L10nKey::RemoteMismatchUnknownBuild => ("an unknown build", "未知构建"), - L10nKey::RemoteMismatchUnknownBuildFromExe => { - ("an unknown build (from {exe})", "未知构建(来自 {exe})") - } - L10nKey::RemoteDaemonStartFailed => ( - "tty7's local server could not be started: {error}", - "无法启动 tty7 本地服务器:{error}", - ), - L10nKey::RemoteDaemonUnreachable => ( - "could not reach tty7's local server: {error}", - "无法连接到 tty7 本地服务器:{error}", - ), - L10nKey::RemoteDaemonTooOld => ( - "this machine's tty7 daemon is an older build and cannot restart the server on \ - {machine}. Quit tty7 (which stops the daemon) and open it again, then retry.", - "此机器上的 tty7 守护进程版本较旧,无法重启 {machine} 上的服务器。\ - 请退出 tty7(这会停止守护进程)并重新打开,然后重试。", - ), - L10nKey::RemoteProfileMissing => ( - "that saved SSH profile no longer exists", - "该已保存的 SSH 主机配置已不存在", - ), - L10nKey::RemoteAliasMissing => ( - "`{alias}` is no longer in ~/.ssh/config", - "`{alias}` 已不再位于 ~/.ssh/config 中", - ), - L10nKey::RemoteWslNoSsh => ( - "a WSL workspace has no SSH connection", - "WSL 工作区没有 SSH 连接", - ), - L10nKey::RemoteLocalStdioNoSsh => ( - "a local --stdio workspace has no SSH connection", - "本地 --stdio 工作区没有 SSH 连接", - ), - L10nKey::RemoteHostNotTty7 => ( - "{machine} answered, but not as a tty7 server: {error}", - "{machine} 已响应,但并非作为 tty7 服务器:{error}", - ), - L10nKey::RemoteWorkspaceListFailed => ( - "connected to {machine}, but its workspace list failed: {error}", - "已连接到 {machine},但其工作区列表获取失败:{error}", - ), - L10nKey::RemoteServerRestartFailed => ( - "could not restart tty7's server on {machine}: {error}", - "无法重启 {machine} 上的 tty7 服务器:{error}", - ), - L10nKey::RemoteNoRouteToHost => ( - "tty7 no longer has a way to reach {machine}", - "tty7 已无法到达 {machine}", - ), - L10nKey::RemoteMachineTreeUnexpectedReply => ( - "the server answered a machine tree with {reply}", - "服务器用 {reply} 回复了机器树请求", - ), - L10nKey::RemoteMismatchVersionFromExe => { - ("{version} (from {exe})", "{version}(来自 {exe})") - } - L10nKey::AppNoRunningCodingAgent => ( - "No running coding agent found — start one (claude, codex, …) in a pane first.", - "未找到运行中的编码 agent——请先在某个窗格中启动一个(claude、codex 等)。", - ), - L10nKey::SwitcherThisComputer => ("This Computer", "本机"), - L10nKey::SwitcherRestartingServer => ("Restarting tty7's server…", "正在重启 tty7 服务器…"), - L10nKey::SwitcherDownloadingServerWithTotal => ( - "Downloading tty7's server… {done} / {total}", - "正在下载 tty7 服务器… {done} / {total}", - ), - L10nKey::SwitcherDownloadingServerNoTotal => ( - "Downloading tty7's server… {done}", - "正在下载 tty7 服务器… {done}", - ), - L10nKey::SwitcherCopyingServer => ( - "Copying tty7's server… {done} / {total}", - "正在复制 tty7 服务器… {done} / {total}", - ), - L10nKey::SwitcherThisWindow => ("this window", "当前窗口"), - L10nKey::SwitcherOpen => ("open", "已打开"), - L10nKey::SwitcherDisconnect => ("Disconnect", "断开连接"), - L10nKey::SwitcherOpenInNewWindow => ("Open in New Window", "在新窗口中打开"), - L10nKey::SwitcherRename => ("Rename…", "重命名…"), - L10nKey::SshPromptPasswordFor => ("Password for {user}@{host}", "{user}@{host} 的密码"), - L10nKey::SshPromptPassphraseFor => ("Passphrase for {key_path}", "{key_path} 的密码短语"), - L10nKey::SshPromptTwoFactor => ("Two-factor authentication", "双因素认证"), - L10nKey::SshPromptUnknownHost => ("Unknown host {host}", "未知主机 {host}"), - L10nKey::SshPromptHostKeyChanged => ( - "Host key CHANGED — possible man-in-the-middle", - "主机密钥已更改——可能存在中间人攻击", - ), - L10nKey::SshPromptHostKeyChangedBody => ( - "The host key differs from the one previously trusted. This may be an attack.", - "主机密钥与之前信任的密钥不同,这可能是一次攻击。", - ), - L10nKey::SshPromptConnect => ("Connect", "连接"), - L10nKey::SshPromptUnlock => ("Unlock", "解锁"), - L10nKey::SshPromptSubmit => ("Submit", "提交"), - L10nKey::HostOpsError => ("{context}: {error}", "{context}:{error}"), - L10nKey::CmdGroupTabsPanes => ("Tabs & Panes", "标签页与窗格"), - L10nKey::CmdGroupWorkspaces => ("Workspaces", "工作区"), - L10nKey::CmdGroupView => ("View", "视图"), - L10nKey::CmdGroupTerminal => ("Terminal", "终端"), - L10nKey::CmdGroupSsh => ("SSH", "SSH"), - L10nKey::CmdGroupAgents => ("Agents", "Agents"), - L10nKey::CmdGroupApplication => ("Application", "应用"), - L10nKey::CmdNewTab => ("New Tab", "新标签页"), - L10nKey::CmdNewWorktreeTab => ("New Worktree Tab", "新建 worktree 标签页"), - L10nKey::CmdNewWorktreeTabSubtitle => ( - "isolated checkout on a fresh branch", - "在全新分支上独立检出", - ), - L10nKey::CmdRenameTab => ("Rename Tab…", "重命名标签页…"), - L10nKey::CmdSplitRight => ("Split Right", "向右分屏"), - L10nKey::CmdSplitDown => ("Split Down", "向下分屏"), - L10nKey::CmdZoomPane => ("Zoom Pane", "缩放窗格"), - L10nKey::CmdNextPane => ("Next Pane", "下一窗格"), - L10nKey::CmdPreviousPane => ("Previous Pane", "上一窗格"), - L10nKey::CmdFocusPaneLeft => ("Focus Pane Left", "聚焦左侧窗格"), - L10nKey::CmdFocusPaneRight => ("Focus Pane Right", "聚焦右侧窗格"), - L10nKey::CmdFocusPaneUp => ("Focus Pane Up", "聚焦上方窗格"), - L10nKey::CmdFocusPaneDown => ("Focus Pane Down", "聚焦下方窗格"), - L10nKey::CmdResizePaneLeft => ("Resize Pane Left", "向左调整窗格"), - L10nKey::CmdResizePaneRight => ("Resize Pane Right", "向右调整窗格"), - L10nKey::CmdResizePaneUp => ("Resize Pane Up", "向上调整窗格"), - L10nKey::CmdResizePaneDown => ("Resize Pane Down", "向下调整窗格"), - L10nKey::CmdSwapPaneNext => ("Swap Pane Next", "与下一窗格交换"), - L10nKey::CmdSwapPanePrevious => ("Swap Pane Previous", "与上一窗格交换"), - L10nKey::CmdNextTab => ("Next Tab", "下一标签页"), - L10nKey::CmdPreviousTab => ("Previous Tab", "上一标签页"), - L10nKey::CmdCopyWorkingDirectory => ("Copy Working Directory", "复制工作目录"), - L10nKey::CmdCopySessionId => ("Copy Session ID", "复制会话 ID"), - L10nKey::CmdCopySessionIdSubtitle => ( - "the coding agent's own session id", - "编码 agent 自身的会话 ID", - ), - L10nKey::CmdForkSession => ("Fork Session", "Fork 会话"), - L10nKey::CmdForkSessionSubtitle => ( - "branch this agent session into a new tab", - "将此 agent 会话 fork 到新标签页", - ), - L10nKey::CmdMarkTabAsUnread => ("Mark Tab as Unread", "将标签页标记为未读"), - L10nKey::CmdClosePaneTab => ("Close Pane / Tab", "关闭窗格/标签页"), - L10nKey::CmdCloseOtherTabs => ("Close Other Tabs", "关闭其他标签页"), - L10nKey::CmdCloseTabsToTheRight => ("Close Tabs to the Right", "关闭右侧标签页"), - L10nKey::CmdReopenClosedTab => ("Reopen Closed Tab", "重新打开已关闭标签页"), - L10nKey::CmdNewWorkspace => ("New Workspace", "新建工作区"), - L10nKey::CmdSwitchWorkspace => ("Switch Workspace…", "切换工作区…"), - L10nKey::CmdRenameWorkspace => ("Rename Workspace…", "重命名工作区…"), - L10nKey::CmdStopWorkspace => ("Stop Workspace…", "停止工作区…"), - L10nKey::CmdStopWorkspaceSubtitle => ( - "ends its shells, keeps the layout", - "结束其 shell,保留布局", - ), - L10nKey::CmdDeleteWorkspace => ("Delete Workspace…", "删除工作区…"), - L10nKey::CmdDeleteWorkspaceSubtitle => ( - "ends its shells and forgets the layout", - "结束其 shell,清除布局", - ), - L10nKey::CmdShowLeftSidebar => ("Show Left Sidebar", "显示左侧边栏"), - L10nKey::CmdHideLeftSidebar => ("Hide Left Sidebar", "隐藏左侧边栏"), - L10nKey::CmdHideRightPanel => ("Hide Right Panel", "隐藏右侧面板"), - L10nKey::CmdShowRightPanel => ("Show Right Panel", "显示右侧面板"), - L10nKey::CmdShowCodePanel => ("Show Code Panel", "显示代码面板"), - L10nKey::CmdTabBarMoveToTop => ("Tab Bar: Move to Top", "标签栏:移到顶部"), - L10nKey::CmdTabBarMoveToLeftSidebar => { - ("Tab Bar: Move to Left Sidebar", "标签栏:移到左侧边栏") - } - L10nKey::CmdRightPanelInfo => ("Right Panel: Info", "右侧面板:信息"), - L10nKey::CmdRightPanelChanges => ("Right Panel: Changes", "右侧面板:变更"), - L10nKey::CmdRightPanelFiles => ("Right Panel: Files", "右侧面板:文件"), - L10nKey::CmdChangeTheme => ("Change Theme…", "更改主题…"), - L10nKey::CmdResetFontSize => ("Reset Font Size", "重置字号"), - L10nKey::CmdEnterFullScreen => ("Enter Full Screen", "进入全屏"), - L10nKey::CmdClearScrollback => ("Clear Scrollback", "清除 scrollback"), - L10nKey::CmdFindInTerminal => ("Find in Terminal…", "在终端中查找…"), - L10nKey::CmdFindNext => ("Find Next", "查找下一个"), - L10nKey::CmdFindPrevious => ("Find Previous", "查找上一个"), - L10nKey::CmdCopy => ("Copy", "复制"), - L10nKey::CmdCut => ("Cut", "剪切"), - L10nKey::CmdPaste => ("Paste", "粘贴"), - L10nKey::CmdSelectAll => ("Select All", "全选"), - L10nKey::CmdSshAddConnection => ("SSH: Add Connection…", "SSH:添加连接…"), - L10nKey::CmdSshManageProfiles => ("SSH: Manage Profiles…", "SSH:管理主机配置…"), - L10nKey::CmdSshReconnect => ("SSH: Reconnect", "SSH:重新连接"), - L10nKey::CmdSshRemoteFiles => ("SSH: Remote Files", "SSH:远程文件"), - L10nKey::CmdSshPortForwarding => ("SSH: Port Forwarding", "SSH:端口转发"), - L10nKey::CmdSshConnectWithInput => ("SSH: Connect {input}", "SSH:连接 {input}"), - L10nKey::CmdAgentSendSelection => ("Agent: Send Selection", "Agent:发送选区"), - L10nKey::CmdAgentSendSelectionSubtitle => ( - "selection → running coding agent", - "选区 → 运行中的编码 agent", - ), - L10nKey::CmdAgentSendGitDiffForReview => ( - "Agent: Send Git Diff for Review", - "Agent:发送 git diff 以供审查", - ), - L10nKey::CmdAgentSendGitDiffSubtitle => ( - "git diff → running coding agent", - "git diff → 运行中的编码 agent", - ), - L10nKey::CmdSettings => ("Settings…", "设置…"), - L10nKey::CmdKeyboardShortcuts => ("Keyboard Shortcuts", "键盘快捷键"), - L10nKey::CmdAboutTty7 => ("About tty7", "关于 tty7"), - L10nKey::CmdCheckForUpdates => ("Check for Updates…", "检查更新…"), - L10nKey::CmdDocumentation => ("Documentation", "文档"), - L10nKey::CmdJoinDiscord => ("Join the Discord", "加入 Discord"), - L10nKey::CmdReportIssue => ("Report an Issue…", "报告问题…"), - L10nKey::CmdRestartServer => ("Restart Server…", "重启服务器…"), - L10nKey::CmdRestartServerSubtitle => ( - "ends every running shell; layout is kept", - "结束所有运行中的 shell;保留布局", - ), - L10nKey::CmdQuitTty7 => ("Quit tty7", "退出 tty7"), - L10nKey::CmdQuitTty7Subtitle => ("shells keep running", "shell 保持运行"), - L10nKey::CmdQuickConnect => ("Connect to \"{target}\"", "连接到 \"{target}\""), - L10nKey::CmdQuickConnectSaveProfile => ( - "Save \"{target}\" as profile…", - "将 \"{target}\" 保存为主机配置…", - ), - L10nKey::CmdRecent => ("Recent", "最近使用"), - L10nKey::AppRestartServerTitle => ("Restart Server?", "重启服务器?"), - L10nKey::AppRestartServerMismatchDetail => ( - "The server holding your shells is from another build (v{build}, protocol {protocol} — this app speaks {ours}). You can keep using it and your shells stay, but features whose wire format changed may misbehave until it's restarted. Restarting starts a clean server: tabs reopen with fresh shells and anything running in them is terminated.", - "正在运行你 shell 的服务器来自另一个构建(v{build},协议 {protocol};此应用使用 {ours})。你可以继续使用,shell 也会保留,但协议格式已变更的功能可能会表现异常,直到重启服务器。重启会启动一个干净的服务器:标签页会以全新的 shell 重新打开,其中正在运行的所有内容都会被终止。", - ), - L10nKey::AppRestartServerOldDetail => ( - "The server holding your shells is from an older version of the app. You can keep using it and your shells stay, but newer features may misbehave until it's restarted. Restarting starts a clean server: tabs reopen with fresh shells and anything running in them is terminated.", - "正在运行你 shell 的服务器来自应用的旧版本。你可以继续使用,shell 也会保留,但新功能可能会表现异常,直到重启服务器。重启会启动一个干净的服务器:标签页会以全新的 shell 重新打开,其中正在运行的所有内容都会被终止。", - ), - L10nKey::AppKeepShells => ("Keep Shells", "保留 Shell"), - L10nKey::AppRestart => ("Restart", "重启"), - L10nKey::AppRestartServerNotSsh => ( - "tty7 can only restart the server on machines it reaches over SSH. {label} is served from this computer — stop its workspace instead.", - "tty7 只能重启通过 SSH 连接的机器上的服务器。{label} 由本机提供服务——请改为停止其工作区。", - ), - L10nKey::AppRestartServerBody => ( - "This stops every running shell on this computer — anything still running in them will be terminated. Your tabs and layout are kept and reopened with fresh shells.", - "这会停止本机上所有正在运行的 shell——其中仍在运行的任何内容都会被终止。你的标签页和布局会被保留,并以全新的 shell 重新打开。", - ), - L10nKey::AppWorktreeRemoveDetailDirty => ( - "The closed tab's worktree at {path} has uncommitted changes.", - "位于 {path} 的已关闭标签页的 worktree 有未提交的变更。", - ), - L10nKey::AppWorktreeRemoveDetailClean => ( - "The closed tab's worktree at {path} is clean.", - "位于 {path} 的已关闭标签页的 worktree 是干净的。", - ), - L10nKey::AppWorktreeRemoveTitle => ( - "Remove worktree \"{branch}\"?", - "删除 worktree\"{branch}\"?", - ), - L10nKey::AppWorktreeDiscardAndRemove => ("Discard Changes & Remove", "放弃变更并删除"), - L10nKey::AppWorktreeRemove => ("Remove Worktree", "删除 worktree"), - L10nKey::AppWorktreeKeep => ("Keep", "保留"), - L10nKey::AppReopenTabFailed => ( - "Could not reopen the tab: no terminal started", - "无法重新打开标签页:没有启动终端", - ), - L10nKey::AppOpenTerminalFailed => ( - "Could not open a terminal: {error}", - "无法打开终端:{error}", - ), - L10nKey::AppSshConnectionFailed => { - ("SSH connection failed: {error}", "SSH 连接失败:{error}") - } - L10nKey::AppSshReconnectFailed => { - ("SSH reconnect failed: {error}", "SSH 重新连接失败:{error}") - } - L10nKey::AppSplitPaneFailed => { - ("Could not split the pane: {error}", "无法拆分窗格:{error}") - } - L10nKey::AppWorktreeRemoved => ( - "Removed worktree \"{branch}\"", - "已删除 worktree\"{branch}\"", - ), - L10nKey::AppWorktreeRemoveFailed => ( - "Worktree removal failed: {error}", - "删除 worktree 失败:{error}", - ), - L10nKey::AppForkStillConnecting => ( - "Could not fork: the pane is still connecting", - "无法 fork:窗格仍在连接中", - ), - L10nKey::AppPaneNoCodingAgent => ( - "This pane isn't running a coding agent", - "此窗格未运行编码 agent", - ), - L10nKey::AppForkNoCommand => ( - "tty7 has no fork command for {name}", - "tty7 没有用于 {name} 的 fork 命令", - ), - L10nKey::AppForkLocalOnly => ( - "{name} sessions can only be forked from a local pane", - "{name} 会话只能从本地窗格 fork", - ), - L10nKey::AppForkNoSessionId => ( - "tty7 hasn't seen a {name} session id in this pane — install its hooks in Settings → Agents", - "tty7 尚未在此窗格中看到 {name} 的会话 ID——请在设置 → Agents 中安装其 hook", - ), - L10nKey::AppForkSessionIdNotToken => ( - "{name}'s session id isn't a plain token", - "{name} 的会话 ID 不是普通令牌", - ), - L10nKey::AppForkMidTurn => ( - "{name} is mid-turn — the fork won't include the turn in flight", - "{name} 正在处理中——fork 不会包含进行中的这一轮", - ), - L10nKey::AppTabNoWorkingDirectory => ( - "This tab has no working directory yet", - "此标签页还没有工作目录", - ), - L10nKey::AppNothingSelected => ( - "Nothing selected — select some terminal output first.", - "未选择任何内容——请先选择一些终端输出。", - ), - L10nKey::AppPaneNoKnownDirectory => ( - "This pane has no known directory.", - "此窗格没有已知的目录。", - ), - L10nKey::AppNoUncommittedChanges => ( - "No uncommitted changes in {cwd} (or not a git repository).", - "{cwd} 中没有未提交的更改(或不是 git 仓库)。", - ), - L10nKey::AppCmdSshProfileTitle => ("SSH: {title}", "SSH:{title}"), - L10nKey::AppCmdSwitchToTab => ("Switch to Tab: {label}", "切换到标签页:{label}"), - L10nKey::AppPlaceholderDescription => ("description", "描述"), - L10nKey::AppPlaceholderSshQuickConnect => ( - "user@host or user@host:port", - "user@host 或 user@host:port", - ), - L10nKey::AppPlaceholderLoginShell => ("login shell", "登录 shell"), - L10nKey::AppPlaceholderNone => ("none", "无"), - L10nKey::AppPlaceholderOpenInDefaultApp => ("open in default app", "在默认应用中打开"), - L10nKey::AppThemeColorBackground => ("Background", "背景"), - L10nKey::AppThemeColorForeground => ("Foreground", "前景"), - L10nKey::AppThemeColorAccent => ("Accent", "强调色"), - L10nKey::AppThemeColorCursor => ("Cursor", "光标"), - L10nKey::AppThemeColorSelection => ("Selection", "选区"), - L10nKey::AppAgentHooksThisComputer => ("This Computer", "本机"), - L10nKey::AppAgentHooksRemoteMachine => ("Remote machine", "远程机器"), - L10nKey::AppAgentHooksNoHomeDir => ( - "tty7 could not work out this computer's home directory, so there is nowhere to install to.", - "tty7 无法确定这台计算机的主目录,因此没有可安装的位置。", - ), - L10nKey::AppAgentHooksOffline => ( - "Not connected to this machine, so its agent config can't be read or written. Open a workspace on it and come back.", - "未连接到这台机器,因此无法读取或写入其 agent 配置。请在其上打开一个工作区后再回来。", - ), - L10nKey::AppAgentHooksHomeDirUnresolved => { - ("cannot resolve home directory", "无法解析主目录") - } - L10nKey::AppAgentHooksOpFailed => ("Failed: {error}", "失败:{error}"), - L10nKey::AppKeybindingDisplacedNote => ( - "{action} took the shortcut from {previous}, which is now unset.", - "{action} 占用了原属于 {previous} 的快捷键,{previous} 现在没有快捷键了。", - ), - L10nKey::AppLocalServerName => ("the local server", "本地服务器"), - L10nKey::AppSshParseUnbalancedQuotes => ( - "Unbalanced quotes in the SSH command", - "SSH 命令中的引号不匹配", - ), - L10nKey::AppSshParseNoRemoteCommands => ( - "Remote commands aren't supported here", - "此处不支持远程命令", - ), - L10nKey::AppSshParseFlagNeedsValue => ("-{flag} needs a value", "-{flag} 需要一个值"), - L10nKey::AppSshParseInvalidPort => ("Invalid port \"{value}\"", "无效端口 \"{value}\""), - L10nKey::AppSshParseUnsupportedOption => ( - "Unsupported option \"{option}\"", - "不支持的选项 \"{option}\"", - ), - L10nKey::AppSshParseEnterHost => ("Enter a host to connect to", "输入要连接的主机"), - L10nKey::AppSshParseBadHost => ("Can't parse host \"{host}\"", "无法解析主机 \"{host}\""), - L10nKey::AppMenuMinimize => ("Minimize", "最小化"), - L10nKey::AppMenuZoom => ("Zoom", "缩放"), - L10nKey::SwitcherStatusRestarting => ("restarting…", "正在重启…"), - L10nKey::SwitcherStatusInstalling => ("installing…", "正在安装…"), - L10nKey::SwitcherStatusConnecting => ("connecting…", "正在连接…"), - L10nKey::SwitcherStatusConnectFailed => ("couldn't connect", "连接失败"), - L10nKey::SwitcherStatusNotConnected => ("not connected", "未连接"), - L10nKey::SettingsFontDefault => ("Default (match primary)", "默认(匹配主字体)"), - L10nKey::ForwardDescriptionPlaceholder => ("what it's for", "用途说明"), - L10nKey::SettingsShellDefaultLoginShell => ("your login shell", "你的登录 shell"), - L10nKey::SftpErrorUnexpectedReply => ("unexpected reply: {reply}", "意外回复:{reply}"), - L10nKey::SftpErrorUnsafeRemoteName => ( - "refusing unsafe remote name {name}", - "拒绝不安全的远程名称 {name}", - ), - L10nKey::SftpErrorInvalidOctalMode => ("invalid octal mode", "无效的八进制模式"), - L10nKey::PanelMoreChangedFiles => ( - "… and {count} more changed files — run `git diff` to see them.", - "…还有 {count} 个变更文件——运行 `git diff` 查看。", - ), - L10nKey::PanelUntracked => ("{count} untracked", "{count} 个未跟踪文件"), - L10nKey::AppMenuAbout => ("About tty7", "关于 tty7"), - L10nKey::AppMenuCheckForUpdates => ("Check for Updates…", "检查更新…"), - L10nKey::AppMenuSettings => ("Settings…", "设置…"), - L10nKey::AppMenuServices => ("Services", "服务"), - L10nKey::AppMenuHideApp => ("Hide tty7", "隐藏 tty7"), - L10nKey::AppMenuHideOthers => ("Hide Others", "隐藏其他"), - L10nKey::AppMenuShowAll => ("Show All", "显示全部"), - L10nKey::AppMenuQuit => ("Quit tty7", "退出 tty7"), - L10nKey::AppMenuFile => ("File", "文件"), - L10nKey::AppMenuEdit => ("Edit", "编辑"), - L10nKey::AppMenuView => ("View", "视图"), - L10nKey::AppMenuWindow => ("Window", "窗口"), - L10nKey::AppMenuHelp => ("Help", "帮助"), - L10nKey::AppMenuNewTab => ("New Tab", "新标签页"), - L10nKey::AppMenuNewWorkspace => ("New Workspace", "新工作区"), - L10nKey::AppMenuNewWorktreeTab => ("New Worktree Tab", "新 worktree 标签页"), - L10nKey::AppMenuSplitRight => ("Split Right", "向右分屏"), - L10nKey::AppMenuSplitDown => ("Split Down", "向下分屏"), - L10nKey::AppMenuRenameTab => ("Rename Tab…", "重命名标签页…"), - L10nKey::AppMenuCopyWorkingDirectory => ("Copy Working Directory", "复制工作目录"), - L10nKey::AppMenuCopySessionId => ("Copy Session ID", "复制会话 ID"), - L10nKey::AppMenuForkSession => ("Fork Session", "Fork 会话"), - L10nKey::AppMenuClosePaneTab => ("Close Pane / Tab", "关闭窗格 / 标签页"), - L10nKey::AppMenuCloseOtherTabs => ("Close Other Tabs", "关闭其他标签页"), - L10nKey::AppMenuCloseTabsRight => ("Close Tabs to the Right", "关闭右侧标签页"), - L10nKey::AppMenuReopenClosedTab => ("Reopen Closed Tab", "重新打开已关闭的标签页"), - L10nKey::AppMenuRenameWorkspace => ("Rename Workspace…", "重命名工作区…"), - L10nKey::AppMenuStopWorkspace => ("Stop Workspace…", "停止工作区…"), - L10nKey::AppMenuDeleteWorkspace => ("Delete Workspace…", "删除工作区…"), - L10nKey::AppMenuUndo => ("Undo", "撤销"), - L10nKey::AppMenuRedo => ("Redo", "重做"), - L10nKey::AppMenuCut => ("Cut", "剪切"), - L10nKey::AppMenuCopy => ("Copy", "复制"), - L10nKey::AppMenuPaste => ("Paste", "粘贴"), - L10nKey::AppMenuSelectAll => ("Select All", "全选"), - L10nKey::AppMenuFind => ("Find…", "查找…"), - L10nKey::AppMenuFindNext => ("Find Next", "查找下一个"), - L10nKey::AppMenuFindPrevious => ("Find Previous", "查找上一个"), - L10nKey::AppMenuCommandPalette => ("Command Palette…", "命令面板…"), - L10nKey::AppMenuIncreaseFontSize => ("Increase Font Size", "增大字号"), - L10nKey::AppMenuDecreaseFontSize => ("Decrease Font Size", "减小字号"), - L10nKey::AppMenuResetFontSize => ("Reset Font Size", "重置字号"), - L10nKey::AppMenuLeftSidebar => ("Left Sidebar", "左侧边栏"), - L10nKey::AppMenuRightPanel => ("Right Panel", "右侧面板"), - L10nKey::AppMenuCodePanel => ("Code Panel", "代码面板"), - L10nKey::AppMenuTabBarPosition => ("Tab Bar Position", "标签栏位置"), - L10nKey::AppMenuFocusNextPane => ("Focus Next Pane", "聚焦下一个窗格"), - L10nKey::AppMenuFocusPreviousPane => ("Focus Previous Pane", "聚焦上一个窗格"), - L10nKey::AppMenuZoomPane => ("Zoom Pane", "缩放窗格"), - L10nKey::AppMenuClearScrollback => ("Clear Scrollback", "清除 scrollback"), - L10nKey::AppMenuEnterFullscreen => ("Enter Full Screen", "进入全屏"), - L10nKey::AppMenuDocumentation => ("tty7 Documentation", "tty7 文档"), - L10nKey::AppMenuKeyboardShortcuts => ("Keyboard Shortcuts", "键盘快捷键"), - L10nKey::AppMenuJoinDiscord => ("Join the Discord", "加入 Discord"), - L10nKey::AppMenuReportIssue => ("Report an Issue…", "报告问题…"), - L10nKey::AppMenuRestartServer => ("Restart Server…", "重启服务器…"), - L10nKey::WindowUntitled => ("Untitled", "未命名"), - L10nKey::TrayShowTty7 => ("Show tty7", "显示 tty7"), - L10nKey::TrayNotifications => ("Notifications", "通知"), - L10nKey::TrayAgentNeedsInput => ("needs input", "需要输入"), - L10nKey::NotifyCommandFinished => ( - "Command finished after {secs}s", - "命令运行完成,用时 {secs} 秒", - ), - L10nKey::NotifyCommandFinishedWithCommand => ( - "{command} — finished after {secs}s", - "{command} 已完成,用时 {secs} 秒", - ), - L10nKey::NotifyAgentFinished => ("Finished after {secs}s", "已完成,用时 {secs} 秒"), - L10nKey::NotifyAgentWaiting => ("Waiting for your input", "等待你的输入"), - L10nKey::NotifyTurnFinished => ("Turn finished", "本轮已完成"), - L10nKey::TabTooltipMore => ("More", "更多"), - L10nKey::TabTooltipShowSidebar => ("Show Sidebar", "显示侧栏"), - L10nKey::TabTooltipHideSidebar => ("Hide Sidebar", "隐藏侧栏"), - L10nKey::TabTooltipHideDetailPanel => ("Hide Detail Panel", "隐藏详情面板"), - L10nKey::TabTooltipShowDetailPanel => ("Show Detail Panel", "显示详情面板"), - L10nKey::TabUnnamedShell => ("Shell {n}", "终端 {n}"), - L10nKey::ShellDefault => ("default", "默认"), - L10nKey::SidebarScratchGroup => ("Scratch", "草稿"), - L10nKey::TabContextCloseTab => ("Close Tab", "关闭标签页"), - L10nKey::TabContextCloseTabsBelow => ("Close Tabs Below", "关闭下方标签页"), - L10nKey::TabContextMarkUnread => ("Mark as Unread", "标记为未读"), - }; - match locale { - Locale::En => en, - Locale::ZhHans => zh, - } -} - -fn translate_variant(locale: Locale, key: L10nKey, branch: &'static str) -> &'static str { - use L10nKey::*; - let (en, zh) = match (key, branch) { - // --- Settings aliases --- - (SettingsAliasesLinked, "zero") => ("No aliases linked yet.", "还没有关联别名。"), - (SettingsAliasesLinked, "one") => ("1 alias linked.", "已关联 1 个别名。"), - (SettingsAliasesLinked, "other") => ("{count} aliases linked.", "已关联 {count} 个别名。"), - - // --- Settings forward rules --- - (SettingsRulesOpenedWithConnection, "zero") => ( - "0 rules, opened with the connection", - "0 条规则,随连接打开", - ), - (SettingsRulesOpenedWithConnection, "one") => { - ("1 rule, opened with the connection", "1 条规则,随连接打开") - } - (SettingsRulesOpenedWithConnection, "other") => ( - "{count} rules, opened with the connection", - "{count} 条规则,随连接打开", - ), - - // --- Offline machines --- - (SettingsOfflineMachines, "zero") => ( - "0 more saved machines are not connected — open a workspace on one to install its hooks there.", - "还有 0 台已保存的机器未连接——在其中一台上打开工作区,即可在那台机器上安装 hook。", - ), - (SettingsOfflineMachines, "one") => ( - "1 more saved machine is not connected — open a workspace on it to install its hooks there.", - "还有 1 台已保存的机器未连接——在那台机器上打开工作区,即可在那里安装 hook。", - ), - (SettingsOfflineMachines, "other") => ( - "{count} more saved machines are not connected — open a workspace on one to install its hooks there.", - "还有 {count} 台已保存的机器未连接——在其中一台上打开工作区,即可在那台机器上安装 hook。", - ), - - // --- Panel untracked files --- - (PanelUntracked, "zero") => ("0 untracked", "0 个未跟踪文件"), - (PanelUntracked, "one") => ("1 untracked", "1 个未跟踪文件"), - (PanelUntracked, "other") => ("{count} untracked", "{count} 个未跟踪文件"), - - // --- Panel more changed files --- - (PanelMoreChangedFiles, "zero") => ( - "… and 0 more changed files — run `git diff` to see them.", - "…还有 0 个变更文件——运行 `git diff` 查看。", - ), - (PanelMoreChangedFiles, "one") => ( - "… and 1 more changed file — run `git diff` to see it.", - "…还有 1 个变更文件——运行 `git diff` 查看。", - ), - (PanelMoreChangedFiles, "other") => ( - "… and {count} more changed files — run `git diff` to see them.", - "…还有 {count} 个变更文件——运行 `git diff` 查看。", - ), - - // --- Diff summary counts --- - (DiffChangedFiles, "zero") => ("0 changed files", "0 个变更文件"), - (DiffChangedFiles, "one") => ("1 changed file", "1 个变更文件"), - (DiffChangedFiles, "other") => ("{count} changed files", "{count} 个变更文件"), - (DiffUntrackedCount, "zero") => (" · 0 untracked", " · 0 个未跟踪文件"), - (DiffUntrackedCount, "one") => (" · 1 untracked", " · 1 个未跟踪文件"), - (DiffUntrackedCount, "other") => (" · {count} untracked", " · {count} 个未跟踪文件"), - (DiffMoreFiles, "zero") => ( - "… and 0 more changed files — run `git diff` in the terminal to see them.", - "…还有 0 个变更文件——在终端中运行 `git diff` 查看。", - ), - (DiffMoreFiles, "one") => ( - "… and 1 more changed file — run `git diff` in the terminal to see it.", - "…还有 1 个变更文件——在终端中运行 `git diff` 查看。", - ), - (DiffMoreFiles, "other") => ( - "… and {count} more changed files — run `git diff` in the terminal to see them.", - "…还有 {count} 个变更文件——在终端中运行 `git diff` 查看。", - ), - (DiffUntrackedHeader, "zero") => ("Untracked files (0)", "未跟踪文件 (0)"), - (DiffUntrackedHeader, "one") => ("Untracked files (1)", "未跟踪文件 (1)"), - (DiffUntrackedHeader, "other") => ("Untracked files ({count})", "未跟踪文件 ({count})"), - (DiffMoreUntracked, "zero") => ( - "… and 0 more — run `git status` in the terminal to see them.", - "…还有 0 个——在终端中运行 `git status` 查看。", - ), - (DiffMoreUntracked, "one") => ( - "… and 1 more — run `git status` in the terminal to see it.", - "…还有 1 个——在终端中运行 `git status` 查看。", - ), - (DiffMoreUntracked, "other") => ( - "… and {count} more — run `git status` in the terminal to see them.", - "…还有 {count} 个——在终端中运行 `git status` 查看。", - ), - (DiffUntrackedSummary, "zero") => ("0 untracked", "0 个未跟踪"), - (DiffUntrackedSummary, "one") => ("1 untracked", "1 个未跟踪"), - (DiffUntrackedSummary, "other") => ("{count} untracked", "{count} 个未跟踪"), - - // --- Home relative time --- - (HomeTimeMinutesAgo, "one") => ("1 min ago", "1 分钟前"), - (HomeTimeMinutesAgo, "other") => ("{count} min ago", "{count} 分钟前"), - (HomeTimeHoursAgo, "one") => ("1 hour ago", "1 小时前"), - (HomeTimeHoursAgo, "other") => ("{count} hours ago", "{count} 小时前"), - (HomeTimeDaysAgo, "one") => ("1 day ago", "1 天前"), - (HomeTimeDaysAgo, "other") => ("{count} days ago", "{count} 天前"), - - // --- Window stop/delete shells --- - (WindowStopShells, "zero") => ( - "Its layout and working directories will be forgotten.", - "其布局和工作目录将被清除。", - ), - (WindowStopShells, "one") => ( - "1 running shell will be ended.", - "1 个正在运行的 shell 将会被终止。", - ), - (WindowStopShells, "other") => ( - "{count} running shells will be ended.", - "{count} 个正在运行的 shell 将会被终止。", - ), - (WindowDeleteShells, "zero") => ( - "Its layout and working directories will be forgotten.", - "其布局和工作目录将被清除。", - ), - (WindowDeleteShells, "one") => ( - "1 running shell will be ended and its layout forgotten.", - "1 个正在运行的 shell 将会被终止,其布局也将被清除。", - ), - (WindowDeleteShells, "other") => ( - "{count} running shells will be ended and the layout forgotten.", - "{count} 个正在运行的 shell 将会被终止,布局也将被清除。", - ), - - _ => return t(key), - }; - match locale { - Locale::En => en, - Locale::ZhHans => zh, - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn zh_translations_cover_the_initial_keys() { - for key in [ - L10nKey::SearchTabs, - L10nKey::SearchFiles, - L10nKey::SearchThemes, - L10nKey::SearchSettings, - L10nKey::FilterHosts, - L10nKey::SearchCommandsOrHost, - L10nKey::SearchTheme, - L10nKey::Search, - L10nKey::SearchWorkspacesAndMachines, - L10nKey::SearchFonts, - L10nKey::NewFolderName, - L10nKey::NewFileName, - L10nKey::HomeNewTab, - L10nKey::HomeReopenClosedTab, - L10nKey::HomeSwitchWorkspace, - L10nKey::HomeCommandPalette, - L10nKey::HomeSplitRight, - L10nKey::HomeSplitDown, - L10nKey::HomeSettings, - L10nKey::TrayQuitStopServer, - L10nKey::Reconnect, - L10nKey::None, - L10nKey::TryAgain, - L10nKey::Refreshing, - L10nKey::Binary, - L10nKey::Delete, - L10nKey::NoMatchingCommands, - L10nKey::ConnectSshHint, - L10nKey::EditHint, - L10nKey::OpenFileFromTree, - L10nKey::FileChangedOnDisk, - L10nKey::Reload, - L10nKey::KeepMine, - L10nKey::Dismiss, - L10nKey::StoredPasswordRejected, - L10nKey::Trust, - L10nKey::Abort, - L10nKey::HostKeyOverrideMessage, - L10nKey::Override, - L10nKey::RememberKeychain, - L10nKey::CloseWindowTitle, - L10nKey::CloseWindowBody, - L10nKey::Cancel, - L10nKey::Close, - L10nKey::QuitStopServerTitle, - L10nKey::QuitStopServerBody, - L10nKey::QuitAndStop, - L10nKey::CloseSshConnectionTitle, - L10nKey::CloseSshConnectionBody, - L10nKey::Keep, - L10nKey::SettingsNavAppearance, - L10nKey::SettingsNavTerminal, - L10nKey::SettingsNavInput, - L10nKey::SettingsNavSsh, - L10nKey::SettingsNavAgents, - L10nKey::SettingsNavWindowTabs, - L10nKey::SettingsNavKeybindings, - L10nKey::SettingsNavAbout, - L10nKey::SettingsHeader, - L10nKey::Reset, - L10nKey::Save, - L10nKey::Connect, - L10nKey::Download, - L10nKey::Link, - L10nKey::SettingsThemeIntroTitle, - L10nKey::SettingsThemeIntroDesc, - L10nKey::SettingsTypography, - L10nKey::SettingsFontSize, - L10nKey::SettingsFontSizeDesc, - L10nKey::SettingsLineHeight, - L10nKey::SettingsLineHeightDesc, - L10nKey::SettingsFontFamily, - L10nKey::SettingsFontFamilyDesc, - L10nKey::SettingsBoldFont, - L10nKey::SettingsBoldFontDesc, - L10nKey::SettingsItalicFont, - L10nKey::SettingsItalicFontDesc, - L10nKey::SettingsFontLigatures, - L10nKey::SettingsFontLigaturesDesc, - L10nKey::SettingsCursor, - L10nKey::SettingsCursorShape, - L10nKey::SettingsCursorShapeDesc, - L10nKey::SettingsCursorBlink, - L10nKey::SettingsCursorBlinkDesc, - L10nKey::SettingsTransparency, - L10nKey::SettingsOpacity, - L10nKey::SettingsOpacityDesc, - L10nKey::SettingsBlur, - L10nKey::SettingsBlurDesc, - L10nKey::FollowTheme, - L10nKey::SettingsDimInactivePanes, - L10nKey::SettingsDimInactivePanesDesc, - L10nKey::SettingsOpenThemesFolder, - L10nKey::SettingsChangeThemeImage, - L10nKey::SettingsChooseThemeImage, - L10nKey::SettingsRemoveThemeImage, - L10nKey::SettingsImageOpacity, - L10nKey::SettingsImageOpacityDesc, - L10nKey::SettingsEditTheme, - L10nKey::SettingsEditThemeIntro, - L10nKey::SettingsBackgroundImage, - L10nKey::SettingsBackgroundImageDesc, - L10nKey::SettingsAnsiColors, - L10nKey::SettingsCustomThemes, - L10nKey::SettingsCustomThemesIntro, - L10nKey::SettingsDuplicateToEdit, - L10nKey::SettingsHosts, - L10nKey::SettingsDefaults, - L10nKey::SettingsInheritedByEveryHost, - L10nKey::SettingsNoSavedHosts, - L10nKey::SettingsNothingMatches, - L10nKey::SettingsInTty7, - L10nKey::SettingsImportFromSshConfig, - L10nKey::SettingsExpandAllGroups, - L10nKey::SettingsNoHostsYet, - L10nKey::SettingsNothingSelected, - L10nKey::SettingsTypeAddressToConnect, - L10nKey::SettingsMoreInSshConfig, - L10nKey::SettingsAliasesLinked, - L10nKey::SettingsImportAliases, - L10nKey::SettingsImportAliasesDesc, - L10nKey::SettingsImportNow, - L10nKey::SettingsDefaultsIntro, - L10nKey::SettingsCopyAddress, - L10nKey::SettingsDuplicate, - L10nKey::SettingsForgetPassword, - L10nKey::SettingsForgotPasswordFor, - L10nKey::SettingsCouldntForgetPassword, - L10nKey::SettingsSecurity, - L10nKey::SettingsSecurityIntro, - L10nKey::SettingsVerifyHostKeys, - L10nKey::SettingsVerifyHostKeysDesc, - L10nKey::WarnBeforeClosing, - L10nKey::SettingsWarnBeforeClosingDesc, - L10nKey::SettingsNewHost, - L10nKey::SettingsName, - L10nKey::SettingsNameDesc, - L10nKey::SettingsHost, - L10nKey::SettingsHostDesc, - L10nKey::SettingsUser, - L10nKey::SettingsUserDesc, - L10nKey::SettingsAuth, - L10nKey::SettingsAuthDesc, - L10nKey::SettingsAuthModeAuto, - L10nKey::SettingsAuthModePassword, - L10nKey::SettingsAuthModeKey, - L10nKey::SettingsAuthModeAgent, - L10nKey::SettingsAuthMode2Fa, - L10nKey::SettingsJumpHost, - L10nKey::SettingsJumpHostDesc, - L10nKey::SettingsNoneSummary, - L10nKey::SettingsNoneLower, - L10nKey::SettingsPortForwarding, - L10nKey::SettingsRulesOpenedWithConnection, - L10nKey::SettingsAddRule, - L10nKey::SettingsFwdLegendLocal, - L10nKey::SettingsFwdLegendRemote, - L10nKey::SettingsFwdLegendDynamic, - L10nKey::SettingsFwdNeedsBoth, - L10nKey::SettingsFwdNeedsListen, - L10nKey::SettingsAdvanced, - L10nKey::SettingsAdvancedSummary, - L10nKey::SettingsIdentityFiles, - L10nKey::SettingsIdentityFilesDesc, - L10nKey::SettingsAgentForwarding, - L10nKey::SettingsAgentForwardingDesc, - L10nKey::SettingsProxyCommand, - L10nKey::SettingsProxyCommandDesc, - L10nKey::SettingsSocks5Proxy, - L10nKey::SettingsSocks5ProxyDesc, - L10nKey::SettingsHttpProxy, - L10nKey::SettingsHttpProxyDesc, - L10nKey::SettingsKexAlgorithms, - L10nKey::SettingsKexAlgorithmsDesc, - L10nKey::SettingsCiphers, - L10nKey::SettingsCiphersDesc, - L10nKey::SettingsMacs, - L10nKey::SettingsMacsDesc, - L10nKey::SettingsHostKeyAlgorithms, - L10nKey::SettingsHostKeyAlgorithmsDesc, - L10nKey::SettingsCompression, - L10nKey::SettingsJumpHostVia, - L10nKey::SettingsConnected, - L10nKey::SettingsProfileCopied, - L10nKey::SettingsCompressionDesc, - L10nKey::SettingsKeepaliveInterval, - L10nKey::SettingsKeepaliveIntervalDesc, - L10nKey::SettingsKeepaliveCountMax, - L10nKey::SettingsKeepaliveCountMaxDesc, - L10nKey::SettingsConnectTimeout, - L10nKey::SettingsConnectTimeoutDesc, - L10nKey::SettingsX11Forwarding, - L10nKey::SettingsX11ForwardingDesc, - L10nKey::SettingsShellIntegration, - L10nKey::SettingsShellIntegrationDesc, - L10nKey::SettingsLoginScripts, - L10nKey::SettingsLoginScriptsDesc, - L10nKey::SettingsSkipBanner, - L10nKey::SettingsSkipBannerDesc, - L10nKey::SettingsDefaultFollowsDefaults, - L10nKey::SettingsValueOn, - L10nKey::SettingsValueOff, - L10nKey::SettingsDefault, - L10nKey::SettingsOn, - L10nKey::SettingsOff, - L10nKey::SettingsShell, - L10nKey::SettingsShellIntro, - L10nKey::SettingsProgram, - L10nKey::SettingsProgramDesc, - L10nKey::SettingsArguments, - L10nKey::SettingsArgumentsDesc, - L10nKey::SettingsStartIn, - L10nKey::SettingsStartInDesc, - L10nKey::SettingsCustomPath, - L10nKey::SettingsCustomPathDesc, - L10nKey::SettingsWdInherit, - L10nKey::SettingsWdHome, - L10nKey::SettingsWdCustom, - L10nKey::SettingsShellFooter, - L10nKey::SettingsScrolling, - L10nKey::SettingsScrollback, - L10nKey::SettingsScrollbackDesc, - L10nKey::SettingsScrollSpeed, - L10nKey::SettingsScrollSpeedDesc, - L10nKey::SettingsMouse, - L10nKey::SettingsFocusFollowsMouseDesc, - L10nKey::SettingsHideMouseWhileTypingDesc, - L10nKey::SettingsReportMouseToAppsDesc, - L10nKey::SettingsBell, - L10nKey::SettingsTerminalBellDesc, - L10nKey::SettingsLinks, - L10nKey::SettingsDetectUrlsDesc, - L10nKey::SettingsForwardSshLoopbackLinksDesc, - L10nKey::SettingsOpenFilesWithDesc, - L10nKey::SettingsBellModeOff, - L10nKey::SettingsBellModeVisual, - L10nKey::SettingsBellModeAudible, - L10nKey::SettingsBellModeBoth, - L10nKey::SettingsPrompt, - L10nKey::SettingsPromptIntro, - L10nKey::SettingsTabCompletionDesc, - L10nKey::SettingsHistorySearchDesc, - L10nKey::SettingsSelectionClipboard, - L10nKey::SettingsSmartSelectionDesc, - L10nKey::SettingsCopyOnSelectDesc, - L10nKey::SettingsTrimTrailingSpacesDesc, - L10nKey::SettingsKeyboard, - L10nKey::SettingsOptionAsMetaDesc, - L10nKey::SettingsAgentsIntro, - L10nKey::SettingsAgentsIntroDesc, - L10nKey::SettingsReadingAgentConfig, - L10nKey::SettingsStatusNotInstalled, - L10nKey::SettingsStatusInstalled, - L10nKey::SettingsStatusOutdated, - L10nKey::SettingsInstall, - L10nKey::SettingsReinstall, - L10nKey::SettingsUpdate, - L10nKey::SettingsUninstall, - L10nKey::SettingsOfflineMachines, - L10nKey::SettingsSyncWithSystem, - L10nKey::SettingsSyncWithSystemDesc, - L10nKey::SettingsChangeTheme, - L10nKey::SettingsThemes, - L10nKey::SettingsThemePanelManual, - L10nKey::SettingsThemePanelLight, - L10nKey::SettingsThemePanelDark, - L10nKey::SettingsCustom, - L10nKey::SettingsBuiltIn, - L10nKey::SettingsDark, - L10nKey::SettingsLight, - L10nKey::SettingsActive, - L10nKey::SettingsStartupWindow, - L10nKey::SettingsStartupWindowDesc, - L10nKey::SettingsRememberWindowSize, - L10nKey::SettingsRememberWindowSizeDesc, - L10nKey::SettingsRestoreLastLayout, - L10nKey::SettingsRestoreLastLayoutDesc, - L10nKey::SettingsConfirmLastWindowClose, - L10nKey::SettingsConfirmLastWindowCloseDesc, - L10nKey::SettingsShowTrayIcon, - L10nKey::SettingsShowTrayIconDesc, - L10nKey::SettingsTabs, - L10nKey::SettingsNewTabPosition, - L10nKey::SettingsNewTabPositionDesc, - L10nKey::SettingsTabBarPosition, - L10nKey::SettingsTabBarPositionDesc, - L10nKey::SettingsSidebarGrouping, - L10nKey::SettingsSidebarGroupingDesc, - L10nKey::SettingsDiffPreviewFromCounts, - L10nKey::SettingsDiffPreviewFromCountsDesc, - L10nKey::SettingsNotifications, - L10nKey::SettingsNotifyOnCommandFinish, - L10nKey::SettingsNotifyOnCommandFinishDesc, - L10nKey::SettingsNotifyThreshold, - L10nKey::SettingsNotifyThresholdDesc, - L10nKey::NotifyModeNever, - L10nKey::NotifyModeUnfocused, - L10nKey::NotifyModeAlways, - L10nKey::SettingsStartupNormal, - L10nKey::SettingsStartupMaximized, - L10nKey::SettingsStartupFullscreen, - L10nKey::SettingsAfterCurrent, - L10nKey::SettingsAtEnd, - L10nKey::SettingsTop, - L10nKey::SettingsLeft, - L10nKey::SettingsByRepo, - L10nKey::SettingsFlat, - L10nKey::SettingsPreset, - L10nKey::SettingsPresetDesc, - L10nKey::SettingsPrefix, - L10nKey::SettingsPressKeys, - L10nKey::SettingsPauseToSaveEsc, - L10nKey::SettingsKeybindingsIntroDesc, - L10nKey::SettingsPrefixNote, - L10nKey::SettingsRestoreAllDefaults, - L10nKey::SettingsAboutDesc1, - L10nKey::SettingsAboutTech, - L10nKey::SettingsUpdates, - L10nKey::SettingsUpdateAndRelaunch, - L10nKey::SettingsUpdateViewRelease, - L10nKey::SettingsUpdateChecking, - L10nKey::SettingsUpdateUpToDate, - L10nKey::SettingsUpdateDownloading, - L10nKey::SettingsUpdateInstalling, - L10nKey::SettingsUpdateCheckNow, - L10nKey::SettingsUpdateCheckFailed, - L10nKey::SettingsUpdatePrepareFailed, - L10nKey::SettingsUpdateLaunchFailed, - L10nKey::SettingsUpdateUnsupportedMacos, - L10nKey::SettingsUpdateUnsupportedLinux, - L10nKey::SettingsUpdateUnsupportedWindows, - L10nKey::SettingsUpdateWindowsAllUsers, - L10nKey::SettingsUpdateUnsupportedPlatform, - L10nKey::SettingsUpdateMissingPackage, - L10nKey::SettingsUpdateMissingChecksums, - L10nKey::SettingsVersionAvailable, - L10nKey::SettingsCheckUpdatesDesc, - L10nKey::SettingsCheckUpdatesOnLaunch, - L10nKey::SettingsCommandLine, - L10nKey::SettingsCommandLineDesc, - L10nKey::SettingsInstallCliOnPath, - L10nKey::SettingsServer, - L10nKey::SettingsServerDesc, - L10nKey::SettingsRestartServer, - L10nKey::SettingsAppHttpProxy, - L10nKey::SettingsAppHttpProxyDesc, - L10nKey::SettingsAppHttpProxyInvalid, - L10nKey::SettingsAgentClaudeCode, - L10nKey::SettingsAgentCodex, - L10nKey::SettingsAgentCopilotCli, - L10nKey::SettingsAgentOpencode, - L10nKey::SettingsAgentPi, - L10nKey::SettingsAgentGrokBuild, - L10nKey::SettingsSearchAboutKeywords, - L10nKey::SettingsSearchAppHttpProxyKeywords, - L10nKey::SettingsSearchAnsiColorsKeywords, - L10nKey::SettingsSearchArgumentsKeywords, - L10nKey::SettingsSearchBlurKeywords, - L10nKey::SettingsSearchBoldFontKeywords, - L10nKey::SettingsSearchClaudeCodeKeywords, - L10nKey::SettingsSearchCodexKeywords, - L10nKey::SettingsSearchCommandLineToolKeywords, - L10nKey::SettingsSearchCommandLineToolTitle, - L10nKey::SettingsSearchConfirmLastWindowCloseKeywords, - L10nKey::SettingsSearchCopilotCliKeywords, - L10nKey::SettingsSearchCopyOnSelectKeywords, - L10nKey::SettingsSearchCursorBlinkKeywords, - L10nKey::SettingsSearchCursorShapeKeywords, - L10nKey::SettingsSearchCustomThemesKeywords, - L10nKey::SettingsSearchDetectUrlsKeywords, - L10nKey::SettingsSearchDiffPreviewFromCountsKeywords, - L10nKey::SettingsSearchDimInactivePanesKeywords, - L10nKey::SettingsSearchFocusFollowsMouseKeywords, - L10nKey::SettingsSearchFontFamilyKeywords, - L10nKey::SettingsSearchFontLigaturesKeywords, - L10nKey::SettingsSearchFontSizeKeywords, - L10nKey::SettingsSearchForwardSshLoopbackLinksKeywords, - L10nKey::SettingsSearchGrokBuildKeywords, - L10nKey::SettingsSearchHideMouseWhileTypingKeywords, - L10nKey::SettingsSearchHistorySearchKeywords, - L10nKey::SettingsSearchHostsKeywords, - L10nKey::SettingsSearchHowShellsWorkKeywords, - L10nKey::SettingsSearchHowShellsWorkTitle, - L10nKey::SettingsSearchItalicFontKeywords, - L10nKey::SettingsSearchKeybindingsKeywords, - L10nKey::SettingsSearchKeybindingsTitle, - L10nKey::SettingsSearchLineHeightKeywords, - L10nKey::SettingsSearchNewTabPositionKeywords, - L10nKey::SettingsSearchNotifyOnCommandFinishKeywords, - L10nKey::SettingsSearchNotifyThresholdKeywords, - L10nKey::SettingsSearchOpacityKeywords, - L10nKey::SettingsSearchOpenFilesWithKeywords, - L10nKey::SettingsSearchOpencodeKeywords, - L10nKey::SettingsSearchOptionAsMetaKeywords, - L10nKey::SettingsSearchPiKeywords, - L10nKey::SettingsSearchPortForwardingKeywords, - L10nKey::SettingsSearchProgramKeywords, - L10nKey::SettingsSearchRememberWindowSizeKeywords, - L10nKey::SettingsSearchReportMouseToAppsKeywords, - L10nKey::SettingsSearchRestoreLastLayoutKeywords, - L10nKey::SettingsSearchScrollSpeedKeywords, - L10nKey::SettingsSearchScrollbackKeywords, - L10nKey::SettingsSearchShowTrayIconKeywords, - L10nKey::SettingsSearchSidebarGroupingKeywords, - L10nKey::SettingsSearchSmartSelectionKeywords, - L10nKey::SettingsSearchStartInKeywords, - L10nKey::SettingsSearchSyncWithSystemKeywords, - L10nKey::SettingsSearchTabBarPositionKeywords, - L10nKey::SettingsSearchTabCompletionKeywords, - L10nKey::SettingsSearchTerminalBellKeywords, - L10nKey::SettingsSearchThemeKeywords, - L10nKey::SettingsSearchTrimTrailingSpacesKeywords, - L10nKey::SettingsSearchVerifyHostKeysKeywords, - L10nKey::SettingsSearchWarnBeforeClosingKeywords, - L10nKey::SettingsSearchStartupWindowKeywords, - L10nKey::SwitcherNoMatch, - L10nKey::AddSshHost, - L10nKey::ClickForNewWindow, - L10nKey::RestartServer, - L10nKey::OtherMachines, - L10nKey::Ok, - L10nKey::SftpNoTransfers, - L10nKey::SftpPanelTitleFiles, - L10nKey::SftpTooltipRefresh, - L10nKey::SftpTooltipMore, - L10nKey::SftpMenuNewFolder, - L10nKey::SftpMenuNewFile, - L10nKey::SftpMenuUpload, - L10nKey::SftpMenuGotoShellCwd, - L10nKey::SftpMenuHideTransferHistory, - L10nKey::SftpMenuTransferHistory, - L10nKey::SftpEditNewFolder, - L10nKey::SftpEditNewFile, - L10nKey::SftpEditRename, - L10nKey::SftpEditPermissions, - L10nKey::SftpLoading, - L10nKey::SftpEmptyDirectory, - L10nKey::SftpContextOpen, - L10nKey::SftpContextFollowSymlink, - L10nKey::SftpContextRename, - L10nKey::SftpContextChmod, - L10nKey::SftpTransferSummaryRunning, - L10nKey::SftpTransferSummaryFailed, - L10nKey::SftpTransferSummaryIdle, - L10nKey::SftpTransferProgress, - L10nKey::SftpTransferDone, - L10nKey::SftpTransferCancelled, - L10nKey::SftpTransferError, - L10nKey::SftpImagePasteUploadFailed, - L10nKey::ForwardPanelTitle, - L10nKey::ForwardDisconnected, - L10nKey::ForwardDisconnectedFrom, - L10nKey::ForwardTooltipAdd, - L10nKey::ForwardTooltipRemove, - L10nKey::ForwardLocal, - L10nKey::ForwardRemote, - L10nKey::ForwardDynamic, - L10nKey::ForwardBindLabel, - L10nKey::ForwardToLabel, - L10nKey::ForwardSocksLabel, - L10nKey::ForwardAdd, - L10nKey::FileTreePlaceholderFileName, - L10nKey::FileTreePlaceholderFolderName, - L10nKey::FileTreePlaceholderNewName, - L10nKey::FileTreeDeleteTitle, - L10nKey::FileTreeDeleteFolderBody, - L10nKey::FileTreeDeleteFileBody, - L10nKey::FileTreeDeleteFailed, - L10nKey::FileTreeContextOpen, - L10nKey::FileTreeContextCdHere, - L10nKey::FileTreeContextInsertPath, - L10nKey::FileTreeContextAttachAgent, - L10nKey::FileTreeContextNewFile, - L10nKey::FileTreeContextNewFolder, - L10nKey::FileTreeContextRename, - L10nKey::FileTreeContextCopyPath, - L10nKey::FileTreeContextHideDotfiles, - L10nKey::FileTreeContextShowDotfiles, - L10nKey::SshPromptNewKey, - L10nKey::SshPromptOldKey, - L10nKey::EditorCantOpen, - L10nKey::EditorCantRead, - L10nKey::EditorNotUtf8, - L10nKey::EditorSaveFailed, - L10nKey::EditorUnsavedChanges, - L10nKey::EditorDiscard, - L10nKey::EditorNoFileOpen, - L10nKey::EditorBackToTerminal, - L10nKey::EditorLnCol, - L10nKey::EditorEdit, - L10nKey::EditorPreview, - L10nKey::EditorWrapOn, - L10nKey::EditorWrapOff, - L10nKey::EditorFileTooLarge, - L10nKey::EditorBinaryFile, - L10nKey::PanelInfoTitle, - L10nKey::PanelChangesTitle, - L10nKey::PanelFilesTitle, - L10nKey::PanelNoSession, - L10nKey::PanelNoSessionHint, - L10nKey::PanelNoWorkingDirectory, - L10nKey::PanelNoWorkingDirectoryHint, - L10nKey::PanelLoading, - L10nKey::PanelNotAGitRepo, - L10nKey::PanelNotAGitRepoHint, - L10nKey::PanelNoChanges, - L10nKey::PanelNoChangesHint, - L10nKey::PanelMoreChangedFiles, - L10nKey::PanelUntracked, - L10nKey::PanelSessionSubtitle, - L10nKey::PanelProcessesSubtitle, - L10nKey::PanelPortsSubtitle, - L10nKey::PanelCwd, - L10nKey::PanelShell, - L10nKey::PanelSsh, - L10nKey::PanelBranch, - L10nKey::PanelChangesRow, - L10nKey::PanelAgent, - L10nKey::PanelAgentIdle, - L10nKey::PanelAgentWorking, - L10nKey::PanelAgentWaiting, - L10nKey::PanelAgentDone, - L10nKey::PanelRevealInFinder, - L10nKey::PanelOpenFolder, - L10nKey::WindowStop, - L10nKey::WindowDelete, - L10nKey::WindowThisWorkspace, - L10nKey::WindowConfirmTitle, - L10nKey::WindowStopUnreachable, - L10nKey::WindowDeleteUnreachable, - L10nKey::WindowStopShells, - L10nKey::WindowDeleteShells, - L10nKey::DiffReading, - L10nKey::DiffNotARepo, - L10nKey::DiffReadFailed, - L10nKey::DiffWorkingTreeClean, - L10nKey::DiffCloseTooltip, - L10nKey::DiffChangedFiles, - L10nKey::DiffUntrackedCount, - L10nKey::DiffMoreFiles, - L10nKey::DiffOversizedNotice, - L10nKey::DiffTruncatedPerFile, - L10nKey::DiffTruncatedBudget, - L10nKey::DiffUntrackedHeader, - L10nKey::DiffMoreUntracked, - L10nKey::DiffLines, - L10nKey::DiffChangedLines, - L10nKey::DiffBudgetAndCap, - L10nKey::DiffBudget, - L10nKey::DiffPerFileCap, - L10nKey::DiffUntrackedSummary, - L10nKey::PendingConnecting, - L10nKey::PendingUnreachable, - L10nKey::WorktreePromptNeedsName, - L10nKey::WorktreePromptTitle, - L10nKey::WorktreePromptName, - L10nKey::WorktreePromptBranch, - L10nKey::WorktreePromptBase, - L10nKey::WorktreePromptCreating, - L10nKey::WorktreePromptCreate, - L10nKey::AppNewWorktreeFailed, - L10nKey::HomeTimeJustNow, - L10nKey::HomeTimeMinutesAgo, - L10nKey::HomeTimeHourAgo, - L10nKey::HomeTimeHoursAgo, - L10nKey::HomeTimeYesterday, - L10nKey::HomeTimeDaysAgo, - L10nKey::HomeTimeOverWeekAgo, - L10nKey::HomeReopenNamed, - L10nKey::AppMenuAbout, - L10nKey::AppMenuCheckForUpdates, - L10nKey::AppMenuSettings, - L10nKey::AppMenuServices, - L10nKey::AppMenuHideApp, - L10nKey::AppMenuHideOthers, - L10nKey::AppMenuShowAll, - L10nKey::AppMenuQuit, - L10nKey::AppMenuFile, - L10nKey::AppMenuEdit, - L10nKey::AppMenuView, - L10nKey::AppMenuWindow, - L10nKey::AppMenuHelp, - L10nKey::AppMenuNewTab, - L10nKey::AppMenuNewWorkspace, - L10nKey::AppMenuNewWorktreeTab, - L10nKey::AppMenuSplitRight, - L10nKey::AppMenuSplitDown, - L10nKey::AppMenuRenameTab, - L10nKey::AppMenuCopyWorkingDirectory, - L10nKey::AppMenuCopySessionId, - L10nKey::AppMenuForkSession, - L10nKey::AppMenuClosePaneTab, - L10nKey::AppMenuCloseOtherTabs, - L10nKey::AppMenuCloseTabsRight, - L10nKey::AppMenuReopenClosedTab, - L10nKey::AppMenuRenameWorkspace, - L10nKey::AppMenuStopWorkspace, - L10nKey::AppMenuDeleteWorkspace, - L10nKey::AppMenuUndo, - L10nKey::AppMenuRedo, - L10nKey::AppMenuCut, - L10nKey::AppMenuCopy, - L10nKey::AppMenuPaste, - L10nKey::AppMenuSelectAll, - L10nKey::AppMenuFind, - L10nKey::AppMenuFindNext, - L10nKey::AppMenuFindPrevious, - L10nKey::AppMenuCommandPalette, - L10nKey::AppMenuIncreaseFontSize, - L10nKey::AppMenuDecreaseFontSize, - L10nKey::AppMenuResetFontSize, - L10nKey::AppMenuLeftSidebar, - L10nKey::AppMenuRightPanel, - L10nKey::AppMenuCodePanel, - L10nKey::AppMenuTabBarPosition, - L10nKey::AppMenuFocusNextPane, - L10nKey::AppMenuFocusPreviousPane, - L10nKey::AppMenuZoomPane, - L10nKey::AppMenuClearScrollback, - L10nKey::AppMenuEnterFullscreen, - L10nKey::AppMenuDocumentation, - L10nKey::AppMenuKeyboardShortcuts, - L10nKey::AppMenuJoinDiscord, - L10nKey::AppMenuReportIssue, - L10nKey::AppMenuRestartServer, - L10nKey::WindowUntitled, - L10nKey::TrayShowTty7, - L10nKey::TrayNotifications, - L10nKey::TrayAgentNeedsInput, - L10nKey::NotifyCommandFinished, - L10nKey::NotifyCommandFinishedWithCommand, - L10nKey::NotifyAgentFinished, - L10nKey::NotifyAgentWaiting, - L10nKey::NotifyTurnFinished, - L10nKey::TabTooltipMore, - L10nKey::TabTooltipShowSidebar, - L10nKey::TabTooltipHideSidebar, - L10nKey::TabTooltipHideDetailPanel, - L10nKey::TabTooltipShowDetailPanel, - L10nKey::TabUnnamedShell, - L10nKey::ShellDefault, - L10nKey::SidebarScratchGroup, - L10nKey::TabContextCloseTab, - L10nKey::TabContextCloseTabsBelow, - L10nKey::TabContextMarkUnread, - L10nKey::RemoteStripDisconnected, - L10nKey::RemoteStripConnecting, - L10nKey::RemoteStripReconnecting, - L10nKey::RemoteStripReconnectingAttempt, - L10nKey::RemoteStripPreempted, - L10nKey::RemoteStripFailed, - L10nKey::RemoteNoticePreempted, - L10nKey::RemoteNoticeDisconnected, - L10nKey::RemoteActionRetryNow, - L10nKey::RemoteActionTakeBack, - L10nKey::RemoteActionConnect, - L10nKey::RemoteActionRetry, - L10nKey::RemoteNoConnectionDetails, - L10nKey::RemoteThisComputer, - L10nKey::RemoteRestartTitle, - L10nKey::RemoteRestartBody, - L10nKey::RemoteReplaceBody, - L10nKey::RemoteRestartFailedTitle, - L10nKey::RemoteRestartFailedBody, - L10nKey::RemoteHostUnreachable, - L10nKey::RemoteInstallTitle, - L10nKey::RemoteInstallDetail, - L10nKey::RemoteInstallPathLabel, - L10nKey::RemoteInstallVersionLabel, - L10nKey::RemoteInstallSizeLabel, - L10nKey::RemoteInstallFromLabel, - L10nKey::RemoteInstallShaLabel, - L10nKey::RemoteInstallSilentUpgrades, - L10nKey::RemoteInstallBytes, - L10nKey::RemoteMismatchTitle, - L10nKey::RemoteMismatchDetail, - L10nKey::RemoteMismatchUnknownBuild, - L10nKey::RemoteMismatchUnknownBuildFromExe, - L10nKey::RemoteMismatchReplaceServer, - L10nKey::RemoteDaemonStartFailed, - L10nKey::RemoteDaemonUnreachable, - L10nKey::RemoteDaemonTooOld, - L10nKey::RemoteProfileMissing, - L10nKey::RemoteAliasMissing, - L10nKey::RemoteWslNoSsh, - L10nKey::RemoteLocalStdioNoSsh, - L10nKey::RemoteHostNotTty7, - L10nKey::RemoteWorkspaceListFailed, - L10nKey::RemoteServerRestartFailed, - L10nKey::RemoteNoRouteToHost, - L10nKey::RemoteMachineTreeUnexpectedReply, - L10nKey::RemoteMismatchVersionFromExe, - L10nKey::AppNoRunningCodingAgent, - L10nKey::SwitcherThisComputer, - L10nKey::SwitcherRestartingServer, - L10nKey::SwitcherDownloadingServerWithTotal, - L10nKey::SwitcherDownloadingServerNoTotal, - L10nKey::SwitcherCopyingServer, - L10nKey::SwitcherThisWindow, - L10nKey::SwitcherOpen, - L10nKey::SwitcherDisconnect, - L10nKey::SwitcherOpenInNewWindow, - L10nKey::SwitcherRename, - L10nKey::SshPromptPasswordFor, - L10nKey::SshPromptPassphraseFor, - L10nKey::SshPromptTwoFactor, - L10nKey::SshPromptUnknownHost, - L10nKey::SshPromptHostKeyChanged, - L10nKey::SshPromptHostKeyChangedBody, - L10nKey::SshPromptConnect, - L10nKey::SshPromptUnlock, - L10nKey::SshPromptSubmit, - L10nKey::HostOpsError, - L10nKey::CmdGroupTabsPanes, - L10nKey::CmdGroupWorkspaces, - L10nKey::CmdGroupView, - L10nKey::CmdGroupTerminal, - L10nKey::CmdGroupSsh, - L10nKey::CmdGroupAgents, - L10nKey::CmdGroupApplication, - L10nKey::CmdNewTab, - L10nKey::CmdNewWorktreeTab, - L10nKey::CmdNewWorktreeTabSubtitle, - L10nKey::CmdRenameTab, - L10nKey::CmdSplitRight, - L10nKey::CmdSplitDown, - L10nKey::CmdZoomPane, - L10nKey::CmdNextPane, - L10nKey::CmdPreviousPane, - L10nKey::CmdFocusPaneLeft, - L10nKey::CmdFocusPaneRight, - L10nKey::CmdFocusPaneUp, - L10nKey::CmdFocusPaneDown, - L10nKey::CmdResizePaneLeft, - L10nKey::CmdResizePaneRight, - L10nKey::CmdResizePaneUp, - L10nKey::CmdResizePaneDown, - L10nKey::CmdSwapPaneNext, - L10nKey::CmdSwapPanePrevious, - L10nKey::CmdNextTab, - L10nKey::CmdPreviousTab, - L10nKey::CmdCopyWorkingDirectory, - L10nKey::CmdCopySessionId, - L10nKey::CmdCopySessionIdSubtitle, - L10nKey::CmdForkSession, - L10nKey::CmdForkSessionSubtitle, - L10nKey::CmdMarkTabAsUnread, - L10nKey::CmdClosePaneTab, - L10nKey::CmdCloseOtherTabs, - L10nKey::CmdCloseTabsToTheRight, - L10nKey::CmdReopenClosedTab, - L10nKey::CmdNewWorkspace, - L10nKey::CmdSwitchWorkspace, - L10nKey::CmdRenameWorkspace, - L10nKey::CmdStopWorkspace, - L10nKey::CmdStopWorkspaceSubtitle, - L10nKey::CmdDeleteWorkspace, - L10nKey::CmdDeleteWorkspaceSubtitle, - L10nKey::CmdShowLeftSidebar, - L10nKey::CmdHideLeftSidebar, - L10nKey::CmdHideRightPanel, - L10nKey::CmdShowRightPanel, - L10nKey::CmdShowCodePanel, - L10nKey::CmdTabBarMoveToTop, - L10nKey::CmdTabBarMoveToLeftSidebar, - L10nKey::CmdRightPanelInfo, - L10nKey::CmdRightPanelChanges, - L10nKey::CmdRightPanelFiles, - L10nKey::CmdChangeTheme, - L10nKey::CmdResetFontSize, - L10nKey::CmdEnterFullScreen, - L10nKey::CmdClearScrollback, - L10nKey::CmdFindInTerminal, - L10nKey::CmdFindNext, - L10nKey::CmdFindPrevious, - L10nKey::CmdCopy, - L10nKey::CmdCut, - L10nKey::CmdPaste, - L10nKey::CmdSelectAll, - L10nKey::CmdSshAddConnection, - L10nKey::CmdSshManageProfiles, - L10nKey::CmdSshReconnect, - L10nKey::CmdSshRemoteFiles, - L10nKey::CmdSshPortForwarding, - L10nKey::CmdSshConnectWithInput, - L10nKey::CmdAgentSendSelection, - L10nKey::CmdAgentSendSelectionSubtitle, - L10nKey::CmdAgentSendGitDiffForReview, - L10nKey::CmdAgentSendGitDiffSubtitle, - L10nKey::CmdSettings, - L10nKey::CmdKeyboardShortcuts, - L10nKey::CmdAboutTty7, - L10nKey::CmdCheckForUpdates, - L10nKey::CmdDocumentation, - L10nKey::CmdJoinDiscord, - L10nKey::CmdReportIssue, - L10nKey::CmdRestartServer, - L10nKey::CmdRestartServerSubtitle, - L10nKey::CmdQuitTty7, - L10nKey::CmdQuitTty7Subtitle, - L10nKey::CmdQuickConnect, - L10nKey::CmdQuickConnectSaveProfile, - L10nKey::CmdRecent, - L10nKey::AppRestartServerTitle, - L10nKey::AppRestartServerMismatchDetail, - L10nKey::AppRestartServerOldDetail, - L10nKey::AppKeepShells, - L10nKey::AppRestart, - L10nKey::AppRestartServerNotSsh, - L10nKey::AppRestartServerBody, - L10nKey::AppWorktreeRemoveDetailDirty, - L10nKey::AppWorktreeRemoveDetailClean, - L10nKey::AppWorktreeRemoveTitle, - L10nKey::AppWorktreeDiscardAndRemove, - L10nKey::AppWorktreeRemove, - L10nKey::AppWorktreeKeep, - L10nKey::AppReopenTabFailed, - L10nKey::AppOpenTerminalFailed, - L10nKey::AppSshConnectionFailed, - L10nKey::AppSshReconnectFailed, - L10nKey::AppSplitPaneFailed, - L10nKey::AppWorktreeRemoved, - L10nKey::AppWorktreeRemoveFailed, - L10nKey::AppForkStillConnecting, - L10nKey::AppPaneNoCodingAgent, - L10nKey::AppForkNoCommand, - L10nKey::AppForkLocalOnly, - L10nKey::AppForkNoSessionId, - L10nKey::AppForkSessionIdNotToken, - L10nKey::AppForkMidTurn, - L10nKey::AppTabNoWorkingDirectory, - L10nKey::AppNothingSelected, - L10nKey::AppPaneNoKnownDirectory, - L10nKey::AppNoUncommittedChanges, - L10nKey::AppCmdSshProfileTitle, - L10nKey::AppCmdSwitchToTab, - L10nKey::AppPlaceholderDescription, - L10nKey::AppPlaceholderSshQuickConnect, - L10nKey::AppPlaceholderLoginShell, - L10nKey::AppPlaceholderNone, - L10nKey::AppPlaceholderOpenInDefaultApp, - L10nKey::AppThemeColorBackground, - L10nKey::AppThemeColorForeground, - L10nKey::AppThemeColorAccent, - L10nKey::AppThemeColorCursor, - L10nKey::AppThemeColorSelection, - L10nKey::AppAgentHooksThisComputer, - L10nKey::AppAgentHooksRemoteMachine, - L10nKey::AppAgentHooksNoHomeDir, - L10nKey::AppAgentHooksOffline, - L10nKey::AppAgentHooksHomeDirUnresolved, - L10nKey::AppAgentHooksOpFailed, - L10nKey::AppKeybindingDisplacedNote, - L10nKey::AppLocalServerName, - L10nKey::AppSshParseUnbalancedQuotes, - L10nKey::AppSshParseNoRemoteCommands, - L10nKey::AppSshParseFlagNeedsValue, - L10nKey::AppSshParseInvalidPort, - L10nKey::AppSshParseUnsupportedOption, - L10nKey::AppSshParseEnterHost, - L10nKey::AppSshParseBadHost, - L10nKey::AppMenuMinimize, - L10nKey::AppMenuZoom, - L10nKey::SwitcherStatusRestarting, - L10nKey::SwitcherStatusInstalling, - L10nKey::SwitcherStatusConnecting, - L10nKey::SwitcherStatusConnectFailed, - L10nKey::SwitcherStatusNotConnected, - L10nKey::SettingsLanguage, - L10nKey::SettingsLanguageDesc, - L10nKey::SettingsLanguageEnglish, - L10nKey::SettingsLanguageChinese, - L10nKey::SettingsSearchLanguageKeywords, - L10nKey::SettingsFontDefault, - L10nKey::ForwardDescriptionPlaceholder, - L10nKey::SettingsShellDefaultLoginShell, - L10nKey::SftpErrorUnexpectedReply, - L10nKey::SftpErrorUnsafeRemoteName, - L10nKey::SftpErrorInvalidOctalMode, - ] { - assert!( - !translate(Locale::ZhHans, key).is_empty(), - "missing zh translation for {key:?}" - ); - assert!( - !translate(Locale::En, key).is_empty(), - "missing en translation for {key:?}" - ); - } - } - - #[test] - fn explicit_languages_select_the_right_locale() { - set_locale("zh-CN"); - assert_eq!(current_locale(), Locale::ZhHans); - set_locale("en"); - assert_eq!(current_locale(), Locale::En); - set_locale("ko"); - assert_eq!(current_locale(), Locale::En); - } - - #[test] - fn plural_and_select_branches_are_translated() { - let plural_keys = [ - L10nKey::SettingsAliasesLinked, - L10nKey::SettingsRulesOpenedWithConnection, - L10nKey::SettingsOfflineMachines, - L10nKey::PanelUntracked, - L10nKey::PanelMoreChangedFiles, - L10nKey::WindowStopShells, - L10nKey::WindowDeleteShells, - L10nKey::DiffChangedFiles, - L10nKey::DiffUntrackedCount, - L10nKey::DiffMoreFiles, - L10nKey::DiffUntrackedHeader, - L10nKey::DiffMoreUntracked, - L10nKey::DiffUntrackedSummary, - L10nKey::HomeTimeMinutesAgo, - L10nKey::HomeTimeHoursAgo, - L10nKey::HomeTimeDaysAgo, - ]; - for key in plural_keys { - for branch in ["zero", "one", "other"] { - assert!( - !translate_variant(Locale::En, key, branch).is_empty(), - "missing en plural/select branch {branch:?} for {key:?}" - ); - assert!( - !translate_variant(Locale::ZhHans, key, branch).is_empty(), - "missing zh plural/select branch {branch:?} for {key:?}" - ); - } - // Smoke-check t_plural does not produce empty strings. - assert!(!t_plural(key, 0, &[]).is_empty()); - assert!(!t_plural(key, 1, &[]).is_empty()); - assert!(!t_plural(key, 5, &[]).is_empty()); - } - } -} diff --git a/src/ui/i18n/en.rs b/src/ui/i18n/en.rs new file mode 100644 index 00000000..aa3ddede --- /dev/null +++ b/src/ui/i18n/en.rs @@ -0,0 +1,1323 @@ +use super::L10nKey; + +pub fn translate_en(key: L10nKey) -> &'static str { + match key { + L10nKey::SearchTabs => "Search tabs…", + L10nKey::SearchFiles => "Search files…", + L10nKey::SearchThemes => "Search themes…", + L10nKey::SearchSettings => "Search settings…", + L10nKey::FilterHosts => "Filter hosts…", + L10nKey::SearchCommandsOrHost => "Search or type user@host to connect…", + L10nKey::SearchTheme => "Search…", + L10nKey::Search => "Search", + L10nKey::SearchWorkspacesAndMachines => "Search workspaces and machines", + L10nKey::SearchFonts => "Search fonts…", + L10nKey::NewFolderName => "New folder name", + L10nKey::NewFileName => "New file name", + L10nKey::HomeNewTab => "New Tab", + L10nKey::HomeReopenClosedTab => "Reopen Closed Tab", + L10nKey::HomeSwitchWorkspace => "Switch Workspace", + L10nKey::HomeCommandPalette => "Command Palette", + L10nKey::HomeSplitRight => "Split Right", + L10nKey::HomeSplitDown => "Split Down", + L10nKey::HomeSettings => "Settings…", + L10nKey::TrayQuitStopServer => "Quit and Stop Server…", + L10nKey::Reconnect => "Reconnect", + L10nKey::None => "None.", + L10nKey::TryAgain => "Try Again", + L10nKey::Refreshing => "refreshing…", + L10nKey::Binary => "binary", + L10nKey::Delete => "Delete", + L10nKey::NoMatchingCommands => "No matching commands", + L10nKey::ConnectSshHint => "Type user@host to connect over SSH instead.", + L10nKey::EditHint => "→ edit", + L10nKey::OpenFileFromTree => "Open a file from the file tree", + L10nKey::FileChangedOnDisk => "File changed on disk", + L10nKey::Reload => "Reload", + L10nKey::KeepMine => "Keep mine", + L10nKey::Dismiss => "Dismiss", + L10nKey::StoredPasswordRejected => "The stored password was rejected. Enter a new one.", + L10nKey::Trust => "Trust", + L10nKey::Abort => "Abort", + L10nKey::HostKeyOverrideMessage => { + "Type \"yes\" to override and trust the new key, or Esc to abort." + } + L10nKey::Override => "Override", + L10nKey::RememberKeychain => "Remember (keychain)", + L10nKey::CloseWindowTitle => "Close Window?", + L10nKey::CloseWindowBody => { + "Your sessions keep running in the background. This workspace will be \ + waiting on the home page, and in the workspace menu in the title bar, the \ + next time you open tty7." + } + L10nKey::Cancel => "Cancel", + L10nKey::Close => "Close", + L10nKey::QuitStopServerTitle => "Quit and Stop Server?", + L10nKey::QuitStopServerBody => { + "This quits tty7 and stops the background server — anything still running \ + in your shells is terminated. Your tabs and layout are kept and reopen with \ + fresh shells next launch. (Plain Quit keeps shells running.)" + } + L10nKey::QuitAndStop => "Quit and Stop", + L10nKey::CloseSshConnectionTitle => "Close this SSH connection?", + L10nKey::CloseSshConnectionBody => "The connection is live. Closing will end it.", + L10nKey::Keep => "Keep", + L10nKey::SettingsNavAppearance => "Appearance", + L10nKey::SettingsNavTerminal => "Terminal", + L10nKey::SettingsNavInput => "Input", + L10nKey::SettingsNavSsh => "SSH", + L10nKey::SettingsNavAgents => "Agents", + L10nKey::SettingsNavWindowTabs => "Window & Tabs", + L10nKey::SettingsNavKeybindings => "Keybindings", + L10nKey::SettingsNavAbout => "About", + L10nKey::SettingsHeader => "SETTINGS", + L10nKey::Reset => "Reset", + L10nKey::Save => "Save", + L10nKey::Connect => "Connect", + L10nKey::Download => "Download", + L10nKey::Link => "Link", + L10nKey::SettingsThemeIntroTitle => "Theme", + L10nKey::SettingsThemeIntroDesc => { + "Pick a color theme. Each one sets its own light or dark look." + } + L10nKey::SettingsTypography => "Typography", + L10nKey::SettingsFontSize => "Font size", + L10nKey::SettingsFontSizeDesc => "Terminal text size in pixels.", + L10nKey::SettingsLineHeight => "Line height", + L10nKey::SettingsLineHeightDesc => "Row spacing as a multiple of the font size.", + L10nKey::SettingsFontFamily => "Font family", + L10nKey::SettingsFontFamilyDesc => "Pick from fonts installed on your system.", + L10nKey::SettingsBoldFont => "Bold font", + L10nKey::SettingsBoldFontDesc => { + "Face for bold text; Default synthesizes it from the primary." + } + L10nKey::SettingsItalicFont => "Italic font", + L10nKey::SettingsItalicFontDesc => { + "Face for italic text; Default synthesizes it from the primary." + } + L10nKey::SettingsFontLigatures => "Font ligatures", + L10nKey::SettingsFontLigaturesDesc => { + "Enable common programming ligature features for terminal text." + } + L10nKey::SettingsCursor => "Cursor", + L10nKey::SettingsCursorShape => "Cursor shape", + L10nKey::SettingsCursorShapeDesc => "How the terminal cursor is drawn.", + L10nKey::SettingsCursorBlink => "Cursor blink", + L10nKey::SettingsCursorBlinkDesc => "Pulse the cursor while the terminal is focused.", + L10nKey::SettingsLanguage => "Language", + L10nKey::SettingsLanguageDesc => "Choose the language used for the tty7 interface.", + L10nKey::SettingsLanguageEnglish => "English", + L10nKey::SettingsLanguageChinese => "简体中文", + L10nKey::SettingsLanguageJapanese => "日本語", + L10nKey::SettingsSearchLanguageKeywords => "language, locale, english, chinese", + L10nKey::SettingsTransparency => "Transparency", + L10nKey::SettingsOpacity => "Opacity", + L10nKey::SettingsOpacityDesc => { + "How opaque the window background is, for every theme. Below 100% the desktop shows through." + } + L10nKey::SettingsBlur => "Blur", + L10nKey::SettingsBlurDesc => "Blur whatever is behind a translucent window (macOS).", + L10nKey::FollowTheme => "Follow theme", + L10nKey::SettingsDimInactivePanes => "Dim inactive panes", + L10nKey::SettingsDimInactivePanesDesc => { + "Fade unfocused panes in a split so the active one stands out." + } + L10nKey::SettingsOpenThemesFolder => "Open themes folder", + L10nKey::SettingsChangeThemeImage => "Change…", + L10nKey::SettingsChooseThemeImage => "Choose…", + L10nKey::SettingsRemoveThemeImage => "Remove", + L10nKey::SettingsImageOpacity => "Image opacity", + L10nKey::SettingsImageOpacityDesc => { + "How strongly the image shows over the background color." + } + L10nKey::SettingsEditTheme => "Edit theme", + L10nKey::SettingsEditThemeIntro => { + "You're editing a copy. Changes save to its file in the themes folder and apply live." + } + L10nKey::SettingsBackgroundImage => "Background image", + L10nKey::SettingsBackgroundImageDesc => { + "Composited over the background color, under the text." + } + L10nKey::SettingsAnsiColors => "ANSI colors", + L10nKey::SettingsCustomThemes => "Custom themes", + L10nKey::SettingsCustomThemesIntro => { + "Duplicate a theme to edit its colors here, or drop your own in the themes folder: a tty7 YAML theme or an iTerm2 .itermcolors scheme." + } + L10nKey::SettingsDuplicateToEdit => "Duplicate to edit", + L10nKey::SettingsHosts => "Hosts", + L10nKey::SettingsDefaults => "Defaults", + L10nKey::SettingsInheritedByEveryHost => "Inherited by every host", + L10nKey::SettingsNoSavedHosts => "No saved hosts yet.", + L10nKey::SettingsNothingMatches => "Nothing matches {query}.", + L10nKey::SettingsInTty7 => "In tty7", + L10nKey::SettingsImportFromSshConfig => "Import from ~/.ssh/config", + L10nKey::SettingsExpandAllGroups => "Expand all groups", + L10nKey::SettingsNoHostsYet => "No hosts yet", + L10nKey::SettingsNothingSelected => "Nothing selected", + L10nKey::SettingsTypeAddressToConnect => { + "Type an address to connect now — tty7 offers to save it afterwards." + } + L10nKey::SettingsMoreInSshConfig => "{count} more in ~/.ssh/config", + L10nKey::SettingsAliasesLinked => "{count} aliases linked.", + L10nKey::SettingsImportAliases => "Import aliases", + L10nKey::SettingsImportAliasesDesc => { + "Re-reads the file and adds anything new. Edits you make here are stored by tty7 — the file itself is never written." + } + L10nKey::SettingsImportNow => "Import now", + L10nKey::SettingsDefaultsIntro => { + "Every host starts from these. Any host can override one under its own Advanced." + } + L10nKey::SettingsCopyAddress => "Copy address", + L10nKey::SettingsDuplicate => "Duplicate", + L10nKey::SettingsForgetPassword => "Forget password", + L10nKey::SettingsForgotPasswordFor => "Forgot saved password for {endpoint}", + L10nKey::SettingsCouldntForgetPassword => { + "Couldn't forget password for {endpoint}: {error}" + } + L10nKey::SettingsSecurity => "Security", + L10nKey::SettingsSecurityIntro => { + "A host can override either of these under its own Advanced." + } + L10nKey::SettingsVerifyHostKeys => "Verify host keys", + L10nKey::SettingsVerifyHostKeysDesc => { + "Check each server's key against known_hosts and confirm unknown or changed keys before connecting. Off connects without checking, so a spoofed server would go unnoticed." + } + L10nKey::WarnBeforeClosing => "Warn before closing", + L10nKey::SettingsWarnBeforeClosingDesc => { + "Ask for confirmation before closing a tab or pane with a live SSH session." + } + L10nKey::SettingsNewHost => "New host", + L10nKey::SettingsName => "Name", + L10nKey::SettingsNameDesc => "A label for this connection.", + L10nKey::SettingsHost => "Host", + L10nKey::SettingsHostDesc => "Hostname or IP address.", + L10nKey::SettingsUser => "User", + L10nKey::SettingsUserDesc => "Login user (blank = resolve at connect).", + L10nKey::SettingsAuth => "Auth", + L10nKey::SettingsAuthDesc => "Authentication method. Auto tries every applicable method.", + L10nKey::SettingsAuthModeAuto => "Auto", + L10nKey::SettingsAuthModePassword => "Password", + L10nKey::SettingsAuthModeKey => "Key", + L10nKey::SettingsAuthModeAgent => "Agent", + L10nKey::SettingsAuthMode2Fa => "2FA", + L10nKey::SettingsJumpHost => "Jump host", + L10nKey::SettingsJumpHostDesc => { + "Name of another profile to tunnel through (blank = direct)." + } + L10nKey::SettingsNoneSummary => "(none)", + L10nKey::SettingsNoneLower => "none", + L10nKey::SettingsPortForwarding => "Port forwarding", + L10nKey::SettingsRulesOpenedWithConnection => "1 rule, opened with the connection", + L10nKey::SettingsAddRule => "+ Add rule", + L10nKey::SettingsFwdLegendLocal => "L — a local port reaches the remote side", + L10nKey::SettingsFwdLegendRemote => "R — a remote port reaches this machine", + L10nKey::SettingsFwdLegendDynamic => "D — dynamic SOCKS proxy", + L10nKey::SettingsFwdNeedsBoth => { + "Needs a listen port and a target host:port — won't be saved." + } + L10nKey::SettingsFwdNeedsListen => "Needs a listen port — won't be saved.", + L10nKey::SettingsAdvanced => "Advanced", + L10nKey::SettingsAdvancedSummary => { + "algorithms / keepalive / proxies / X11 / login scripts" + } + L10nKey::SettingsIdentityFiles => "Identity files", + L10nKey::SettingsIdentityFilesDesc => "Private-key paths, one per line (%h/%r expand).", + L10nKey::SettingsAgentForwarding => "Agent forwarding", + L10nKey::SettingsAgentForwardingDesc => "Forward the local ssh-agent to the connection.", + L10nKey::SettingsProxyCommand => "ProxyCommand", + L10nKey::SettingsProxyCommandDesc => "Transport command (%h/%p/%r substituted).", + L10nKey::SettingsSocks5Proxy => "SOCKS5 proxy", + L10nKey::SettingsSocks5ProxyDesc => "host:port (blank = none).", + L10nKey::SettingsHttpProxy => "HTTP proxy", + L10nKey::SettingsHttpProxyDesc => "host:port (blank = none).", + L10nKey::SettingsKexAlgorithms => "KEX algorithms", + L10nKey::SettingsKexAlgorithmsDesc => "Comma-separated (blank = library default).", + L10nKey::SettingsCiphers => "Ciphers", + L10nKey::SettingsCiphersDesc => "Comma-separated (blank = default).", + L10nKey::SettingsMacs => "MACs", + L10nKey::SettingsMacsDesc => "Comma-separated (blank = default).", + L10nKey::SettingsHostKeyAlgorithms => "Host-key algorithms", + L10nKey::SettingsHostKeyAlgorithmsDesc => "Comma-separated (blank = default).", + L10nKey::SettingsCompression => "Compression", + L10nKey::SettingsJumpHostVia => "via {jump_name}", + L10nKey::SettingsConnected => "connected", + L10nKey::SettingsProfileCopied => "{name} (copy)", + L10nKey::SettingsCompressionDesc => "Comma-separated (blank = default).", + L10nKey::SettingsKeepaliveInterval => "Keepalive interval (s)", + L10nKey::SettingsKeepaliveIntervalDesc => "Blank = library default.", + L10nKey::SettingsKeepaliveCountMax => "Keepalive count max", + L10nKey::SettingsKeepaliveCountMaxDesc => "Missed keepalives before dead.", + L10nKey::SettingsConnectTimeout => "Connect timeout (s)", + L10nKey::SettingsConnectTimeoutDesc => "Blank = library default.", + L10nKey::SettingsX11Forwarding => "X11 forwarding", + L10nKey::SettingsX11ForwardingDesc => "Request X11 forwarding (needs XQuartz on macOS).", + L10nKey::SettingsShellIntegration => "Shell integration", + L10nKey::SettingsShellIntegrationDesc => { + "Let the remote shell report prompts, exit codes and directory." + } + L10nKey::SettingsLoginScripts => "Login scripts", + L10nKey::SettingsLoginScriptsDesc => "Commands sent after the shell opens, one per line.", + L10nKey::SettingsSkipBanner => "Skip banner", + L10nKey::SettingsSkipBannerDesc => "Suppress the server login banner.", + L10nKey::SettingsDefaultFollowsDefaults => "Default follows Defaults, which is {value}.", + L10nKey::SettingsValueOn => "on", + L10nKey::SettingsValueOff => "off", + L10nKey::SettingsDefault => "Default", + L10nKey::SettingsOn => "On", + L10nKey::SettingsOff => "Off", + L10nKey::SettingsShell => "Shell", + L10nKey::SettingsShellIntro => { + "The program each new terminal launches. Leave Program empty to use the platform default ({default})." + } + L10nKey::SettingsProgram => "Program", + L10nKey::SettingsProgramDesc => { + "Executable name on PATH or an absolute path. e.g. zsh, fish, pwsh." + } + L10nKey::SettingsArguments => "Arguments", + L10nKey::SettingsArgumentsDesc => { + "Space-separated launch flags. e.g. -l for a login shell." + } + L10nKey::SettingsStartIn => "Start in", + L10nKey::SettingsStartInDesc => { + "What a fresh shell starts in: tty7's launch directory, your home folder, or a fixed path." + } + L10nKey::SettingsCustomPath => "Custom path", + L10nKey::SettingsCustomPathDesc => "The directory new shells start in.", + L10nKey::SettingsWdInherit => "Inherit", + L10nKey::SettingsWdHome => "Home", + L10nKey::SettingsWdCustom => "Custom", + L10nKey::SettingsShellFooter => { + "Applies to shells with nothing to inherit — like the first tab of a window. New tabs and splits keep inheriting the active pane's directory, and shells already open keep running." + } + L10nKey::SettingsScrolling => "Scrolling", + L10nKey::SettingsScrollback => "Scrollback", + L10nKey::SettingsScrollbackDesc => "Lines of history kept per pane. Applies to new panes.", + L10nKey::SettingsScrollSpeed => "Scroll speed", + L10nKey::SettingsScrollSpeedDesc => "Multiplier applied to mouse-wheel scrolling.", + L10nKey::SettingsMouse => "Mouse", + L10nKey::SettingsFocusFollowsMouse => "Focus follows mouse", + L10nKey::SettingsFocusFollowsMouseDesc => "Hovering a pane focuses it without a click.", + L10nKey::SettingsHideMouseWhileTyping => "Hide mouse while typing", + L10nKey::SettingsHideMouseWhileTypingDesc => { + "Hide the pointer as you type; it returns on the next move." + } + L10nKey::SettingsReportMouseToApps => "Report mouse to apps", + L10nKey::SettingsReportMouseToAppsDesc => { + "Let full-screen apps (vim, tmux) handle clicks and scrolling; hold Shift to keep a gesture local." + } + L10nKey::SettingsBell => "Bell", + L10nKey::SettingsTerminalBell => "Terminal bell", + L10nKey::SettingsTerminalBellDesc => { + "How a bell (^G) is signalled: silenced, a brief flash, the system sound, or both." + } + L10nKey::SettingsLinks => "Links", + L10nKey::DetectUrls => "Detect URLs", + L10nKey::SettingsDetectUrlsDesc => { + "Underline links on hover and open them on {modifier}-click." + } + L10nKey::ForwardSshLoopbackLinks => "Forward SSH loopback links", + L10nKey::SettingsForwardSshLoopbackLinksDesc => { + "When a pane is in SSH, open localhost links through a temporary port forward." + } + L10nKey::OpenFilesWith => "Open files with", + L10nKey::SettingsOpenFilesWithDesc => { + "Command run when {modifier}-clicking a file link, instead of the default app. Use {path}, {line}, {column}; a flag whose value is absent is dropped (e.g. herdr edit {path} --line={line}). Empty uses the default app." + } + L10nKey::SettingsBellModeOff => "Off", + L10nKey::SettingsBellModeVisual => "Visual", + L10nKey::SettingsBellModeAudible => "Audible", + L10nKey::SettingsBellModeBoth => "Both", + L10nKey::SettingsPrompt => "Prompt", + L10nKey::SettingsPromptIntro => { + "tty7's own menus at the shell prompt. Turn one off to hand the key back to the shell." + } + L10nKey::SettingsTabCompletion => "Tab completion", + L10nKey::SettingsTabCompletionDesc => { + "Tab at the prompt opens tty7's completion menu. When off, Tab goes to the shell's own completion instead." + } + L10nKey::SettingsHistorySearch => "History search", + L10nKey::SettingsHistorySearchDesc => { + "⌃R at the prompt opens tty7's fuzzy history menu. When off, ⌃R goes to the shell instead — its own reverse-i-search, or whatever you've bound there (fzf, percol)." + } + L10nKey::SettingsSelectionClipboard => "Selection & clipboard", + L10nKey::SettingsSmartSelection => "Smart selection", + L10nKey::SettingsSmartSelectionDesc => { + "Double-click selects the whole URL, file path, email, or bracket pair under the cursor." + } + L10nKey::SettingsCopyOnSelect => "Copy on select", + L10nKey::SettingsCopyOnSelectDesc => { + "Selecting text with the mouse copies it to the clipboard right away, no ⌘C needed." + } + L10nKey::SettingsTrimTrailingSpaces => "Trim trailing spaces on copy", + L10nKey::SettingsTrimTrailingSpacesDesc => { + "Strip trailing whitespace from each copied line." + } + L10nKey::SettingsKeyboard => "Keyboard", + L10nKey::SettingsOptionAsMeta => "Option (⌥) acts as Meta", + L10nKey::SettingsOptionAsMetaDesc => { + "⌥+key sends the escape chord shells expect (⌥B = back one word) instead of typing a special character (∫)." + } + L10nKey::SettingsAgentsIntro => "Agents", + L10nKey::SettingsAgentsIntroDesc => { + "Hook integrations give panes running these agents live session status (working / waiting / done) in the tab bar. Only active inside tty7." + } + L10nKey::SettingsReadingAgentConfig => "Reading this machine's agent config…", + L10nKey::SettingsStatusNotInstalled => "Not installed", + L10nKey::SettingsStatusInstalled => "Installed", + L10nKey::SettingsStatusOutdated => "Outdated", + L10nKey::SettingsInstall => "Install", + L10nKey::SettingsReinstall => "Reinstall", + L10nKey::SettingsUpdate => "Update", + L10nKey::SettingsUninstall => "Uninstall", + L10nKey::SettingsOfflineMachines => { + "{count} more saved machines are not connected — open a workspace on one to install its hooks there." + } + L10nKey::SettingsSyncWithSystem => "Sync with system", + L10nKey::SettingsSyncWithSystemDesc => { + "Follow the OS appearance with separate light and dark themes." + } + L10nKey::SettingsChangeTheme => "Change theme", + L10nKey::SettingsThemes => "Themes", + L10nKey::SettingsThemePanelManual => "Change your current theme.", + L10nKey::SettingsThemePanelLight => "Choose the theme for light mode.", + L10nKey::SettingsThemePanelDark => "Choose the theme for dark mode.", + L10nKey::SettingsCustom => "Custom", + L10nKey::SettingsBuiltIn => "Built-in", + L10nKey::SettingsDark => "Dark", + L10nKey::SettingsLight => "Light", + L10nKey::SettingsLightMode => "Light mode", + L10nKey::SettingsDarkMode => "Dark mode", + L10nKey::SettingsActive => "Active", + L10nKey::SettingsStartupWindow => "Startup window", + L10nKey::SettingsStartupWindowDesc => "Window state when tty7 launches.", + L10nKey::SettingsRememberWindowSize => "Remember window size & position", + L10nKey::SettingsRememberWindowSizeDesc => { + "Reopen at the size and position the window had when tty7 last quit. Off opens centered at the default size." + } + L10nKey::SettingsRestoreLastLayout => "Restore last layout", + L10nKey::SettingsRestoreLastLayoutDesc => { + "Reopen the last window's tabs, splits, and directories on launch. Off starts with a single fresh terminal." + } + L10nKey::SettingsConfirmLastWindowClose => "Confirm before closing the last window", + L10nKey::SettingsConfirmLastWindowCloseDesc => { + "Ask first, since that close also quits tty7. Off closes straight away — either way your shells keep running in the background." + } + L10nKey::SettingsShowTrayIcon => "Show tray icon", + L10nKey::SettingsShowTrayIconDesc => { + "Keep a status item in the system tray / menu bar: it signals when a coding agent needs your input, and its menu jumps to agent panes." + } + L10nKey::SettingsTabs => "Tabs", + L10nKey::SettingsNewTabPosition => "New tab position", + L10nKey::SettingsNewTabPositionDesc => "Where a freshly opened tab is inserted.", + L10nKey::SettingsTabBarPosition => "Tab bar position", + L10nKey::SettingsTabBarPositionDesc => { + "Show tabs as a horizontal strip on top or a vertical sidebar on the left." + } + L10nKey::SettingsSidebarGrouping => "Sidebar grouping", + L10nKey::SettingsSidebarGroupingDesc => { + "Group sidebar tabs under a header per git repository, with non-repo tabs in a Scratch section. Only applies to the left sidebar." + } + L10nKey::SettingsDiffPreviewFromCounts => "Open diff preview from sidebar counts", + L10nKey::SettingsDiffPreviewFromCountsDesc => { + "Click a row's +N −N to open the working-tree diff in an overlay. Off keeps the branch and the counts on the row and just stops them being clickable." + } + L10nKey::SettingsNotifications => "Notifications", + L10nKey::SettingsNotifyOnCommandFinish => "Notify on command finish", + L10nKey::SettingsNotifyOnCommandFinishDesc => { + "Desktop alert after a long foreground command completes." + } + L10nKey::SettingsNotifyThreshold => "Notify threshold", + L10nKey::SettingsNotifyThresholdDesc => { + "How long a command must run to qualify as \"long\"." + } + L10nKey::SettingsWindow => "Window", + L10nKey::NotifyModeNever => "Never", + L10nKey::NotifyModeUnfocused => "When Unfocused", + L10nKey::NotifyModeAlways => "Always", + L10nKey::SettingsStartupNormal => "Normal", + L10nKey::SettingsStartupMaximized => "Maximized", + L10nKey::SettingsStartupFullscreen => "Fullscreen", + L10nKey::SettingsAfterCurrent => "After current", + L10nKey::SettingsAtEnd => "At end", + L10nKey::SettingsTop => "Top", + L10nKey::SettingsLeft => "Left", + L10nKey::SettingsByRepo => "By repo", + L10nKey::SettingsFlat => "Flat", + L10nKey::SettingsPreset => "Preset", + L10nKey::SettingsPresetDesc => { + "tmux remaps pane/tab actions onto prefix sequences (e.g. Ctrl-B then C)." + } + L10nKey::SettingsPrefix => "Prefix", + L10nKey::SettingsPressKeys => "Press keys…", + L10nKey::SettingsPauseToSaveEsc => "pause to save · Esc", + L10nKey::SettingsKeybindingsIntroDesc => { + "Click a shortcut, then press the new keys — it saves after a brief pause. Chain keys for a sequence like Ctrl-B then X. Esc cancels; Backspace removes the last key, or resets the shortcut to default when pressed first." + } + L10nKey::SettingsPrefixNote => { + "With a prefix active, a bare prefix key reaches the shell after a ~1s pause, and prefix + an unbound key is sent through to the terminal." + } + L10nKey::SettingsRestoreAllDefaults => "Restore all defaults", + L10nKey::SettingsAboutDesc1 => { + "A terminal workbench: persistent sessions, remote work, agents." + } + L10nKey::SettingsAboutTech => { + "Pure Rust · GPU rendering on Zed's gpui · VT core from Alacritty" + } + L10nKey::SettingsVersion => "Version", + L10nKey::SettingsUpdates => "Updates", + L10nKey::SettingsUpdateAndRelaunch => "Update and Relaunch", + L10nKey::SettingsUpdateViewRelease => "View Release", + L10nKey::SettingsUpdateChecking => "Checking for updates…", + L10nKey::SettingsUpdateUpToDate => "You're running the latest version.", + L10nKey::SettingsUpdateDownloading => "Downloading and verifying the update…", + L10nKey::SettingsUpdateInstalling => "Relaunching with the update…", + L10nKey::SettingsUpdateCheckNow => "Check Now", + L10nKey::SettingsUpdateCheckFailed => "Could not check for updates: {error}", + L10nKey::SettingsUpdatePrepareFailed => "Update failed: {error}", + L10nKey::SettingsUpdateLaunchFailed => "Could not start the installer: {error}", + L10nKey::SettingsUpdateUnsupportedMacos => { + "This copy is not running from a writable tty7.app bundle, so replacing it would be unsafe. Move tty7 to Applications or another writable folder, or open the release page to install the update." + } + L10nKey::SettingsUpdateUnsupportedLinux => { + "The first in-app updater supports packaged macOS app bundles. Use the release page or your package manager to update this Linux installation." + } + L10nKey::SettingsUpdateUnsupportedWindows => { + "Automatic Windows updates are available for recognized Inno Setup and portable ZIP installations. This copy is missing a valid installation marker, updater, or writable portable directory, so open the release page to update it manually." + } + L10nKey::SettingsUpdateWindowsAllUsers => { + "tty7 is installed for all users, which needs administrator rights to replace. tty7 will not raise an elevation prompt on its own behalf, so open the release page and run the installer yourself to update it." + } + L10nKey::SettingsUpdateUnsupportedPlatform => { + "Automatic installation is not available on this platform. Open the release page." + } + L10nKey::SettingsUpdateMissingPackage => { + "The release has no {name} package for this installation. Open the release page to choose another package." + } + L10nKey::SettingsUpdateMissingChecksums => { + "The release has no checksums.txt, so tty7 refuses to install it automatically." + } + L10nKey::SettingsVersionAvailable => "Version {version} is available.", + L10nKey::SettingsCheckUpdatesDesc => { + "Installations that cannot update in place open the release page instead." + } + L10nKey::SettingsCheckUpdatesOnLaunch => "Check for updates on launch", + L10nKey::SettingsCommandLine => "Command line", + L10nKey::SettingsCommandLineDesc => { + "Put the bundled `tty7` command on your PATH at launch, so scripts and coding agents can drive tty7 from any terminal. Inside a tty7 pane it works either way. Turn this off if you keep your own `tty7` — one you built or installed yourself — and do not want it shadowed. Takes effect at next launch." + } + L10nKey::SettingsInstallCliOnPath => "Install the `tty7` command on PATH", + L10nKey::SettingsServer => "Server", + L10nKey::SettingsServerDesc => { + "Restarts the background server that keeps your shells running. This ends every shell on this computer; your tabs and layout reopen with fresh ones." + } + L10nKey::SettingsRestartServer => "Restart server…", + L10nKey::SettingsAppHttpProxy => "Proxy for updates", + L10nKey::SettingsAppHttpProxyDesc => { + "Optional proxy for tty7's own update checks and downloads. It does not affect programs running in your panes — those use their own environment. Leave empty to follow the system proxy. Examples: http://127.0.0.1:7890, socks5://127.0.0.1:1080." + } + L10nKey::SettingsAppHttpProxyInvalid => { + "Not a valid proxy address — this value was not saved." + } + L10nKey::SettingsAgentClaudeCode => "Claude Code", + L10nKey::SettingsAgentCodex => "Codex", + L10nKey::SettingsAgentCopilotCli => "Copilot CLI", + L10nKey::SettingsAgentOpencode => "OpenCode", + L10nKey::SettingsAgentPi => "Pi", + L10nKey::SettingsAgentGrokBuild => "Grok Build", + L10nKey::SettingsSearchAboutKeywords => "version license credits build update check github", + L10nKey::SettingsSearchAppHttpProxyKeywords => { + "proxy http https socks socks5 clash v2ray network download update" + } + L10nKey::SettingsSearchAnsiColorsKeywords => "palette 16 terminal colours theme", + L10nKey::SettingsSearchArgumentsKeywords => "shell flags login args", + L10nKey::SettingsSearchBlurKeywords => { + "transparency translucent frosted vibrancy window background" + } + L10nKey::SettingsSearchBoldFontKeywords => "typeface weight", + L10nKey::SettingsSearchClaudeCodeKeywords => { + "agent integration hooks install uninstall status rich session working waiting tab bar sidebar badge claude" + } + L10nKey::SettingsSearchCodexKeywords => "agent integration hooks install openai codex", + L10nKey::SettingsSearchCommandLineToolKeywords => { + "cli tty7 path shell command install symlink terminal iterm agent script" + } + L10nKey::SettingsSearchCommandLineToolTitle => "Command line tool", + L10nKey::SettingsSearchConfirmLastWindowCloseKeywords => { + "close quit confirm prompt dialog ask again warn last window cmd-w ctrl-w" + } + L10nKey::SettingsSearchCopilotCliKeywords => { + "agent integration hooks install github copilot" + } + L10nKey::SettingsSearchCopyOnSelectKeywords => "clipboard selection yank mouse", + L10nKey::SettingsSearchCursorBlinkKeywords => "caret blinking flash", + L10nKey::SettingsSearchCursorShapeKeywords => "caret block bar underline beam", + L10nKey::SettingsSearchCustomThemesKeywords => { + "theme duplicate edit colors folder yaml import" + } + L10nKey::SettingsSearchDetectUrlsKeywords => "links hyperlink clickable open", + L10nKey::SettingsSearchDiffPreviewFromCountsKeywords => { + "diff overlay preview sidebar counts git changes click branch lines" + } + L10nKey::SettingsSearchDimInactivePanesKeywords => { + "fade unfocused inactive split pane focus opacity highlight active dimming" + } + L10nKey::SettingsSearchFocusFollowsMouseKeywords => "pane hover activate", + L10nKey::SettingsSearchFontFamilyKeywords => "typeface monospace typography", + L10nKey::SettingsSearchFontLigaturesKeywords => "typography glyph fira", + L10nKey::SettingsSearchFontSizeKeywords => "typography text bigger smaller zoom", + L10nKey::SettingsSearchForwardSshLoopbackLinksKeywords => { + "ssh remote port tunnel localhost forward links" + } + L10nKey::SettingsSearchGrokBuildKeywords => { + "agent integration hooks install xai grok build" + } + L10nKey::SettingsSearchHideMouseWhileTypingKeywords => "cursor pointer autohide", + L10nKey::SettingsSearchHistorySearchKeywords => { + "ctrl-r reverse search fuzzy history recall fzf prompt" + } + L10nKey::SettingsSearchHostsKeywords => { + "ssh host connection saved profile import ssh_config manage add edit quick connect" + } + L10nKey::SettingsSearchHowShellsWorkKeywords => { + "shell session daemon server detach persist background close quit stop delete workspace layout survive reboot tmux" + } + L10nKey::SettingsSearchHowShellsWorkTitle => "How shells work", + L10nKey::SettingsSearchItalicFontKeywords => "typeface oblique", + L10nKey::SettingsSearchKeybindingsKeywords => { + "shortcut hotkey keyboard binding chord tmux preset rebind prefix" + } + L10nKey::SettingsSearchKeybindingsTitle => "Keybindings", + L10nKey::SettingsSearchLineHeightKeywords => "typography leading spacing", + L10nKey::SettingsSearchNewTabPositionKeywords => "tabs order end after current", + L10nKey::SettingsSearchNotifyOnCommandFinishKeywords => { + "notification alert done osc desktop banner long command" + } + L10nKey::SettingsSearchNotifyThresholdKeywords => { + "notification alert seconds duration long command delay" + } + L10nKey::SettingsSearchOpacityKeywords => { + "transparency translucent see through window alpha" + } + L10nKey::SettingsSearchOpenFilesWithKeywords => { + "links file editor command external app path line column" + } + L10nKey::SettingsSearchOpencodeKeywords => "agent integration plugin install opencode", + L10nKey::SettingsSearchOptionAsMetaKeywords => { + "alt keyboard modifier escape macos option meta option acts as meta" + } + L10nKey::SettingsSearchPiKeywords => "agent integration extension install pi", + L10nKey::SettingsSearchPortForwardingKeywords => { + "ssh tunnel local remote dynamic socks forward rule" + } + L10nKey::SettingsSearchProgramKeywords => { + "shell binary zsh bash fish nu nushell pwsh powershell executable launch" + } + L10nKey::SettingsSearchRememberWindowSizeKeywords => { + "window size position bounds geometry launch startup remember" + } + L10nKey::SettingsSearchReportMouseToAppsKeywords => { + "mouse reporting vim tmux click scroll shift passthrough" + } + L10nKey::SettingsSearchRestoreLastLayoutKeywords => { + "restore session previous tabs splits reopen launch startup layout" + } + L10nKey::SettingsSearchScrollSpeedKeywords => "mouse wheel multiplier scrolling", + L10nKey::SettingsSearchScrollbackKeywords => "history buffer lines scroll", + L10nKey::SettingsSearchShowTrayIconKeywords => { + "tray menu bar status item agent attention system icon" + } + L10nKey::SettingsSearchSidebarGroupingKeywords => { + "tabs group repo repository git scratch header sidebar flat" + } + L10nKey::SettingsSearchSmartSelectionKeywords => { + "double click word url path select semantic bracket email" + } + L10nKey::SettingsSearchStartInKeywords => { + "cwd working directory start folder path home inherit custom" + } + L10nKey::SettingsSearchSyncWithSystemKeywords => { + "theme dark light auto follow os appearance mode" + } + L10nKey::SettingsSearchTabBarPositionKeywords => { + "tabs vertical sidebar left top layout rail" + } + L10nKey::SettingsSearchTabCompletionKeywords => { + "complete completion menu suggestions tab prompt" + } + L10nKey::SettingsSearchTerminalBellKeywords => { + "bell audible visual flash sound silence beep both ^g" + } + L10nKey::SettingsSearchThemeKeywords => { + "appearance color colours scheme dark light palette background foreground accent sync system os auto follow" + } + L10nKey::SettingsSearchTrimTrailingSpacesKeywords => "clipboard whitespace copy", + L10nKey::SettingsSearchVerifyHostKeysKeywords => { + "ssh security known_hosts fingerprint mitm host key verification" + } + L10nKey::SettingsSearchWarnBeforeClosingKeywords => { + "ssh confirm close tab pane live session security" + } + L10nKey::SettingsSearchStartupWindowKeywords => "launch open maximized fullscreen normal", + L10nKey::SwitcherNoMatch => "No workspace or machine matches.", + L10nKey::AddSshHost => "Add SSH Host…", + L10nKey::ClickForNewWindow => "click for a new window", + L10nKey::RestartServer => "Restart Server", + L10nKey::OtherMachines => "Other Machines", + L10nKey::Ok => "OK", + L10nKey::SftpNoTransfers => "No transfers yet.", + L10nKey::SftpPanelTitleFiles => "Files", + L10nKey::SftpTooltipRefresh => "Refresh", + L10nKey::SftpTooltipMore => "More", + L10nKey::SftpMenuNewFolder => "New folder", + L10nKey::SftpMenuNewFile => "New file", + L10nKey::SftpMenuUpload => "Upload…", + L10nKey::SftpMenuGotoShellCwd => "Go to shell directory", + L10nKey::SftpMenuHideTransferHistory => "Hide transfer history", + L10nKey::SftpMenuTransferHistory => "Transfer history", + L10nKey::SftpEditNewFolder => "New folder", + L10nKey::SftpEditNewFile => "New file", + L10nKey::SftpEditRename => "Rename", + L10nKey::SftpEditPermissions => "Permissions · {mode}", + L10nKey::SftpLoading => "Loading…", + L10nKey::SftpEmptyDirectory => "Empty directory.", + L10nKey::SftpContextOpen => "Open", + L10nKey::SftpContextFollowSymlink => "Follow symlink", + L10nKey::SftpContextRename => "Rename", + L10nKey::SftpContextChmod => "chmod…", + L10nKey::SftpTransferSummaryRunning => "{count} transferring · {pct}%", + L10nKey::SftpTransferSummaryFailed => "{count} failed", + L10nKey::SftpTransferSummaryIdle => "Transfers", + L10nKey::SftpTransferProgress => "{done} / {total} ({pct}%)", + L10nKey::SftpTransferDone => "done", + L10nKey::SftpTransferCancelled => "cancelled", + L10nKey::SftpTransferError => "error", + L10nKey::SftpImagePasteUploadFailed => { + "Could not upload the pasted image to {host}: {error}" + } + L10nKey::ForwardPanelTitle => "Forwards", + L10nKey::ForwardDisconnected => "Disconnected", + L10nKey::ForwardDisconnectedFrom => "Disconnected from {host}", + L10nKey::ForwardTooltipAdd => "Add forward", + L10nKey::ForwardTooltipRemove => "Remove", + L10nKey::ForwardLocal => "Local", + L10nKey::ForwardRemote => "Remote", + L10nKey::ForwardDynamic => "Dynamic", + L10nKey::ForwardBindLabel => "bind", + L10nKey::ForwardToLabel => "to", + L10nKey::ForwardSocksLabel => "SOCKS", + L10nKey::ForwardAdd => "Add", + L10nKey::FileTreePlaceholderFileName => "file name", + L10nKey::FileTreePlaceholderFolderName => "folder name", + L10nKey::FileTreePlaceholderNewName => "new name", + L10nKey::FileTreeDeleteTitle => "Delete \"{name}\"?", + L10nKey::FileTreeDeleteFolderBody => "The folder and everything inside it will be deleted.", + L10nKey::FileTreeDeleteFileBody => "The file will be deleted.", + L10nKey::FileTreeDeleteFailed => "Delete failed", + L10nKey::FileTreeContextOpen => "Open", + L10nKey::FileTreeContextCdHere => "cd Here", + L10nKey::FileTreeContextInsertPath => "Insert Path in Terminal", + L10nKey::FileTreeContextAttachAgent => "Attach to Agent", + L10nKey::FileTreeContextNewFile => "New File", + L10nKey::FileTreeContextNewFolder => "New Folder", + L10nKey::FileTreeContextRename => "Rename", + L10nKey::FileTreeContextCopyPath => "Copy Path", + L10nKey::FileTreeContextHideDotfiles => "Hide Dotfiles", + L10nKey::FileTreeContextShowDotfiles => "Show Dotfiles", + L10nKey::SshPromptNewKey => "new {fingerprint}", + L10nKey::SshPromptOldKey => "old {old_fingerprint}", + L10nKey::EditorCantOpen => "Can't open {path}: {e}", + L10nKey::EditorCantRead => "Can't read {path}: {e}", + L10nKey::EditorNotUtf8 => "\"{path}\" is not valid UTF-8", + L10nKey::EditorSaveFailed => "Save failed", + L10nKey::EditorUnsavedChanges => "\"{name}\" has unsaved changes", + L10nKey::EditorDiscard => "Discard", + L10nKey::EditorNoFileOpen => "No file open", + L10nKey::EditorBackToTerminal => "Back to Terminal (Esc)", + L10nKey::EditorLnCol => "Ln {line}, Col {column}", + L10nKey::EditorEdit => "Edit", + L10nKey::EditorPreview => "Preview", + L10nKey::EditorWrapOn => "Wrap: on", + L10nKey::EditorWrapOff => "Wrap: off", + L10nKey::EditorFileTooLarge => "\"{path}\" is too large for the editor ({size} MB)", + L10nKey::EditorBinaryFile => "\"{path}\" looks like a binary file", + L10nKey::PanelInfoTitle => "Info", + L10nKey::PanelChangesTitle => "Changes", + L10nKey::PanelFilesTitle => "Files", + L10nKey::PanelNoSession => "No active session.", + L10nKey::PanelNoSessionHint => { + "Open a tab to see its shell, directory, and processes here." + } + L10nKey::PanelNoWorkingDirectory => "No working directory.", + L10nKey::PanelNoWorkingDirectoryHint => "This pane has not reported one yet.", + L10nKey::PanelLoading => "Loading…", + L10nKey::PanelNotAGitRepo => "Not a git repository.", + L10nKey::PanelNotAGitRepoHint => "cd into one and this tab lists its uncommitted changes.", + L10nKey::PanelNoChanges => "No uncommitted changes.", + L10nKey::PanelNoChangesHint => "The working tree is clean.", + L10nKey::PanelSessionSubtitle => "Session", + L10nKey::PanelProcessesSubtitle => "Processes", + L10nKey::PanelPortsSubtitle => "Ports", + L10nKey::PanelCwd => "cwd", + L10nKey::PanelShell => "shell", + L10nKey::PanelSsh => "ssh", + L10nKey::PanelBranch => "branch", + L10nKey::PanelChangesRow => "changes", + L10nKey::PanelAgent => "agent", + L10nKey::PanelAgentIdle => "idle", + L10nKey::PanelAgentWorking => "working", + L10nKey::PanelAgentWaiting => "waiting", + L10nKey::PanelAgentDone => "done", + L10nKey::PanelRevealInFinder => "Reveal in Finder", + L10nKey::PanelOpenFolder => "Open Folder", + L10nKey::WindowStop => "Stop", + L10nKey::WindowDelete => "Delete", + L10nKey::WindowThisWorkspace => "this workspace", + L10nKey::WindowConfirmTitle => "{verb} Workspace \"{name}\"?", + L10nKey::WindowStopUnreachable => { + "Its machine could not be reached. Any shells still running there will be ended." + } + L10nKey::WindowDeleteUnreachable => { + "Its machine could not be reached. Any shells still running there will be ended, and the layout forgotten." + } + L10nKey::WindowStopShells => "{count} running shells will be ended.", + L10nKey::WindowDeleteShells => { + "{count} running shells will be ended and the layout forgotten." + } + L10nKey::DiffReading => "Reading diff…", + L10nKey::DiffNotARepo => "Not a git repository", + L10nKey::DiffReadFailed => { + "Couldn't read the working-tree diff — retrying on the next refresh." + } + L10nKey::DiffWorkingTreeClean => "Working tree clean", + L10nKey::DiffCloseTooltip => "Close Diff (Esc)", + L10nKey::DiffChangedFiles => "{count} changed files", + L10nKey::DiffUntrackedCount => " · {count} untracked", + L10nKey::DiffMoreFiles => { + "… and {count} more changed files — run `git diff` in the terminal to see them." + } + L10nKey::DiffOversizedNotice => { + "This working tree is too large to render efficiently ({summary}). Every file is collapsed — expand individual files, or run `git diff` in the terminal." + } + L10nKey::DiffTruncatedPerFile => { + "Diff truncated at {limit} lines — run `git diff` in the terminal for the rest." + } + L10nKey::DiffTruncatedBudget => { + "Body not loaded — this working tree is past tty7's diff budget. Run `git diff` in the terminal for this file." + } + L10nKey::DiffUntrackedHeader => "Untracked files ({count})", + L10nKey::DiffMoreUntracked => { + "… and {count} more — run `git status` in the terminal to see them." + } + L10nKey::DiffLines => "{count} diff lines", + L10nKey::DiffChangedLines => { + "{total} changed lines, {loaded} diff rows loaded before {cap} cut the rest" + } + L10nKey::DiffBudgetAndCap => "tty7's budget and the per-file cap", + L10nKey::DiffBudget => "tty7's budget", + L10nKey::DiffPerFileCap => "the per-file cap", + L10nKey::DiffUntrackedSummary => "{count} untracked", + L10nKey::PendingConnecting => "Connecting to {machine}…", + L10nKey::PendingUnreachable => "Couldn't reach {machine}", + L10nKey::WorktreePromptNeedsName => "The worktree needs a name", + L10nKey::WorktreePromptTitle => "New Worktree Tab", + L10nKey::WorktreePromptName => "Worktree Name", + L10nKey::WorktreePromptBranch => "New Branch", + L10nKey::WorktreePromptBase => "Start From", + L10nKey::WorktreePromptCreating => "Creating…", + L10nKey::WorktreePromptCreate => "Create", + L10nKey::AppNewWorktreeFailed => "New worktree failed: {error}", + L10nKey::HomeTimeJustNow => "just now", + L10nKey::HomeTimeMinutesAgo => "{count} min ago", + L10nKey::HomeTimeHourAgo => "1 hour ago", + L10nKey::HomeTimeHoursAgo => "{count} hours ago", + L10nKey::HomeTimeYesterday => "yesterday", + L10nKey::HomeTimeDaysAgo => "{count} days ago", + L10nKey::HomeTimeOverWeekAgo => "over a week ago", + L10nKey::HomeReopenNamed => "Reopen \"{name}\"", + L10nKey::RemoteStripDisconnected => "Not connected to {machine}", + L10nKey::RemoteStripConnecting => "Connecting to {machine}…", + L10nKey::RemoteStripReconnecting => "Reconnecting to {machine}…", + L10nKey::RemoteStripReconnectingAttempt => "Reconnecting to {machine}… (attempt {count})", + L10nKey::RemoteStripPreempted => "This workspace was opened on {by}", + L10nKey::RemoteStripFailed => "Not connected to {machine} — {error}", + L10nKey::RemoteNoticePreempted => "Opened elsewhere — typing has no effect", + L10nKey::RemoteNoticeDisconnected => "Not connected — typing has no effect", + L10nKey::RemoteActionRetryNow => "Retry Now", + L10nKey::RemoteActionTakeBack => "Take Back", + L10nKey::RemoteActionConnect => "Connect", + L10nKey::RemoteActionRetry => "Retry", + L10nKey::RemoteNoConnectionDetails => { + "This window is a workspace on {machine}, but tty7 has no connection \ + details for it any more — check that its SSH profile or ~/.ssh/config \ + entry still exists." + } + L10nKey::RemoteThisComputer => "this computer", + L10nKey::RemoteRestartTitle => "Restart tty7's server on \"{machine}\"?", + L10nKey::RemoteRestartBody => { + "This stops every shell on {machine} — anything still running in them \ + will be terminated, including shells this window is not showing. \ + Workspaces and layouts are kept and come back with fresh shells." + } + L10nKey::RemoteReplaceBody => { + "The tty7-server running on {machine} speaks a protocol this client \ + cannot. tty7 will restart the service there onto one that does, installing it \ + first if {machine} does not already have it.\n\ + \n\ + Every session running on {machine} ends, including any this window is not \ + connected to." + } + L10nKey::RemoteRestartFailedTitle => "tty7's server on \"{machine}\" was not restarted", + L10nKey::RemoteRestartFailedBody => { + "{error}\n\ + \n\ + Sessions still running there are on the older build. If they are \ + gone, reconnecting starts this build's server." + } + L10nKey::RemoteHostUnreachable => "could not reach {machine}: {error}", + L10nKey::RemoteInstallTitle => "Install tty7's server on \"{machine}\"?", + L10nKey::RemoteInstallDetail => { + "tty7 will write its server binary to {machine} so this machine can host \ + workspaces there. Nothing else on {machine} is touched, and no sudo is used.\n\ + \n\ + {path_label}\u{2003}{path}\n\ + {version_label}\u{2003}{version}\n\ + {size_label}\u{2003}{size}\n\ + {from_label}\u{2003}{from}\n\ + {sha_label}\u{2003}{sha256}\n\ + \n\ + {silent_upgrades}" + } + L10nKey::RemoteInstallPathLabel => "Path", + L10nKey::RemoteInstallVersionLabel => "Version", + L10nKey::RemoteInstallSizeLabel => "Size", + L10nKey::RemoteInstallFromLabel => "From", + L10nKey::RemoteInstallShaLabel => "SHA-256", + L10nKey::RemoteInstallSilentUpgrades => "Later upgrades on this machine install silently.", + L10nKey::RemoteInstallBytes => "bytes", + L10nKey::RemoteMismatchTitle => "Update tty7's server on \"{machine}\"?", + L10nKey::RemoteMismatchDetail => { + "{machine} is serving tty7 sessions from {running}, which speaks a protocol \ + this client ({wanted}) cannot. tty7 has installed a matching server there, \ + but the one already running is the one your sessions are on.\n\ + \n\ + {replace_server}\u{2003}replaces it with {wanted} and ends every session it is hosting.\n\ + {cancel}\u{2003}leaves {machine} exactly as it is. This window will not connect." + } + L10nKey::RemoteMismatchReplaceServer => "Update Server", + L10nKey::RemoteMismatchUnknownBuild => "an unknown build", + L10nKey::RemoteMismatchUnknownBuildFromExe => "an unknown build (from {exe})", + L10nKey::RemoteDaemonStartFailed => "tty7's local server could not be started: {error}", + L10nKey::RemoteDaemonUnreachable => "could not reach tty7's local server: {error}", + L10nKey::RemoteDaemonTooOld => { + "this machine's tty7 daemon is an older build and cannot restart the server on \ + {machine}. Quit tty7 (which stops the daemon) and open it again, then retry." + } + L10nKey::RemoteProfileMissing => "that saved SSH profile no longer exists", + L10nKey::RemoteAliasMissing => "`{alias}` is no longer in ~/.ssh/config", + L10nKey::RemoteWslNoSsh => "a WSL workspace has no SSH connection", + L10nKey::RemoteLocalStdioNoSsh => "a local --stdio workspace has no SSH connection", + L10nKey::RemoteHostNotTty7 => "{machine} answered, but not as a tty7 server: {error}", + L10nKey::RemoteWorkspaceListFailed => { + "connected to {machine}, but its workspace list failed: {error}" + } + L10nKey::RemoteServerRestartFailed => { + "could not restart tty7's server on {machine}: {error}" + } + L10nKey::RemoteNoRouteToHost => "tty7 no longer has a way to reach {machine}", + L10nKey::RemoteMachineTreeUnexpectedReply => { + "the server answered a machine tree with {reply}" + } + L10nKey::RemoteMismatchVersionFromExe => "{version} (from {exe})", + L10nKey::AppNoRunningCodingAgent => { + "No running coding agent found — start one (claude, codex, …) in a pane first." + } + L10nKey::SwitcherThisComputer => "This Computer", + L10nKey::SwitcherRestartingServer => "Restarting tty7's server…", + L10nKey::SwitcherDownloadingServerWithTotal => { + "Downloading tty7's server… {done} / {total}" + } + L10nKey::SwitcherDownloadingServerNoTotal => "Downloading tty7's server… {done}", + L10nKey::SwitcherCopyingServer => "Copying tty7's server… {done} / {total}", + L10nKey::SwitcherThisWindow => "this window", + L10nKey::SwitcherOpen => "open", + L10nKey::SwitcherDisconnect => "Disconnect", + L10nKey::SwitcherOpenInNewWindow => "Open in New Window", + L10nKey::SwitcherRename => "Rename…", + L10nKey::SshPromptPasswordFor => "Password for {user}@{host}", + L10nKey::SshPromptPassphraseFor => "Passphrase for {key_path}", + L10nKey::SshPromptTwoFactor => "Two-factor authentication", + L10nKey::SshPromptUnknownHost => "Unknown host {host}", + L10nKey::SshPromptHostKeyChanged => "Host key CHANGED — possible man-in-the-middle", + L10nKey::SshPromptHostKeyChangedBody => { + "The host key differs from the one previously trusted. This may be an attack." + } + L10nKey::SshPromptConnect => "Connect", + L10nKey::SshPromptUnlock => "Unlock", + L10nKey::SshPromptSubmit => "Submit", + L10nKey::HostOpsError => "{context}: {error}", + L10nKey::CmdGroupTabsPanes => "Tabs & Panes", + L10nKey::CmdGroupWorkspaces => "Workspaces", + L10nKey::CmdGroupView => "View", + L10nKey::CmdGroupTerminal => "Terminal", + L10nKey::CmdGroupSsh => "SSH", + L10nKey::CmdGroupAgents => "Agents", + L10nKey::CmdGroupApplication => "Application", + L10nKey::CmdNewTab => "New Tab", + L10nKey::CmdNewWorktreeTab => "New Worktree Tab", + L10nKey::CmdNewWorktreeTabSubtitle => "isolated checkout on a fresh branch", + L10nKey::CmdRenameTab => "Rename Tab…", + L10nKey::CmdSplitRight => "Split Right", + L10nKey::CmdSplitDown => "Split Down", + L10nKey::CmdZoomPane => "Zoom Pane", + L10nKey::CmdNextPane => "Next Pane", + L10nKey::CmdPreviousPane => "Previous Pane", + L10nKey::CmdFocusPaneLeft => "Focus Pane Left", + L10nKey::CmdFocusPaneRight => "Focus Pane Right", + L10nKey::CmdFocusPaneUp => "Focus Pane Up", + L10nKey::CmdFocusPaneDown => "Focus Pane Down", + L10nKey::CmdResizePaneLeft => "Resize Pane Left", + L10nKey::CmdResizePaneRight => "Resize Pane Right", + L10nKey::CmdResizePaneUp => "Resize Pane Up", + L10nKey::CmdResizePaneDown => "Resize Pane Down", + L10nKey::CmdSwapPaneNext => "Swap Pane Next", + L10nKey::CmdSwapPanePrevious => "Swap Pane Previous", + L10nKey::CmdNextTab => "Next Tab", + L10nKey::CmdPreviousTab => "Previous Tab", + L10nKey::CmdCopyWorkingDirectory => "Copy Working Directory", + L10nKey::CmdCopySessionId => "Copy Session ID", + L10nKey::CmdCopySessionIdSubtitle => "the coding agent's own session id", + L10nKey::CmdForkSession => "Fork Session", + L10nKey::CmdForkSessionSubtitle => "branch this agent session into a new tab", + L10nKey::CmdMarkTabAsUnread => "Mark Tab as Unread", + L10nKey::CmdClosePaneTab => "Close Pane / Tab", + L10nKey::CmdCloseOtherTabs => "Close Other Tabs", + L10nKey::CmdCloseTabsToTheRight => "Close Tabs to the Right", + L10nKey::CmdReopenClosedTab => "Reopen Closed Tab", + L10nKey::CmdNewWorkspace => "New Workspace", + L10nKey::CmdSwitchWorkspace => "Switch Workspace…", + L10nKey::CmdRenameWorkspace => "Rename Workspace…", + L10nKey::CmdStopWorkspace => "Stop Workspace…", + L10nKey::CmdStopWorkspaceSubtitle => "ends its shells, keeps the layout", + L10nKey::CmdDeleteWorkspace => "Delete Workspace…", + L10nKey::CmdDeleteWorkspaceSubtitle => "ends its shells and forgets the layout", + L10nKey::CmdShowLeftSidebar => "Show Left Sidebar", + L10nKey::CmdHideLeftSidebar => "Hide Left Sidebar", + L10nKey::CmdHideRightPanel => "Hide Right Panel", + L10nKey::CmdShowRightPanel => "Show Right Panel", + L10nKey::CmdShowCodePanel => "Show Code Panel", + L10nKey::CmdTabBarMoveToTop => "Tab Bar: Move to Top", + L10nKey::CmdTabBarMoveToLeftSidebar => "Tab Bar: Move to Left Sidebar", + L10nKey::CmdRightPanelInfo => "Right Panel: Info", + L10nKey::CmdRightPanelChanges => "Right Panel: Changes", + L10nKey::CmdRightPanelFiles => "Right Panel: Files", + L10nKey::CmdChangeTheme => "Change Theme…", + L10nKey::CmdResetFontSize => "Reset Font Size", + L10nKey::CmdEnterFullScreen => "Enter Full Screen", + L10nKey::CmdClearScrollback => "Clear Scrollback", + L10nKey::CmdFindInTerminal => "Find in Terminal…", + L10nKey::CmdFindNext => "Find Next", + L10nKey::CmdFindPrevious => "Find Previous", + L10nKey::CmdCopy => "Copy", + L10nKey::CmdCut => "Cut", + L10nKey::CmdPaste => "Paste", + L10nKey::CmdSelectAll => "Select All", + L10nKey::CmdSshAddConnection => "SSH: Add Connection…", + L10nKey::CmdSshManageProfiles => "SSH: Manage Profiles…", + L10nKey::CmdSshReconnect => "SSH: Reconnect", + L10nKey::CmdSshRemoteFiles => "SSH: Remote Files", + L10nKey::CmdSshPortForwarding => "SSH: Port Forwarding", + L10nKey::CmdSshConnectWithInput => "SSH: Connect {input}", + L10nKey::CmdAgentSendSelection => "Agent: Send Selection", + L10nKey::CmdAgentSendSelectionSubtitle => "selection → running coding agent", + L10nKey::CmdAgentSendGitDiffForReview => "Agent: Send Git Diff for Review", + L10nKey::CmdAgentSendGitDiffSubtitle => "git diff → running coding agent", + L10nKey::CmdSettings => "Settings…", + L10nKey::CmdKeyboardShortcuts => "Keyboard Shortcuts", + L10nKey::CmdAboutTty7 => "About tty7", + L10nKey::CmdCheckForUpdates => "Check for Updates…", + L10nKey::CmdDocumentation => "Documentation", + L10nKey::CmdJoinDiscord => "Join the Discord", + L10nKey::CmdReportIssue => "Report an Issue…", + L10nKey::CmdRestartServer => "Restart Server…", + L10nKey::CmdRestartServerSubtitle => "ends every running shell; layout is kept", + L10nKey::CmdQuitTty7 => "Quit tty7", + L10nKey::CmdQuitTty7Subtitle => "shells keep running", + L10nKey::CmdQuickConnect => "Connect to \"{target}\"", + L10nKey::CmdQuickConnectSaveProfile => "Save \"{target}\" as profile…", + L10nKey::CmdRecent => "Recent", + L10nKey::AppRestartServerTitle => "Restart Server?", + L10nKey::AppRestartServerMismatchDetail => { + "The server holding your shells is from another build (v{build}, protocol {protocol} — this app speaks {ours}). You can keep using it and your shells stay, but features whose wire format changed may misbehave until it's restarted. Restarting starts a clean server: tabs reopen with fresh shells and anything running in them is terminated." + } + L10nKey::AppRestartServerOldDetail => { + "The server holding your shells is from an older version of the app. You can keep using it and your shells stay, but newer features may misbehave until it's restarted. Restarting starts a clean server: tabs reopen with fresh shells and anything running in them is terminated." + } + L10nKey::AppKeepShells => "Keep Shells", + L10nKey::AppRestart => "Restart", + L10nKey::AppRestartServerNotSsh => { + "tty7 can only restart the server on machines it reaches over SSH. {label} is served from this computer — stop its workspace instead." + } + L10nKey::AppRestartServerBody => { + "This stops every running shell on this computer — anything still running in them will be terminated. Your tabs and layout are kept and reopened with fresh shells." + } + L10nKey::AppWorktreeRemoveDetailDirty => { + "The closed tab's worktree at {path} has uncommitted changes." + } + L10nKey::AppWorktreeRemoveDetailClean => "The closed tab's worktree at {path} is clean.", + L10nKey::AppWorktreeRemoveTitle => "Remove worktree \"{branch}\"?", + L10nKey::AppWorktreeDiscardAndRemove => "Discard Changes & Remove", + L10nKey::AppWorktreeRemove => "Remove Worktree", + L10nKey::AppWorktreeKeep => "Keep", + L10nKey::AppReopenTabFailed => "Could not reopen the tab: no terminal started", + L10nKey::AppOpenTerminalFailed => "Could not open a terminal: {error}", + L10nKey::AppSshConnectionFailed => "SSH connection failed: {error}", + L10nKey::AppSshReconnectFailed => "SSH reconnect failed: {error}", + L10nKey::AppSplitPaneFailed => "Could not split the pane: {error}", + L10nKey::AppWorktreeRemoved => "Removed worktree \"{branch}\"", + L10nKey::AppWorktreeRemoveFailed => "Worktree removal failed: {error}", + L10nKey::AppForkStillConnecting => "Could not fork: the pane is still connecting", + L10nKey::AppPaneNoCodingAgent => "This pane isn't running a coding agent", + L10nKey::AppForkNoCommand => "tty7 has no fork command for {name}", + L10nKey::AppForkLocalOnly => "{name} sessions can only be forked from a local pane", + L10nKey::AppForkNoSessionId => { + "tty7 hasn't seen a {name} session id in this pane — install its hooks in Settings → Agents" + } + L10nKey::AppForkSessionIdNotToken => "{name}'s session id isn't a plain token", + L10nKey::AppForkMidTurn => "{name} is mid-turn — the fork won't include the turn in flight", + L10nKey::AppTabNoWorkingDirectory => "This tab has no working directory yet", + L10nKey::AppNothingSelected => "Nothing selected — select some terminal output first.", + L10nKey::AppPaneNoKnownDirectory => "This pane has no known directory.", + L10nKey::AppNoUncommittedChanges => { + "No uncommitted changes in {cwd} (or not a git repository)." + } + L10nKey::AppCmdSshProfileTitle => "SSH: {title}", + L10nKey::AppCmdSwitchToTab => "Switch to Tab: {label}", + L10nKey::AppPlaceholderDescription => "description", + L10nKey::AppPlaceholderSshQuickConnect => "user@host or user@host:port", + L10nKey::AppPlaceholderLoginShell => "login shell", + L10nKey::AppPlaceholderNone => "none", + L10nKey::AppPlaceholderOpenInDefaultApp => "open in default app", + L10nKey::AppThemeColorBackground => "Background", + L10nKey::AppThemeColorForeground => "Foreground", + L10nKey::AppThemeColorAccent => "Accent", + L10nKey::AppThemeColorCursor => "Cursor", + L10nKey::AppThemeColorSelection => "Selection", + L10nKey::AppAgentHooksThisComputer => "This Computer", + L10nKey::AppAgentHooksRemoteMachine => "Remote machine", + L10nKey::AppAgentHooksNoHomeDir => { + "tty7 could not work out this computer's home directory, so there is nowhere to install to." + } + L10nKey::AppAgentHooksOffline => { + "Not connected to this machine, so its agent config can't be read or written. Open a workspace on it and come back." + } + L10nKey::AppAgentHooksHomeDirUnresolved => "cannot resolve home directory", + L10nKey::AppAgentHooksOpFailed => "Failed: {error}", + L10nKey::AppKeybindingDisplacedNote => { + "{action} took the shortcut from {previous}, which is now unset." + } + L10nKey::AppLocalServerName => "the local server", + L10nKey::AppSshParseUnbalancedQuotes => "Unbalanced quotes in the SSH command", + L10nKey::AppSshParseNoRemoteCommands => "Remote commands aren't supported here", + L10nKey::AppSshParseFlagNeedsValue => "-{flag} needs a value", + L10nKey::AppSshParseInvalidPort => "Invalid port \"{value}\"", + L10nKey::AppSshParseUnsupportedOption => "Unsupported option \"{option}\"", + L10nKey::AppSshParseEnterHost => "Enter a host to connect to", + L10nKey::AppSshParseBadHost => "Can't parse host \"{host}\"", + L10nKey::AppMenuMinimize => "Minimize", + L10nKey::AppMenuZoom => "Zoom", + L10nKey::SwitcherStatusRestarting => "restarting…", + L10nKey::SwitcherStatusInstalling => "installing…", + L10nKey::SwitcherStatusConnecting => "connecting…", + L10nKey::SwitcherStatusConnectFailed => "couldn't connect", + L10nKey::SwitcherStatusNotConnected => "not connected", + L10nKey::SettingsFontDefault => "Default (match primary)", + L10nKey::ForwardDescriptionPlaceholder => "what it's for", + L10nKey::SettingsShellDefaultLoginShell => "your login shell", + L10nKey::SftpErrorUnexpectedReply => "unexpected reply: {reply}", + L10nKey::SftpErrorUnsafeRemoteName => "refusing unsafe remote name {name}", + L10nKey::SftpErrorInvalidOctalMode => "invalid octal mode", + L10nKey::PanelMoreChangedFiles => { + "… and {count} more changed files — run `git diff` to see them." + } + L10nKey::PanelUntracked => "{count} untracked", + L10nKey::AppMenuAbout => "About tty7", + L10nKey::AppMenuCheckForUpdates => "Check for Updates…", + L10nKey::AppMenuSettings => "Settings…", + L10nKey::AppMenuServices => "Services", + L10nKey::AppMenuHideApp => "Hide tty7", + L10nKey::AppMenuHideOthers => "Hide Others", + L10nKey::AppMenuShowAll => "Show All", + L10nKey::AppMenuQuit => "Quit tty7", + L10nKey::AppMenuFile => "File", + L10nKey::AppMenuEdit => "Edit", + L10nKey::AppMenuView => "View", + L10nKey::AppMenuWindow => "Window", + L10nKey::AppMenuHelp => "Help", + L10nKey::AppMenuNewTab => "New Tab", + L10nKey::AppMenuNewWorkspace => "New Workspace", + L10nKey::AppMenuNewWorktreeTab => "New Worktree Tab", + L10nKey::AppMenuSplitRight => "Split Right", + L10nKey::AppMenuSplitDown => "Split Down", + L10nKey::AppMenuRenameTab => "Rename Tab…", + L10nKey::AppMenuCopyWorkingDirectory => "Copy Working Directory", + L10nKey::AppMenuCopySessionId => "Copy Session ID", + L10nKey::AppMenuForkSession => "Fork Session", + L10nKey::AppMenuClosePaneTab => "Close Pane / Tab", + L10nKey::AppMenuCloseOtherTabs => "Close Other Tabs", + L10nKey::AppMenuCloseTabsRight => "Close Tabs to the Right", + L10nKey::AppMenuReopenClosedTab => "Reopen Closed Tab", + L10nKey::AppMenuRenameWorkspace => "Rename Workspace…", + L10nKey::AppMenuStopWorkspace => "Stop Workspace…", + L10nKey::AppMenuDeleteWorkspace => "Delete Workspace…", + L10nKey::AppMenuUndo => "Undo", + L10nKey::AppMenuRedo => "Redo", + L10nKey::AppMenuCut => "Cut", + L10nKey::AppMenuCopy => "Copy", + L10nKey::AppMenuPaste => "Paste", + L10nKey::AppMenuSelectAll => "Select All", + L10nKey::AppMenuFind => "Find…", + L10nKey::AppMenuFindNext => "Find Next", + L10nKey::AppMenuFindPrevious => "Find Previous", + L10nKey::AppMenuCommandPalette => "Command Palette…", + L10nKey::AppMenuIncreaseFontSize => "Increase Font Size", + L10nKey::AppMenuDecreaseFontSize => "Decrease Font Size", + L10nKey::AppMenuResetFontSize => "Reset Font Size", + L10nKey::AppMenuLeftSidebar => "Left Sidebar", + L10nKey::AppMenuRightPanel => "Right Panel", + L10nKey::AppMenuCodePanel => "Code Panel", + L10nKey::AppMenuTabBarPosition => "Tab Bar Position", + L10nKey::AppMenuFocusNextPane => "Focus Next Pane", + L10nKey::AppMenuFocusPreviousPane => "Focus Previous Pane", + L10nKey::AppMenuZoomPane => "Zoom Pane", + L10nKey::AppMenuClearScrollback => "Clear Scrollback", + L10nKey::AppMenuEnterFullscreen => "Enter Full Screen", + L10nKey::AppMenuDocumentation => "tty7 Documentation", + L10nKey::AppMenuKeyboardShortcuts => "Keyboard Shortcuts", + L10nKey::AppMenuJoinDiscord => "Join the Discord", + L10nKey::AppMenuReportIssue => "Report an Issue…", + L10nKey::AppMenuRestartServer => "Restart Server…", + L10nKey::WindowUntitled => "Untitled", + L10nKey::TrayShowTty7 => "Show tty7", + L10nKey::TrayNotifications => "Notifications", + L10nKey::TrayAgentNeedsInput => "needs input", + L10nKey::NotifyCommandFinished => "Command finished after {secs}s", + L10nKey::NotifyCommandFinishedWithCommand => "{command} — finished after {secs}s", + L10nKey::NotifyAgentFinished => "Finished after {secs}s", + L10nKey::NotifyAgentWaiting => "Waiting for your input", + L10nKey::NotifyTurnFinished => "Turn finished", + L10nKey::TabTooltipMore => "More", + L10nKey::TabTooltipShowSidebar => "Show Sidebar", + L10nKey::TabTooltipHideSidebar => "Hide Sidebar", + L10nKey::TabTooltipHideDetailPanel => "Hide Detail Panel", + L10nKey::TabTooltipShowDetailPanel => "Show Detail Panel", + L10nKey::TabUnnamedShell => "Shell {n}", + L10nKey::ShellDefault => "default", + L10nKey::SidebarScratchGroup => "Scratch", + L10nKey::TabContextCloseTab => "Close Tab", + L10nKey::TabContextCloseTabsBelow => "Close Tabs Below", + L10nKey::TabContextMarkUnread => "Mark as Unread", + } +} + +pub fn translate_variant_en(key: L10nKey, branch: &'static str) -> Option<&'static str> { + let res = match (key, branch) { + (L10nKey::SettingsAliasesLinked, "zero") => "No aliases linked yet.", + (L10nKey::SettingsAliasesLinked, "one") => "1 alias linked.", + (L10nKey::SettingsAliasesLinked, "other") => "{count} aliases linked.", + (L10nKey::SettingsRulesOpenedWithConnection, "zero") => { + "0 rules, opened with the connection" + } + (L10nKey::SettingsRulesOpenedWithConnection, "one") => "1 rule, opened with the connection", + (L10nKey::SettingsRulesOpenedWithConnection, "other") => { + "{count} rules, opened with the connection" + } + (L10nKey::SettingsOfflineMachines, "zero") => { + "0 more saved machines are not connected — open a workspace on one to install its hooks there." + } + (L10nKey::SettingsOfflineMachines, "one") => { + "1 more saved machine is not connected — open a workspace on it to install its hooks there." + } + (L10nKey::SettingsOfflineMachines, "other") => { + "{count} more saved machines are not connected — open a workspace on one to install its hooks there." + } + (L10nKey::PanelUntracked, "zero") => "0 untracked", + (L10nKey::PanelUntracked, "one") => "1 untracked", + (L10nKey::PanelUntracked, "other") => "{count} untracked", + (L10nKey::PanelMoreChangedFiles, "zero") => { + "… and 0 more changed files — run `git diff` to see them." + } + (L10nKey::PanelMoreChangedFiles, "one") => { + "… and 1 more changed file — run `git diff` to see it." + } + (L10nKey::PanelMoreChangedFiles, "other") => { + "… and {count} more changed files — run `git diff` to see them." + } + (L10nKey::DiffChangedFiles, "zero") => "0 changed files", + (L10nKey::DiffChangedFiles, "one") => "1 changed file", + (L10nKey::DiffChangedFiles, "other") => "{count} changed files", + (L10nKey::DiffUntrackedCount, "zero") => " · 0 untracked", + (L10nKey::DiffUntrackedCount, "one") => " · 1 untracked", + (L10nKey::DiffUntrackedCount, "other") => " · {count} untracked", + (L10nKey::DiffMoreFiles, "zero") => { + "… and 0 more changed files — run `git diff` in the terminal to see them." + } + (L10nKey::DiffMoreFiles, "one") => { + "… and 1 more changed file — run `git diff` in the terminal to see it." + } + (L10nKey::DiffMoreFiles, "other") => { + "… and {count} more changed files — run `git diff` in the terminal to see them." + } + (L10nKey::DiffUntrackedHeader, "zero") => "Untracked files (0)", + (L10nKey::DiffUntrackedHeader, "one") => "Untracked files (1)", + (L10nKey::DiffUntrackedHeader, "other") => "Untracked files ({count})", + (L10nKey::DiffMoreUntracked, "zero") => { + "… and 0 more — run `git status` in the terminal to see them." + } + (L10nKey::DiffMoreUntracked, "one") => { + "… and 1 more — run `git status` in the terminal to see it." + } + (L10nKey::DiffMoreUntracked, "other") => { + "… and {count} more — run `git status` in the terminal to see them." + } + (L10nKey::DiffUntrackedSummary, "zero") => "0 untracked", + (L10nKey::DiffUntrackedSummary, "one") => "1 untracked", + (L10nKey::DiffUntrackedSummary, "other") => "{count} untracked", + (L10nKey::HomeTimeMinutesAgo, "one") => "1 min ago", + (L10nKey::HomeTimeMinutesAgo, "other") => "{count} min ago", + (L10nKey::HomeTimeHoursAgo, "one") => "1 hour ago", + (L10nKey::HomeTimeHoursAgo, "other") => "{count} hours ago", + (L10nKey::HomeTimeDaysAgo, "one") => "1 day ago", + (L10nKey::HomeTimeDaysAgo, "other") => "{count} days ago", + (L10nKey::WindowStopShells, "zero") => { + "Its layout and working directories will be forgotten." + } + (L10nKey::WindowStopShells, "one") => "1 running shell will be ended.", + (L10nKey::WindowStopShells, "other") => "{count} running shells will be ended.", + (L10nKey::WindowDeleteShells, "zero") => { + "Its layout and working directories will be forgotten." + } + (L10nKey::WindowDeleteShells, "one") => { + "1 running shell will be ended and its layout forgotten." + } + (L10nKey::WindowDeleteShells, "other") => { + "{count} running shells will be ended and the layout forgotten." + } + _ => return None, + }; + Some(res) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn english_is_the_complete_table() { + assert_eq!(translate_en(L10nKey::SearchTabs), "Search tabs…"); + assert_eq!( + translate_variant_en(L10nKey::SettingsAliasesLinked, "one"), + Some("1 alias linked.") + ); + assert_eq!(translate_variant_en(L10nKey::SearchTabs, "one"), None); + } +} diff --git a/src/ui/i18n/ja.rs b/src/ui/i18n/ja.rs new file mode 100644 index 00000000..0c4ab393 --- /dev/null +++ b/src/ui/i18n/ja.rs @@ -0,0 +1,1352 @@ +use super::L10nKey; + +pub fn translate_ja(key: L10nKey) -> Option<&'static str> { + Some(match key { + L10nKey::SearchTabs => "タブを検索…", + L10nKey::SearchFiles => "ファイルを検索…", + L10nKey::SearchThemes => "テーマを検索…", + L10nKey::SearchSettings => "設定を検索…", + L10nKey::FilterHosts => "ホストを絞り込み…", + L10nKey::SearchCommandsOrHost => "コマンドを検索するか、user@host を入力して接続…", + L10nKey::SearchTheme => "検索…", + L10nKey::Search => "検索", + L10nKey::SearchWorkspacesAndMachines => "ワークスペースとマシンを検索", + L10nKey::SearchFonts => "フォントを検索…", + L10nKey::NewFolderName => "新しいフォルダ名", + L10nKey::NewFileName => "新しいファイル名", + L10nKey::HomeNewTab => "新規タブ", + L10nKey::HomeReopenClosedTab => "閉じたタブをもう一度開く", + L10nKey::HomeSwitchWorkspace => "ワークスペースを切り替える", + L10nKey::HomeCommandPalette => "コマンドパレット", + L10nKey::HomeSplitRight => "右に分割", + L10nKey::HomeSplitDown => "下に分割", + L10nKey::HomeSettings => "設定…", + L10nKey::TrayQuitStopServer => "終了してサーバーを停止…", + L10nKey::Reconnect => "再接続", + L10nKey::None => "なし", + L10nKey::TryAgain => "再試行", + L10nKey::Refreshing => "更新中…", + L10nKey::Binary => "バイナリファイル", + L10nKey::Delete => "削除", + L10nKey::NoMatchingCommands => "一致するコマンドがありません", + L10nKey::ConnectSshHint => "SSH で接続するには user@host を入力してください", + L10nKey::EditHint => "→ 編集", + L10nKey::OpenFileFromTree => "ファイルツリーからファイルを開く", + L10nKey::FileChangedOnDisk => "ディスク上でファイルが変更されました", + L10nKey::Reload => "再読み込み", + L10nKey::KeepMine => "自分の変更を保持", + L10nKey::Dismiss => "閉じる", + L10nKey::StoredPasswordRejected => { + "保存されたパスワードが拒否されました。新しいパスワードを入力してください" + } + L10nKey::Trust => "信頼する", + L10nKey::Abort => "中止", + L10nKey::HostKeyOverrideMessage => { + "「yes」を入力すると新しいキーを上書きして信頼します。中止するには Esc を押してください" + } + L10nKey::Override => "上書き", + L10nKey::RememberKeychain => "キーチェーンに保存", + L10nKey::CloseWindowTitle => "ウィンドウを閉じますか?", + L10nKey::CloseWindowBody => { + "セッションはバックグラウンドで動き続けます。次回 tty7 を開いたときに、このワークスペースはホームページとタイトルバーのワークスペースメニューに表示されます" + } + L10nKey::Cancel => "キャンセル", + L10nKey::Close => "閉じる", + L10nKey::QuitStopServerTitle => "tty7 を終了してサーバーを停止しますか?", + L10nKey::QuitStopServerBody => { + "tty7 を終了してバックグラウンドサーバーを停止します。シェルで実行中のものはすべて終了します。タブとレイアウトは保持され、次回起動時に新しいシェルで開きます。通常の終了ではシェルは動き続けます。" + } + L10nKey::QuitAndStop => "終了して停止", + L10nKey::CloseSshConnectionTitle => "この SSH 接続を閉じますか?", + L10nKey::CloseSshConnectionBody => "接続中です。閉じると切断されます", + L10nKey::Keep => "保持", + L10nKey::SettingsNavAppearance => "外観", + L10nKey::SettingsNavTerminal => "ターミナル", + L10nKey::SettingsNavInput => "入力", + L10nKey::SettingsNavSsh => "SSH", + L10nKey::SettingsNavAgents => "エージェント", + L10nKey::SettingsNavWindowTabs => "ウィンドウとタブ", + L10nKey::SettingsNavKeybindings => "キーバインド", + L10nKey::SettingsNavAbout => "情報", + L10nKey::SettingsHeader => "設定", + L10nKey::Reset => "リセット", + L10nKey::Save => "保存", + L10nKey::Connect => "接続", + L10nKey::Download => "ダウンロード", + L10nKey::Link => "リンク", + L10nKey::SettingsThemeIntroTitle => "テーマ", + L10nKey::SettingsThemeIntroDesc => { + "配色テーマを選びます。明るいテーマと暗いテーマがあります" + } + L10nKey::SettingsTypography => "タイポグラフィ", + L10nKey::SettingsFontSize => "フォントサイズ", + L10nKey::SettingsFontSizeDesc => "ターミナルテキストのサイズ(ピクセル)", + L10nKey::SettingsLineHeight => "行の高さ", + L10nKey::SettingsLineHeightDesc => "フォントサイズに対する行間の倍率", + L10nKey::SettingsFontFamily => "フォントファミリー", + L10nKey::SettingsFontFamilyDesc => "システムにインストールされているフォントから選択", + L10nKey::SettingsBoldFont => "太字フォント", + L10nKey::SettingsBoldFontDesc => { + "太字テキストに使用する書体。デフォルトではメインフォントから合成されます" + } + L10nKey::SettingsItalicFont => "斜体フォント", + L10nKey::SettingsItalicFontDesc => { + "斜体テキストに使用する書体。デフォルトではメインフォントから合成されます" + } + L10nKey::SettingsFontLigatures => "フォントリガチャー", + L10nKey::SettingsFontLigaturesDesc => { + "ターミナルテキストで一般的なプログラミング用リガチャー(合字)を有効にする" + } + L10nKey::SettingsCursor => "カーソル", + L10nKey::SettingsCursorShape => "カーソルの形状", + L10nKey::SettingsCursorShapeDesc => "ターミナルカーソルの描画方法", + L10nKey::SettingsCursorBlink => "カーソルの点滅", + L10nKey::SettingsCursorBlinkDesc => { + "ターミナルがフォーカスされている間、カーソルを点滅させる" + } + L10nKey::SettingsLanguage => "言語", + L10nKey::SettingsLanguageDesc => "tty7 の表示言語を選択します", + L10nKey::SettingsLanguageEnglish => "English", + L10nKey::SettingsLanguageChinese => "简体中文", + L10nKey::SettingsLanguageJapanese => "日本語", + L10nKey::SettingsSearchLanguageKeywords => { + "言語 ロケール 英語 中国語 language locale english chinese" + } + L10nKey::SettingsTransparency => "透明度", + L10nKey::SettingsOpacity => "不透明度", + L10nKey::SettingsOpacityDesc => { + "すべてのテーマにおけるウィンドウ背景の不透明度。100% 未満ではデスクトップが透けて見えます" + } + L10nKey::SettingsBlur => "背景のぼかし", + L10nKey::SettingsBlurDesc => "半透明ウィンドウの背後にあるものをぼかす(macOS)", + L10nKey::FollowTheme => "テーマに従う", + L10nKey::SettingsDimInactivePanes => "非アクティブなペインを暗くする", + L10nKey::SettingsDimInactivePanesDesc => { + "分割内のフォーカスされていないペインを暗くし、アクティブなペインを目立たせる" + } + L10nKey::SettingsOpenThemesFolder => "テーマフォルダを開く", + L10nKey::SettingsChangeThemeImage => "変更…", + L10nKey::SettingsChooseThemeImage => "選択…", + L10nKey::SettingsRemoveThemeImage => "削除", + L10nKey::SettingsImageOpacity => "画像の不透明度", + L10nKey::SettingsImageOpacityDesc => "背景色の上に画像をどれだけ強く表示するか", + L10nKey::SettingsEditTheme => "テーマを編集", + L10nKey::SettingsEditThemeIntro => { + "コピーを編集します。変更はテーマフォルダ内のファイルに保存され、すぐ反映されます" + } + L10nKey::SettingsBackgroundImage => "背景画像", + L10nKey::SettingsBackgroundImageDesc => "背景色の上、テキストの下に表示されます", + L10nKey::SettingsAnsiColors => "ANSI カラー", + L10nKey::SettingsCustomThemes => "カスタムテーマ", + L10nKey::SettingsCustomThemesIntro => { + "テーマを複製して色を編集するか、テーマフォルダに自作テーマ(tty7 の YAML テーマまたは iTerm2 の .itermcolors スキーム)を置けます" + } + L10nKey::SettingsDuplicateToEdit => "複製して編集", + L10nKey::SettingsHosts => "ホスト", + L10nKey::SettingsDefaults => "デフォルト", + L10nKey::SettingsInheritedByEveryHost => "すべてのホストに継承されます", + L10nKey::SettingsNoSavedHosts => "保存済みホストはまだありません", + L10nKey::SettingsNothingMatches => "「{query}」に一致する項目がありません", + L10nKey::SettingsInTty7 => "tty7 内", + L10nKey::SettingsImportFromSshConfig => "~/.ssh/config からインポート", + L10nKey::SettingsExpandAllGroups => "すべてのグループを展開", + L10nKey::SettingsNoHostsYet => "まだホストがありません", + L10nKey::SettingsNothingSelected => "選択されていません", + L10nKey::SettingsTypeAddressToConnect => { + "アドレスを入力するとすぐに接続できます。tty7 はあとで保存するか尋ねます" + } + L10nKey::SettingsMoreInSshConfig => "~/.ssh/config にさらに {count} 件", + L10nKey::SettingsAliasesLinked => "{count} 件のエイリアスがリンクされています", + L10nKey::SettingsImportAliases => "エイリアスをインポート", + L10nKey::SettingsImportAliasesDesc => { + "ファイルを再読み込みして新しい項目を追加します。ここでの編集は tty7 が保存します — ファイル自体には書き込まれません" + } + L10nKey::SettingsImportNow => "今すぐインポート", + L10nKey::SettingsDefaultsIntro => { + "すべてのホストはこの設定から始まります。各ホストは詳細設定で個別に上書きできます" + } + L10nKey::SettingsCopyAddress => "アドレスをコピー", + L10nKey::SettingsDuplicate => "複製", + L10nKey::SettingsForgetPassword => "パスワードを消去", + L10nKey::SettingsForgotPasswordFor => "{endpoint} の保存されたパスワードを消去しました", + L10nKey::SettingsCouldntForgetPassword => { + "{endpoint} のパスワードを消去できませんでした: {error}" + } + L10nKey::SettingsSecurity => "セキュリティ", + L10nKey::SettingsSecurityIntro => "ホストは詳細設定でこれらを上書きできます", + L10nKey::SettingsVerifyHostKeys => "ホストキーを検証", + L10nKey::SettingsVerifyHostKeysDesc => { + "接続前に各サーバーのキーを known_hosts と照合し、未知のキーや変更されたキーを確認します。オフにすると接続時に確認しないため、なりすましサーバーに気づきません" + } + L10nKey::WarnBeforeClosing => "閉じる前に警告", + L10nKey::SettingsWarnBeforeClosingDesc => { + "アクティブな SSH セッションのあるタブやペインを閉じる前に確認を求めます" + } + L10nKey::SettingsNewHost => "新規ホスト", + L10nKey::SettingsName => "名前", + L10nKey::SettingsNameDesc => "この接続の表示名", + L10nKey::SettingsHost => "ホスト名", + L10nKey::SettingsHostDesc => "ホスト名または IP アドレス", + L10nKey::SettingsUser => "ユーザー名", + L10nKey::SettingsUserDesc => "ログインユーザー (空欄 = 接続時に解決)", + L10nKey::SettingsAuth => "認証方式", + L10nKey::SettingsAuthDesc => "認証方式。自動の場合は適用可能なすべての方式を試します", + L10nKey::SettingsAuthModeAuto => "自動", + L10nKey::SettingsAuthModePassword => "パスワード", + L10nKey::SettingsAuthModeKey => "公開鍵", + L10nKey::SettingsAuthModeAgent => "SSH エージェント", + L10nKey::SettingsAuthMode2Fa => "二要素認証 (2FA)", + L10nKey::SettingsJumpHost => "ジャンプホスト", + L10nKey::SettingsJumpHostDesc => { + "トンネリングに使用する別のプロファイル名 (空欄 = 直接接続)" + } + L10nKey::SettingsNoneSummary => "(なし)", + L10nKey::SettingsNoneLower => "なし", + L10nKey::SettingsPortForwarding => "ポートフォワーディング", + L10nKey::SettingsRulesOpenedWithConnection => "接続と同時に開くルール 1 件", + L10nKey::SettingsAddRule => "+ ルールを追加", + L10nKey::SettingsFwdLegendLocal => "L — ローカルポートからリモート側へアクセスできる", + L10nKey::SettingsFwdLegendRemote => "R — リモートポートからこのマシンへアクセスできる", + L10nKey::SettingsFwdLegendDynamic => "D — ダイナミック SOCKS プロキシ", + L10nKey::SettingsFwdNeedsBoth => { + "待受ポートとターゲットの host:port が必要です — 保存されません" + } + L10nKey::SettingsFwdNeedsListen => "待受ポートが必要です — 保存されません", + L10nKey::SettingsAdvanced => "詳細設定", + L10nKey::SettingsAdvancedSummary => { + "アルゴリズム / キープアライブ / プロキシ / X11 / ログインスクリプト" + } + L10nKey::SettingsIdentityFiles => "秘密鍵ファイル", + L10nKey::SettingsIdentityFilesDesc => "秘密鍵のパス(1 行に 1 つ。%h/%r は展開されます)", + L10nKey::SettingsAgentForwarding => "エージェント転送", + L10nKey::SettingsAgentForwardingDesc => "ローカルの ssh-agent を接続先へ転送します", + L10nKey::SettingsProxyCommand => "ProxyCommand", + L10nKey::SettingsProxyCommandDesc => "転送コマンド(%h/%p/%r は置換されます)", + L10nKey::SettingsSocks5Proxy => "SOCKS5 プロキシ", + L10nKey::SettingsSocks5ProxyDesc => "host:port(空欄 = なし)", + L10nKey::SettingsHttpProxy => "HTTP プロキシ", + L10nKey::SettingsHttpProxyDesc => "host:port(空欄 = なし)", + L10nKey::SettingsKexAlgorithms => "KEX アルゴリズム", + L10nKey::SettingsKexAlgorithmsDesc => "カンマ区切り(空欄 = ライブラリのデフォルト)", + L10nKey::SettingsCiphers => "暗号方式", + L10nKey::SettingsCiphersDesc => "カンマ区切り(空欄 = デフォルト)", + L10nKey::SettingsMacs => "MAC アルゴリズム", + L10nKey::SettingsMacsDesc => "カンマ区切り(空欄 = デフォルト)", + L10nKey::SettingsHostKeyAlgorithms => "ホストキーアルゴリズム", + L10nKey::SettingsHostKeyAlgorithmsDesc => "カンマ区切り(空欄 = デフォルト)", + L10nKey::SettingsCompression => "圧縮", + L10nKey::SettingsJumpHostVia => "{jump_name} 経由", + L10nKey::SettingsConnected => "接続済み", + L10nKey::SettingsProfileCopied => "{name}(コピー)", + L10nKey::SettingsCompressionDesc => "カンマ区切り(空欄 = デフォルト)", + L10nKey::SettingsKeepaliveInterval => "Keepalive 間隔(秒)", + L10nKey::SettingsKeepaliveIntervalDesc => "空欄 = ライブラリのデフォルト", + L10nKey::SettingsKeepaliveCountMax => "Keepalive 最大試行回数", + L10nKey::SettingsKeepaliveCountMaxDesc => "キープアライブが何回失敗すると切断扱いにするか", + L10nKey::SettingsConnectTimeout => "接続タイムアウト(秒)", + L10nKey::SettingsConnectTimeoutDesc => "空欄 = ライブラリのデフォルト", + L10nKey::SettingsX11Forwarding => "X11 転送", + L10nKey::SettingsX11ForwardingDesc => "X11 転送を要求(macOS では XQuartz が必要)", + L10nKey::SettingsShellIntegration => "シェル統合", + L10nKey::SettingsShellIntegrationDesc => { + "リモートシェルにプロンプト・終了コード・ディレクトリを報告させる" + } + L10nKey::SettingsLoginScripts => "ログインスクリプト", + L10nKey::SettingsLoginScriptsDesc => "シェル起動後に送信するコマンド(1 行に 1 つ)", + L10nKey::SettingsSkipBanner => "バナーをスキップ", + L10nKey::SettingsSkipBannerDesc => "サーバーのログインバナーを非表示にする", + L10nKey::SettingsDefaultFollowsDefaults => { + "「デフォルト」はデフォルト設定に従います。現在は {value}" + } + L10nKey::SettingsValueOn => "オン", + L10nKey::SettingsValueOff => "オフ", + L10nKey::SettingsDefault => "デフォルト", + L10nKey::SettingsOn => "オン", + L10nKey::SettingsOff => "オフ", + L10nKey::SettingsShell => "シェル", + L10nKey::SettingsShellIntro => { + "新しいターミナルで起動するプログラム。空欄ならプラットフォーム既定の {default} を使います" + } + L10nKey::SettingsProgram => "プログラム", + L10nKey::SettingsProgramDesc => { + "PATH 上の実行可能ファイル名または絶対パス。例: zsh、fish、pwsh" + } + L10nKey::SettingsArguments => "引数", + L10nKey::SettingsArgumentsDesc => "スペース区切りの起動フラグ。例: ログインシェル用の -l", + L10nKey::SettingsStartIn => "初期作業ディレクトリ", + L10nKey::SettingsStartInDesc => { + "新しいシェルの開始場所: tty7 の起動ディレクトリ、ホームフォルダ、または固定パス" + } + L10nKey::SettingsCustomPath => "カスタムパス", + L10nKey::SettingsCustomPathDesc => "新しいシェルが起動するディレクトリ", + L10nKey::SettingsWdInherit => "継承", + L10nKey::SettingsWdHome => "ホーム", + L10nKey::SettingsWdCustom => "カスタム", + L10nKey::SettingsShellFooter => { + "継承元のないシェルに適用されます。ウィンドウの最初のタブなどです。新しいタブと分割はアクティブなペインのディレクトリを引き継ぎ、開いているシェルは動き続けます" + } + L10nKey::SettingsScrolling => "スクロール", + L10nKey::SettingsScrollback => "スクロールバック", + L10nKey::SettingsScrollbackDesc => { + "各ペインに保存する履歴の行数。新しいペインに適用されます" + } + L10nKey::SettingsScrollSpeed => "スクロール速度", + L10nKey::SettingsScrollSpeedDesc => "マウスホイールのスクロールに適用する倍率", + L10nKey::SettingsMouse => "マウス", + L10nKey::SettingsFocusFollowsMouse => "フォーカスがマウスに追従する", + L10nKey::SettingsFocusFollowsMouseDesc => { + "クリックしなくてもペインにホバーするとフォーカスされる" + } + L10nKey::SettingsHideMouseWhileTyping => "入力時にマウスポインタを非表示", + L10nKey::SettingsHideMouseWhileTypingDesc => { + "入力中はポインタを隠し、次のマウス移動で再表示する" + } + L10nKey::SettingsReportMouseToApps => "マウスイベントをアプリに報告", + L10nKey::SettingsReportMouseToAppsDesc => { + "フルスクリーンアプリ(vim、tmux)にクリックとスクロールを処理させる。Shift を押している間はローカルで処理されます" + } + L10nKey::SettingsBell => "ベル通知", + L10nKey::SettingsTerminalBell => "ターミナルベル", + L10nKey::SettingsTerminalBellDesc => { + "ベル(^G)の通知方法: サイレント、短い点滅、システムサウンド、またはその両方" + } + L10nKey::SettingsLinks => "リンク", + L10nKey::DetectUrls => "URL を自動検出", + L10nKey::SettingsDetectUrlsDesc => { + "ホバーでリンクに下線を表示し、{modifier}+クリックで開く" + } + L10nKey::ForwardSshLoopbackLinks => "SSH ループバックリンクを転送", + L10nKey::SettingsForwardSshLoopbackLinksDesc => { + "ペインが SSH 接続中の場合、一時的なポートフォワード経由で localhost リンクを開く" + } + L10nKey::OpenFilesWith => "ファイルを開くアプリケーション", + L10nKey::SettingsOpenFilesWithDesc => { + "ファイルリンクを {modifier}+クリックで開くときに使うコマンドです。デフォルトアプリの代わりに実行します。{path}、{line}、{column} を使えます。値のないフラグは除外されます(例: herdr edit {path} --line={line})。空欄ならデフォルトアプリを使います" + } + L10nKey::SettingsBellModeOff => "オフ", + L10nKey::SettingsBellModeVisual => "視覚的(画面点滅)", + L10nKey::SettingsBellModeAudible => "音声(効果音)", + L10nKey::SettingsBellModeBoth => "点滅 + 音声", + L10nKey::SettingsPrompt => "プロンプト", + L10nKey::SettingsPromptIntro => { + "シェルプロンプトに表示する tty7 独自のメニュー。オフにするとキーはシェルに渡されます" + } + L10nKey::SettingsTabCompletion => "タブ補完", + L10nKey::SettingsTabCompletionDesc => { + "プロンプトで Tab を押すと tty7 の補完メニューが開きます。オフの場合、Tab はシェル自身の補完に渡されます" + } + L10nKey::SettingsHistorySearch => "履歴検索", + L10nKey::SettingsHistorySearchDesc => { + "プロンプトで ⌃R を押すと tty7 のファジー履歴メニューが開きます。オフの場合、⌃R はシェルに渡されます — シェルの逆方向検索や、シェルでバインドしたもの(fzf、percol など)" + } + L10nKey::SettingsSelectionClipboard => "選択とクリップボード", + L10nKey::SettingsSmartSelection => "スマート選択", + L10nKey::SettingsSmartSelectionDesc => { + "ダブルクリックでカーソル下の URL、ファイルパス、メールアドレス、または括弧ペア全体を選択" + } + L10nKey::SettingsCopyOnSelect => "選択時に自動コピー", + L10nKey::SettingsCopyOnSelectDesc => { + "マウスでテキストを選択するとすぐにクリップボードへコピーされます。⌘C は不要です" + } + L10nKey::SettingsTrimTrailingSpaces => "コピー時に末尾の空白を除去", + L10nKey::SettingsTrimTrailingSpacesDesc => "コピーした各行の末尾の空白を除去する", + L10nKey::SettingsKeyboard => "キーボード", + L10nKey::SettingsOptionAsMeta => "Option(⌥)を Meta として使用", + L10nKey::SettingsOptionAsMetaDesc => { + "⌥+キーでシェルが期待するエスケープシーケンス(⌥B = 単語 1 つ戻る)を送信し、特殊文字(∫)を入力しない" + } + L10nKey::SettingsAgentsIntro => "エージェント", + L10nKey::SettingsAgentsIntroDesc => { + "フック統合により、これらのエージェントを実行するペインのセッション状態(作業中 / 待機中 / 完了)がタブバーに表示されます。tty7 内でのみ有効です" + } + L10nKey::SettingsReadingAgentConfig => "このマシンのエージェント設定を読み込んでいます…", + L10nKey::SettingsStatusNotInstalled => "未インストール", + L10nKey::SettingsStatusInstalled => "インストール済み", + L10nKey::SettingsStatusOutdated => "更新あり", + L10nKey::SettingsInstall => "インストール", + L10nKey::SettingsReinstall => "再インストール", + L10nKey::SettingsUpdate => "アップデート", + L10nKey::SettingsUninstall => "アンインストール", + L10nKey::SettingsOfflineMachines => { + "未接続の保存済みマシンがさらに {count} 台あります。いずれかでワークスペースを開くと、そこにフックをインストールできます" + } + L10nKey::SettingsSyncWithSystem => "システムテーマと同期", + L10nKey::SettingsSyncWithSystemDesc => { + "OS の外観に従い、ライトとダークのテーマを別々に使用する" + } + L10nKey::SettingsChangeTheme => "テーマを変更", + L10nKey::SettingsThemes => "テーマ一覧", + L10nKey::SettingsThemePanelManual => "現在のテーマを変更", + L10nKey::SettingsThemePanelLight => "ライトモード用のテーマを選択", + L10nKey::SettingsThemePanelDark => "ダークモード用のテーマを選択", + L10nKey::SettingsCustom => "カスタム", + L10nKey::SettingsBuiltIn => "組み込み", + L10nKey::SettingsDark => "ダーク", + L10nKey::SettingsLight => "ライト", + L10nKey::SettingsLightMode => "ライトモード", + L10nKey::SettingsDarkMode => "ダークモード", + L10nKey::SettingsActive => "アクティブ", + L10nKey::SettingsStartupWindow => "起動時のウィンドウ状態", + L10nKey::SettingsStartupWindowDesc => "tty7 起動時のウィンドウ状態", + L10nKey::SettingsRememberWindowSize => "ウィンドウサイズと位置を記憶", + L10nKey::SettingsRememberWindowSizeDesc => { + "tty7 が最後に終了したときのサイズと位置で開き直します。オフならデフォルトサイズで中央に開きます" + } + L10nKey::SettingsRestoreLastLayout => "前回のレイアウトを復元", + L10nKey::SettingsRestoreLastLayoutDesc => { + "起動時に前回のウィンドウのタブ、分割、ディレクトリを復元します。オフなら新しいターミナルが 1 つだけ起動します" + } + L10nKey::SettingsConfirmLastWindowClose => "最後のウィンドウを閉じる前に確認", + L10nKey::SettingsConfirmLastWindowCloseDesc => { + "その操作で tty7 も終了するため、先に確認を求めます。オフならそのまま閉じます。どちらの場合もシェルはバックグラウンドで動き続けます" + } + L10nKey::SettingsShowTrayIcon => "システムトレイアイコンを表示", + L10nKey::SettingsShowTrayIconDesc => { + "システムトレイ / メニューバーに状態を表示します。コーディングエージェントが入力を必要とするときに通知し、そのメニューからエージェントペインへ移動できます" + } + L10nKey::SettingsTabs => "タブ", + L10nKey::SettingsNewTabPosition => "新規タブの表示位置", + L10nKey::SettingsNewTabPositionDesc => "新しく開いたタブが挿入される場所", + L10nKey::SettingsTabBarPosition => "タブバーの位置", + L10nKey::SettingsTabBarPositionDesc => { + "タブを上部の横一列または左側の縦サイドバーとして表示" + } + L10nKey::SettingsSidebarGrouping => "サイドバーのグループ化", + L10nKey::SettingsSidebarGroupingDesc => { + "git リポジトリごとにサイドバータブをまとめ、リポジトリ外のタブはスクラッチセクションに置きます。左サイドバーにのみ適用" + } + L10nKey::SettingsDiffPreviewFromCounts => "サイドバーのカウントから Diff プレビューを開く", + L10nKey::SettingsDiffPreviewFromCountsDesc => { + "行の +N −N をクリックすると、オーバーレイでワーキングツリーの Diff を開きます。オフならブランチとカウントは表示されますが、クリックできません" + } + L10nKey::SettingsNotifications => "通知", + L10nKey::SettingsNotifyOnCommandFinish => "コマンド終了時に通知", + L10nKey::SettingsNotifyOnCommandFinishDesc => { + "長時間のフォアグラウンドコマンドが完了したらデスクトップ通知を表示" + } + L10nKey::SettingsNotifyThreshold => "通知閾値(秒)", + L10nKey::SettingsNotifyThresholdDesc => "「長時間」とみなすのに必要なコマンドの実行時間", + L10nKey::SettingsWindow => "ウィンドウ", + L10nKey::NotifyModeNever => "通知しない", + L10nKey::NotifyModeUnfocused => "非フォーカス時のみ", + L10nKey::NotifyModeAlways => "常に通知", + L10nKey::SettingsStartupNormal => "通常サイズ", + L10nKey::SettingsStartupMaximized => "最大化", + L10nKey::SettingsStartupFullscreen => "全画面", + L10nKey::SettingsAfterCurrent => "現在のタブの隣", + L10nKey::SettingsAtEnd => "末尾", + L10nKey::SettingsTop => "上部", + L10nKey::SettingsLeft => "左側", + L10nKey::SettingsByRepo => "リポジトリ別", + L10nKey::SettingsFlat => "フラット表示", + L10nKey::SettingsPreset => "プリセット", + L10nKey::SettingsPresetDesc => { + "tmux では、ペイン/タブの操作をプレフィックスキーの後に行います(例: Ctrl-B の後に C)" + } + L10nKey::SettingsPrefix => "プレフィックスキー", + L10nKey::SettingsPressKeys => "キーを入力…", + L10nKey::SettingsPauseToSaveEsc => "一時停止して保存 · Esc", + L10nKey::SettingsKeybindingsIntroDesc => { + "ショートカットをクリックして新しいキーを押すと、少し間を置いて保存されます。Ctrl-B の後に X を押すようなシーケンスでは、キーを続けて入力します。Esc でキャンセル。Backspace は最後のキーを削除し、最初に押すとデフォルトに戻します" + } + L10nKey::SettingsPrefixNote => { + "プレフィックスが有効な場合、プレフィックスキーを単独で押すと約 1 秒後にシェルに渡され、プレフィックス + 未割り当てのキーはターミナルへそのまま送信されます" + } + L10nKey::SettingsRestoreAllDefaults => "すべてのデフォルトを復元", + L10nKey::SettingsAboutDesc1 => { + "ターミナルワークベンチ: 常駐セッション、リモート作業、エージェント" + } + L10nKey::SettingsAboutTech => { + "Pure Rust · Zed の gpui で GPU レンダリング · Alacritty ベースの VT コア" + } + L10nKey::SettingsVersion => "バージョン", + L10nKey::SettingsUpdates => "アップデート", + L10nKey::SettingsUpdateAndRelaunch => "更新して再起動", + L10nKey::SettingsUpdateViewRelease => "リリースページを開く", + L10nKey::SettingsUpdateChecking => "アップデートを確認中…", + L10nKey::SettingsUpdateUpToDate => "最新バージョンを使用しています", + L10nKey::SettingsUpdateDownloading => "アップデートをダウンロードして検証中…", + L10nKey::SettingsUpdateInstalling => "アップデートを適用して再起動中…", + L10nKey::SettingsUpdateCheckNow => "今すぐ確認", + L10nKey::SettingsUpdateCheckFailed => "アップデートを確認できませんでした: {error}", + L10nKey::SettingsUpdatePrepareFailed => "アップデートに失敗しました: {error}", + L10nKey::SettingsUpdateLaunchFailed => "インストーラーを起動できませんでした: {error}", + L10nKey::SettingsUpdateUnsupportedMacos => { + "この tty7 は書き込み可能な tty7.app バンドルから実行されていないため、そのまま置き換えるのは安全ではありません。tty7 を「アプリケーション」など書き込み可能なフォルダへ移動するか、リリースページを開いてアップデートをインストールしてください" + } + L10nKey::SettingsUpdateUnsupportedLinux => { + "アプリ内アップデーターが対応しているのは、パッケージ化された macOS アプリバンドルです。この Linux 環境ではリリースページかパッケージマネージャーから更新してください" + } + L10nKey::SettingsUpdateUnsupportedWindows => { + "Windows の自動更新は、認識可能な Inno Setup 版とポータブル ZIP 版に対応しています。この tty7 には有効なインストール情報・アップデーター・書き込み可能なポータブルディレクトリのいずれかが見つからないため、リリースページを開いて手動で更新してください" + } + L10nKey::SettingsUpdateWindowsAllUsers => { + "tty7 はすべてのユーザー向けにインストールされているため、置き換えには管理者権限が必要です。tty7 が自ら昇格を要求することはありません。リリースページを開き、インストーラーを手動で実行して更新してください" + } + L10nKey::SettingsUpdateUnsupportedPlatform => { + "このプラットフォームでは自動インストールを利用できません。リリースページを開いてください" + } + L10nKey::SettingsUpdateMissingPackage => { + "このリリースには、現在のインストール形式に合う {name} パッケージがありません。リリースページを開いて別のパッケージを選んでください" + } + L10nKey::SettingsUpdateMissingChecksums => { + "このリリースには checksums.txt がないため、tty7 は自動インストールを行いません" + } + L10nKey::SettingsVersionAvailable => "バージョン {version} が利用可能です", + L10nKey::SettingsCheckUpdatesDesc => { + "その場で更新できないインストール形式では、代わりにリリースページを開きます" + } + L10nKey::SettingsCheckUpdatesOnLaunch => "起動時にアップデートを確認", + L10nKey::SettingsCommandLine => "コマンドライン", + L10nKey::SettingsCommandLineDesc => { + "起動時に同梱の `tty7` コマンドを PATH に入れ、スクリプトやコーディングエージェントが任意のターミナルから tty7 を操作できるようにします。tty7 のペイン内ではどちらでも機能します。自分でビルド・インストールした `tty7` を上書きされたくない場合はオフにしてください。次回起動時に有効になります" + } + L10nKey::SettingsInstallCliOnPath => "`tty7` コマンドを PATH にインストール", + L10nKey::SettingsServer => "デーモンサーバー", + L10nKey::SettingsServerDesc => { + "シェルを動かし続けているバックグラウンドサーバーを再起動します。このコンピュータ上のすべてのシェルが終了し、タブとレイアウトは新しいシェルで開き直します" + } + L10nKey::SettingsRestartServer => "サーバーを再起動…", + L10nKey::SettingsAppHttpProxy => "アップデート用プロキシ", + L10nKey::SettingsAppHttpProxyDesc => { + "tty7 自身の更新チェックとダウンロードに使う任意のプロキシです。ペインで実行中のプログラムには影響しません(それぞれの環境変数に従います)。空欄にするとシステムのプロキシ設定に従います。例: http://127.0.0.1:7890、socks5://127.0.0.1:1080" + } + L10nKey::SettingsAppHttpProxyInvalid => { + "プロキシアドレスとして正しくないため、この値は保存されませんでした" + } + L10nKey::SettingsAgentClaudeCode => "Claude Code", + L10nKey::SettingsAgentCodex => "Codex", + L10nKey::SettingsAgentCopilotCli => "Copilot CLI", + L10nKey::SettingsAgentOpencode => "OpenCode", + L10nKey::SettingsAgentPi => "Pi", + L10nKey::SettingsAgentGrokBuild => "Grok Build", + L10nKey::SettingsSearchAboutKeywords => { + "バージョン ライセンス クレジット ビルド 更新 確認 github about version license credits update check" + } + L10nKey::SettingsSearchAppHttpProxyKeywords => { + "プロキシ 通信 ネットワーク ダウンロード アップデート proxy http https socks socks5 clash v2ray network download update" + } + L10nKey::SettingsSearchAnsiColorsKeywords => { + "パレット 16 ANSI カラー ターミナル テーマ ansi colors palette terminal theme colours" + } + L10nKey::SettingsSearchArgumentsKeywords => { + "シェル フラグ ログイン 引数 arguments shell flags login args" + } + L10nKey::SettingsSearchBlurKeywords => { + "透明度 半透明 すりガラス ウィンドウ 背景 blur transparency translucent frosted vibrancy window background" + } + L10nKey::SettingsSearchBoldFontKeywords => { + "タイプフェイス 太字 ウェイト bold font typeface weight" + } + L10nKey::SettingsSearchClaudeCodeKeywords => { + "エージェント 統合 フック インストール アンインストール 状態 セッション タブバー サイドバー バッジ claude agent integration hooks install status working waiting" + } + L10nKey::SettingsSearchCodexKeywords => { + "エージェント 統合 フック インストール openai codex agent integration hooks install" + } + L10nKey::SettingsSearchCommandLineToolKeywords => { + "cli tty7 パス シェル コマンド インストール シンボリックリンク ターミナル iterm エージェント スクリプト command line tool" + } + L10nKey::SettingsSearchCommandLineToolTitle => "コマンドラインツール", + L10nKey::SettingsSearchConfirmLastWindowCloseKeywords => { + "閉じる 終了 確認 プロンプト ダイアログ 警告 最後のウィンドウ cmd-w ctrl-w confirm close last window quit ask" + } + L10nKey::SettingsSearchCopilotCliKeywords => { + "エージェント 統合 フック インストール github copilot agent integration hooks install" + } + L10nKey::SettingsSearchCopyOnSelectKeywords => { + "クリップボード 選択 コピー マウス copy on select clipboard selection yank mouse" + } + L10nKey::SettingsSearchCursorBlinkKeywords => { + "カーソル 点滅 フラッシュ cursor blink caret blinking flash" + } + L10nKey::SettingsSearchCursorShapeKeywords => { + "カーソル 形状 ブロック バー アンダーライン ビーム cursor shape caret block bar underline beam" + } + L10nKey::SettingsSearchCustomThemesKeywords => { + "テーマ 複製 編集 色 フォルダ yaml インポート custom themes duplicate edit colors folder import" + } + L10nKey::SettingsSearchDetectUrlsKeywords => { + "リンク ハイパーリンク クリック可能 開く detect urls links hyperlink clickable open" + } + L10nKey::SettingsSearchDiffPreviewFromCountsKeywords => { + "diff オーバーレイ プレビュー サイドバー カウント git 変更 クリック ブランチ 行数 diff preview overlay sidebar counts git changes" + } + L10nKey::SettingsSearchDimInactivePanesKeywords => { + "非アクティブ ペイン 暗く フォーカス 分割 fade unfocused inactive split pane focus opacity highlight active dimming" + } + L10nKey::SettingsSearchFocusFollowsMouseKeywords => { + "ペイン ホバー アクティブ focus follows mouse pane hover activate" + } + L10nKey::SettingsSearchFontFamilyKeywords => { + "タイプフェイス 等幅 タイポグラフィ font family monospace typography typeface" + } + L10nKey::SettingsSearchFontLigaturesKeywords => { + "タイポグラフィ グリフ fira font ligatures typography glyph fira" + } + L10nKey::SettingsSearchFontSizeKeywords => { + "タイポグラフィ 文字 拡大 縮小 ズーム font size typography text bigger smaller zoom" + } + L10nKey::SettingsSearchForwardSshLoopbackLinksKeywords => { + "ssh リモート ポート トンネル localhost フォワード リンク forward ssh loopback links tunnel" + } + L10nKey::SettingsSearchGrokBuildKeywords => { + "エージェント 統合 フック インストール xai grok build agent integration hooks install" + } + L10nKey::SettingsSearchHideMouseWhileTypingKeywords => { + "カーソル ポインタ 自動非表示 hide mouse while typing cursor pointer autohide" + } + L10nKey::SettingsSearchHistorySearchKeywords => { + "ctrl-r 逆検索 ファジー検索 履歴 fzf プロンプト history search ctrl-r reverse fuzzy recall prompt" + } + L10nKey::SettingsSearchHostsKeywords => { + "ssh ホスト 接続 保存 プロファイル インポート ssh_config 管理 追加 編集 クイック接続 hosts ssh profile import connect manage" + } + L10nKey::SettingsSearchHowShellsWorkKeywords => { + "シェル セッション デーモン サーバー デタッチ 永続化 バックグラウンド 閉じる 終了 停止 削除 ワークスペース レイアウト 再起動 tmux how shells work shell daemon persist survive reboot" + } + L10nKey::SettingsSearchHowShellsWorkTitle => "シェルの仕組み", + L10nKey::SettingsSearchItalicFontKeywords => "タイプフェイス 斜体 italic oblique typeface", + L10nKey::SettingsSearchKeybindingsKeywords => { + "ショートカット ホットキー キーボード バインディング コード tmux プリセット 再バインド プレフィックス keybindings shortcut hotkey binding chord prefix" + } + L10nKey::SettingsSearchKeybindingsTitle => "キーバインド", + L10nKey::SettingsSearchLineHeightKeywords => { + "タイポグラフィ リーディング 行間 line height typography leading spacing" + } + L10nKey::SettingsSearchNewTabPositionKeywords => { + "タブ 順序 末尾 現在のタブの隣 new tab position tabs order end after current" + } + L10nKey::SettingsSearchNotifyOnCommandFinishKeywords => { + "通知 アラート 完了 osc デスクトップ バナー 長い コマンド notify on command finish notification alert desktop" + } + L10nKey::SettingsSearchNotifyThresholdKeywords => { + "通知 アラート 秒 時間 長い コマンド 遅延 notify threshold notification alert seconds duration delay" + } + L10nKey::SettingsSearchOpacityKeywords => { + "透明度 半透明 透ける ウィンドウ alpha opacity transparency translucent window" + } + L10nKey::SettingsSearchOpenFilesWithKeywords => { + "リンク ファイル エディタ コマンド 外部アプリ パス 行 列 open files with editor external app path line column" + } + L10nKey::SettingsSearchOpencodeKeywords => { + "エージェント 統合 プラグイン インストール opencode agent integration plugin install" + } + L10nKey::SettingsSearchOptionAsMetaKeywords => { + "alt キーボード 修飾キー エスケープ macos option meta option acts as meta keyboard modifier" + } + L10nKey::SettingsSearchPiKeywords => { + "エージェント 統合 拡張 インストール pi agent integration extension install" + } + L10nKey::SettingsSearchPortForwardingKeywords => { + "ssh トンネル ローカル リモート ダイナミック socks フォワード ルール port forwarding ssh tunnel local remote dynamic forward rule" + } + L10nKey::SettingsSearchProgramKeywords => { + "シェル バイナリ zsh bash fish nu nushell pwsh powershell 実行可能 起動 program shell binary executable launch" + } + L10nKey::SettingsSearchRememberWindowSizeKeywords => { + "ウィンドウ サイズ 位置 境界 ジオメトリ 起動 記憶 remember window size position bounds geometry launch startup" + } + L10nKey::SettingsSearchReportMouseToAppsKeywords => { + "マウス レポート vim tmux クリック スクロール shift パススルー report mouse to apps vim tmux passthrough" + } + L10nKey::SettingsSearchRestoreLastLayoutKeywords => { + "復元 セッション 前回 タブ 分割 開き直し 起動 レイアウト restore last layout session previous tabs splits reopen launch" + } + L10nKey::SettingsSearchScrollSpeedKeywords => { + "マウス ホイール 倍率 スクロール scroll speed mouse wheel multiplier scrolling" + } + L10nKey::SettingsSearchScrollbackKeywords => { + "履歴 バッファ 行数 スクロール scrollback history buffer lines scroll" + } + L10nKey::SettingsSearchShowTrayIconKeywords => { + "トレイ メニューバー ステータス アイコン エージェント 通知 システム tray icon menu bar status system attention" + } + L10nKey::SettingsSearchSidebarGroupingKeywords => { + "タブ グループ リポジトリ git スクラッチ ヘッダー サイドバー フラット sidebar grouping tabs repo repository git scratch header flat" + } + L10nKey::SettingsSearchSmartSelectionKeywords => { + "ダブルクリック 単語 url パス 選択 セマンティック 括弧 メール smart selection double click word url path bracket email" + } + L10nKey::SettingsSearchStartInKeywords => { + "cwd 作業ディレクトリ 起動 フォルダ パス ホーム 継承 カスタム start in working directory home inherit custom" + } + L10nKey::SettingsSearchSyncWithSystemKeywords => { + "テーマ ダーク ライト 自動 os 外観 モード sync with system theme dark light auto follow appearance" + } + L10nKey::SettingsSearchTabBarPositionKeywords => { + "タブ 垂直 サイドバー 左 上 レイアウト レール tab bar position tabs vertical sidebar left top rail" + } + L10nKey::SettingsSearchTabCompletionKeywords => { + "補完 メニュー サジェスト タブ プロンプト tab completion menu suggestions prompt" + } + L10nKey::SettingsSearchTerminalBellKeywords => { + "ベル 可聴 視覚 フラッシュ サウンド サイレント ビープ 両方 ^g terminal bell audible visual flash sound silence beep both" + } + L10nKey::SettingsSearchThemeKeywords => { + "外観 色 配色 ダーク ライト パレット 背景 前景 アクセント 同期 システム os 自動 theme appearance color scheme palette background foreground accent sync auto" + } + L10nKey::SettingsSearchTrimTrailingSpacesKeywords => { + "クリップボード 空白 コピー trim trailing spaces copy whitespace clipboard" + } + L10nKey::SettingsSearchVerifyHostKeysKeywords => { + "ssh セキュリティ known_hosts フィンガープリント mitm ホストキー 検証 verify host keys fingerprint known_hosts" + } + L10nKey::SettingsSearchWarnBeforeClosingKeywords => { + "ssh 確認 閉じる タブ ペイン ライブ セッション セキュリティ warn before closing ssh confirm tab pane live session" + } + L10nKey::SettingsSearchStartupWindowKeywords => { + "起動 開く 最大化 全画面 通常 startup window launch maximized fullscreen normal" + } + L10nKey::SwitcherNoMatch => "一致するワークスペースまたはマシンがありません", + L10nKey::AddSshHost => "SSH ホストを追加…", + L10nKey::ClickForNewWindow => "クリックで新しいウィンドウを開く", + L10nKey::RestartServer => "サーバーを再起動", + L10nKey::OtherMachines => "その他のマシン", + L10nKey::Ok => "OK", + L10nKey::SftpNoTransfers => "転送はまだありません", + L10nKey::SftpPanelTitleFiles => "ファイル", + L10nKey::SftpTooltipRefresh => "更新", + L10nKey::SftpTooltipMore => "その他", + L10nKey::SftpMenuNewFolder => "新しいフォルダ", + L10nKey::SftpMenuNewFile => "新しいファイル", + L10nKey::SftpMenuUpload => "アップロード…", + L10nKey::SftpMenuGotoShellCwd => "シェルの作業ディレクトリへ移動", + L10nKey::SftpMenuHideTransferHistory => "転送履歴を非表示", + L10nKey::SftpMenuTransferHistory => "転送履歴", + L10nKey::SftpEditNewFolder => "新しいフォルダ", + L10nKey::SftpEditNewFile => "新しいファイル", + L10nKey::SftpEditRename => "名前を変更", + L10nKey::SftpEditPermissions => "権限 · {mode}", + L10nKey::SftpLoading => "読み込み中…", + L10nKey::SftpEmptyDirectory => "空のディレクトリです", + L10nKey::SftpContextOpen => "開く", + L10nKey::SftpContextFollowSymlink => "シンボリックリンクを辿る", + L10nKey::SftpContextRename => "名前を変更", + L10nKey::SftpContextChmod => "chmod…", + L10nKey::SftpTransferSummaryRunning => "{count} 件転送中 · {pct}%", + L10nKey::SftpTransferSummaryFailed => "{count} 件失敗", + L10nKey::SftpTransferSummaryIdle => "転送", + L10nKey::SftpTransferProgress => "{done} / {total} ({pct}%)", + L10nKey::SftpTransferDone => "完了", + L10nKey::SftpTransferCancelled => "キャンセル済み", + L10nKey::SftpTransferError => "エラー", + L10nKey::SftpImagePasteUploadFailed => { + "貼り付けた画像を {host} にアップロードできませんでした: {error}" + } + L10nKey::ForwardPanelTitle => "ポートフォワード", + L10nKey::ForwardDisconnected => "切断済み", + L10nKey::ForwardDisconnectedFrom => "{host} から切断されました", + L10nKey::ForwardTooltipAdd => "フォワードを追加", + L10nKey::ForwardTooltipRemove => "削除", + L10nKey::ForwardLocal => "ローカル", + L10nKey::ForwardRemote => "リモート", + L10nKey::ForwardDynamic => "ダイナミック", + L10nKey::ForwardBindLabel => "bind", + L10nKey::ForwardToLabel => "to", + L10nKey::ForwardSocksLabel => "SOCKS", + L10nKey::ForwardAdd => "追加", + L10nKey::FileTreePlaceholderFileName => "ファイル名", + L10nKey::FileTreePlaceholderFolderName => "フォルダ名", + L10nKey::FileTreePlaceholderNewName => "新しい名前", + L10nKey::FileTreeDeleteTitle => "「{name}」を削除しますか?", + L10nKey::FileTreeDeleteFolderBody => "フォルダとその中のすべての項目が削除されます", + L10nKey::FileTreeDeleteFileBody => "ファイルが削除されます", + L10nKey::FileTreeDeleteFailed => "削除に失敗しました", + L10nKey::FileTreeContextOpen => "開く", + L10nKey::FileTreeContextCdHere => "ここで cd", + L10nKey::FileTreeContextInsertPath => "ターミナルにパスを挿入", + L10nKey::FileTreeContextAttachAgent => "エージェントをアタッチ", + L10nKey::FileTreeContextNewFile => "新しいファイル", + L10nKey::FileTreeContextNewFolder => "新しいフォルダ", + L10nKey::FileTreeContextRename => "名前を変更", + L10nKey::FileTreeContextCopyPath => "パスをコピー", + L10nKey::FileTreeContextHideDotfiles => "ドットファイルを非表示", + L10nKey::FileTreeContextShowDotfiles => "ドットファイルを表示", + L10nKey::SshPromptNewKey => "新しいキー {fingerprint}", + L10nKey::SshPromptOldKey => "以前のキー {old_fingerprint}", + L10nKey::EditorCantOpen => "{path} を開けません: {e}", + L10nKey::EditorCantRead => "{path} を読み取れません: {e}", + L10nKey::EditorNotUtf8 => "「{path}」は有効な UTF-8 ではありません", + L10nKey::EditorSaveFailed => "保存に失敗しました", + L10nKey::EditorUnsavedChanges => "「{name}」には保存されていない変更があります", + L10nKey::EditorDiscard => "破棄", + L10nKey::EditorNoFileOpen => "開かれているファイルはありません", + L10nKey::EditorBackToTerminal => "ターミナルに戻る (Esc)", + L10nKey::EditorLnCol => "行 {line}, 列 {column}", + L10nKey::EditorEdit => "編集", + L10nKey::EditorPreview => "プレビュー", + L10nKey::EditorWrapOn => "折り返し: オン", + L10nKey::EditorWrapOff => "折り返し: オフ", + L10nKey::EditorFileTooLarge => "「{path}」はエディタで開くには大きすぎます({size} MB)", + L10nKey::EditorBinaryFile => "「{path}」はバイナリファイルのようです", + L10nKey::PanelInfoTitle => "情報", + L10nKey::PanelChangesTitle => "変更", + L10nKey::PanelFilesTitle => "ファイル", + L10nKey::PanelNoSession => "アクティブなセッションがありません", + L10nKey::PanelNoSessionHint => { + "タブを開くと、そのシェル、ディレクトリ、プロセスがここに表示されます" + } + L10nKey::PanelNoWorkingDirectory => "作業ディレクトリがありません", + L10nKey::PanelNoWorkingDirectoryHint => { + "このペインはまだ作業ディレクトリを報告していません" + } + L10nKey::PanelLoading => "読み込み中…", + L10nKey::PanelNotAGitRepo => "git リポジトリではありません", + L10nKey::PanelNotAGitRepoHint => { + "git リポジトリ内に移動すると、このタブに未コミットの変更が一覧表示されます" + } + L10nKey::PanelNoChanges => "未コミットの変更はありません", + L10nKey::PanelNoChangesHint => "ワーキングツリーはクリーンです", + L10nKey::PanelSessionSubtitle => "セッション", + L10nKey::PanelProcessesSubtitle => "プロセス", + L10nKey::PanelPortsSubtitle => "ポート", + L10nKey::PanelCwd => "作業ディレクトリ", + L10nKey::PanelShell => "シェル", + L10nKey::PanelSsh => "ssh", + L10nKey::PanelBranch => "ブランチ", + L10nKey::PanelChangesRow => "変更", + L10nKey::PanelAgent => "エージェント", + L10nKey::PanelAgentIdle => "アイドル", + L10nKey::PanelAgentWorking => "作業中", + L10nKey::PanelAgentWaiting => "待機中", + L10nKey::PanelAgentDone => "完了", + L10nKey::PanelRevealInFinder => "Finder で表示", + L10nKey::PanelOpenFolder => "フォルダを開く", + L10nKey::WindowStop => "停止", + L10nKey::WindowDelete => "削除", + L10nKey::WindowThisWorkspace => "このワークスペース", + L10nKey::WindowConfirmTitle => "ワークスペース「{name}」を{verb}しますか?", + L10nKey::WindowStopUnreachable => { + "そのマシンに到達できませんでした。そこでまだ実行中のシェルはすべて終了します" + } + L10nKey::WindowDeleteUnreachable => { + "そのマシンに到達できませんでした。そこでまだ実行中のシェルはすべて終了し、レイアウトは消去されます" + } + L10nKey::WindowStopShells => "{count} 個の実行中シェルが終了します", + L10nKey::WindowDeleteShells => "{count} 個の実行中シェルが終了し、レイアウトが消去されます", + L10nKey::DiffReading => "Diff を読み込み中…", + L10nKey::DiffNotARepo => "git リポジトリではありません", + L10nKey::DiffReadFailed => { + "ワーキングツリーの Diff を読み込めませんでした — 次の更新で再試行します" + } + L10nKey::DiffWorkingTreeClean => "ワーキングツリーはクリーンです", + L10nKey::DiffCloseTooltip => "Diff を閉じる (Esc)", + L10nKey::DiffChangedFiles => "変更されたファイル {count} 個", + L10nKey::DiffUntrackedCount => " · 未追跡 {count} 件", + L10nKey::DiffMoreFiles => { + "… さらに変更されたファイル {count} 個 — ターミナルで `git diff` を実行して確認してください" + } + L10nKey::DiffOversizedNotice => { + "このワーキングツリーは大きすぎて効率的に描画できません({summary})。すべてのファイルは折りたたまれています — 個々のファイルを展開するか、ターミナルで `git diff` を実行してください" + } + L10nKey::DiffTruncatedPerFile => { + "Diff は {limit} 行で切り詰められました — 残りはターミナルで `git diff` を実行してください" + } + L10nKey::DiffTruncatedBudget => { + "差分の内容は読み込まれていません — このワーキングツリーは tty7 の Diff 予算を超えています。ターミナルでこのファイルの `git diff` を実行してください" + } + L10nKey::DiffUntrackedHeader => "未追跡ファイル ({count})", + L10nKey::DiffMoreUntracked => { + "… さらに {count} 個 — ターミナルで `git status` を実行して確認してください" + } + L10nKey::DiffLines => "{count} 行の Diff", + L10nKey::DiffChangedLines => { + "変更行 {total} 件、上限 {cap} までに読み込んだ Diff 行 {loaded} 件" + } + L10nKey::DiffBudgetAndCap => "tty7 の予算とファイルごとの上限", + L10nKey::DiffBudget => "tty7 の予算", + L10nKey::DiffPerFileCap => "ファイルごとの上限", + L10nKey::DiffUntrackedSummary => "未追跡 {count}", + L10nKey::PendingConnecting => "{machine} に接続中…", + L10nKey::PendingUnreachable => "{machine} に到達できませんでした", + L10nKey::WorktreePromptNeedsName => "ワークツリーには名前が必要です", + L10nKey::WorktreePromptTitle => "新しいワークツリータブ", + L10nKey::WorktreePromptName => "ワークツリー名", + L10nKey::WorktreePromptBranch => "新しいブランチ", + L10nKey::WorktreePromptBase => "開始地点", + L10nKey::WorktreePromptCreating => "作成中…", + L10nKey::WorktreePromptCreate => "作成", + L10nKey::AppNewWorktreeFailed => "新しいワークツリーを作成できませんでした: {error}", + L10nKey::HomeTimeJustNow => "たった今", + L10nKey::HomeTimeMinutesAgo => "{count} 分前", + L10nKey::HomeTimeHourAgo => "1 時間前", + L10nKey::HomeTimeHoursAgo => "{count} 時間前", + L10nKey::HomeTimeYesterday => "昨日", + L10nKey::HomeTimeDaysAgo => "{count} 日前", + L10nKey::HomeTimeOverWeekAgo => "1 週間以上前", + L10nKey::HomeReopenNamed => "「{name}」をもう一度開く", + L10nKey::RemoteStripDisconnected => "{machine} に未接続です", + L10nKey::RemoteStripConnecting => "{machine} に接続中…", + L10nKey::RemoteStripReconnecting => "{machine} に再接続中…", + L10nKey::RemoteStripReconnectingAttempt => "{machine} に再接続中…({count} 回目の試行)", + L10nKey::RemoteStripPreempted => "このワークスペースは {by} で開かれました", + L10nKey::RemoteStripFailed => "{machine} に未接続です — {error}", + L10nKey::RemoteNoticePreempted => "別の場所で開かれました — 入力しても反映されません", + L10nKey::RemoteNoticeDisconnected => "未接続です — 入力しても反映されません", + L10nKey::RemoteActionRetryNow => "今すぐ再試行", + L10nKey::RemoteActionTakeBack => "取り戻す", + L10nKey::RemoteActionConnect => "接続", + L10nKey::RemoteActionRetry => "再試行", + L10nKey::RemoteNoConnectionDetails => { + "このウィンドウは {machine} 上のワークスペースですが、tty7 には接続情報がありません。SSH プロファイルか ~/.ssh/config に項目があるか確認してください" + } + L10nKey::RemoteThisComputer => "このコンピュータ", + L10nKey::RemoteRestartTitle => "「{machine}」上の tty7 サーバーを再起動しますか?", + L10nKey::RemoteRestartBody => { + "これにより {machine} 上のすべてのシェルが停止します。表示されていないものも含め、実行中のものはすべて終了します。ワークスペースとレイアウトは保持され、新しいシェルで開きます" + } + L10nKey::RemoteReplaceBody => { + "{machine} で実行中の tty7-server は、このクライアントが理解できないプロトコルで通信しています。tty7 は対応するプロトコルのサーバーを再起動し、{machine} にまだない場合は先にインストールします。\n\n{machine} で実行中のすべてのセッションが終了します。このウィンドウが接続していないセッションも含みます" + } + L10nKey::RemoteRestartFailedTitle => { + "「{machine}」上の tty7 サーバーは再起動されませんでした" + } + L10nKey::RemoteRestartFailedBody => { + "{error}\n\nそこで実行中のセッションは古いビルドのままです。セッションがなくなっている場合は、再接続時にこのビルドのサーバーが起動します" + } + L10nKey::RemoteHostUnreachable => "{machine} に到達できませんでした: {error}", + L10nKey::RemoteInstallTitle => "「{machine}」に tty7 サーバーをインストールしますか?", + L10nKey::RemoteInstallDetail => { + "tty7 はサーバーバイナリを {machine} に書き込み、{machine} でワークスペースをホストできるようにします。{machine} 上の他のものには触れず、sudo も使いません。\n\n{path_label}\u{2003}{path}\n{version_label}\u{2003}{version}\n{size_label}\u{2003}{size}\n{from_label}\u{2003}{from}\n{sha_label}\u{2003}{sha256}\n\n{silent_upgrades}" + } + L10nKey::RemoteInstallPathLabel => "パス", + L10nKey::RemoteInstallVersionLabel => "バージョン", + L10nKey::RemoteInstallSizeLabel => "サイズ", + L10nKey::RemoteInstallFromLabel => "取得元", + L10nKey::RemoteInstallShaLabel => "SHA-256", + L10nKey::RemoteInstallSilentUpgrades => { + "このマシンでの今後のアップグレードはサイレントにインストールされます" + } + L10nKey::RemoteInstallBytes => "バイト", + L10nKey::RemoteMismatchTitle => "「{machine}」上の tty7 サーバーを更新しますか?", + L10nKey::RemoteMismatchDetail => { + "{machine} は {running} から tty7 セッションを提供していますが、このクライアント({wanted})はそのプロトコルを理解できません。tty7 は対応するサーバーをそこにインストール済みですが、セッションは実行中のサーバー上にあります。\n\n{replace_server}\u{2003}を選ぶと {wanted} に置き換えられ、そのサーバー上のセッションはすべて終了します。\n{cancel}\u{2003}を選ぶと {machine} はそのままです。このウィンドウは接続しません" + } + L10nKey::RemoteMismatchReplaceServer => "サーバーを更新", + L10nKey::RemoteMismatchUnknownBuild => "不明なビルド", + L10nKey::RemoteMismatchUnknownBuildFromExe => "不明なビルド({exe} から)", + L10nKey::RemoteDaemonStartFailed => { + "tty7 のローカルサーバーを起動できませんでした: {error}" + } + L10nKey::RemoteDaemonUnreachable => { + "tty7 のローカルサーバーに到達できませんでした: {error}" + } + L10nKey::RemoteDaemonTooOld => { + "このマシンの tty7 デーモンは古いビルドのため、{machine} 上のサーバーを再起動できません。tty7 を終了(デーモンが停止します)して開き直し、再試行してください" + } + L10nKey::RemoteProfileMissing => "その保存済み SSH プロファイルはもう存在しません", + L10nKey::RemoteAliasMissing => "`{alias}` は ~/.ssh/config にありません", + L10nKey::RemoteWslNoSsh => "WSL ワークスペースには SSH 接続がありません", + L10nKey::RemoteLocalStdioNoSsh => { + "ローカルの --stdio ワークスペースには SSH 接続がありません" + } + L10nKey::RemoteHostNotTty7 => { + "{machine} は応答しましたが、tty7 サーバーとしては応答しませんでした: {error}" + } + L10nKey::RemoteWorkspaceListFailed => { + "{machine} に接続しましたが、ワークスペースの一覧を取得できませんでした: {error}" + } + L10nKey::RemoteServerRestartFailed => { + "{machine} 上の tty7 サーバーを再起動できませんでした: {error}" + } + L10nKey::RemoteNoRouteToHost => "tty7 は {machine} に到達する手段を失いました", + L10nKey::RemoteMachineTreeUnexpectedReply => { + "サーバーがマシンツリーに {reply} で応答しました" + } + L10nKey::RemoteMismatchVersionFromExe => "{version}({exe} から)", + L10nKey::AppNoRunningCodingAgent => { + "実行中のコーディングエージェントが見つかりません — 先にペインでコーディングエージェントを起動してください(claude、codex など)" + } + L10nKey::SwitcherThisComputer => "このコンピュータ", + L10nKey::SwitcherRestartingServer => "tty7 のサーバーを再起動中…", + L10nKey::SwitcherDownloadingServerWithTotal => { + "tty7 のサーバーをダウンロード中… {done} / {total}" + } + L10nKey::SwitcherDownloadingServerNoTotal => "tty7 のサーバーをダウンロード中… {done}", + L10nKey::SwitcherCopyingServer => "tty7 のサーバーをコピー中… {done} / {total}", + L10nKey::SwitcherThisWindow => "このウィンドウ", + L10nKey::SwitcherOpen => "開く", + L10nKey::SwitcherDisconnect => "切断", + L10nKey::SwitcherOpenInNewWindow => "新しいウィンドウで開く", + L10nKey::SwitcherRename => "名前を変更…", + L10nKey::SshPromptPasswordFor => "{user}@{host} のパスワード", + L10nKey::SshPromptPassphraseFor => "{key_path} のパスフレーズ", + L10nKey::SshPromptTwoFactor => "二要素認証", + L10nKey::SshPromptUnknownHost => "未知のホスト {host}", + L10nKey::SshPromptHostKeyChanged => { + "ホストキーが変更されました — 中間者攻撃の可能性があります" + } + L10nKey::SshPromptHostKeyChangedBody => { + "ホストキーが以前に信頼したものと異なります。攻撃の可能性があります" + } + L10nKey::SshPromptConnect => "接続", + L10nKey::SshPromptUnlock => "ロック解除", + L10nKey::SshPromptSubmit => "送信", + L10nKey::HostOpsError => "{context}: {error}", + L10nKey::CmdGroupTabsPanes => "タブとペイン", + L10nKey::CmdGroupWorkspaces => "ワークスペース", + L10nKey::CmdGroupView => "表示", + L10nKey::CmdGroupTerminal => "ターミナル", + L10nKey::CmdGroupSsh => "SSH", + L10nKey::CmdGroupAgents => "エージェント", + L10nKey::CmdGroupApplication => "アプリケーション", + L10nKey::CmdNewTab => "新しいタブ", + L10nKey::CmdNewWorktreeTab => "新しいワークツリータブ", + L10nKey::CmdNewWorktreeTabSubtitle => "新しいブランチでの独立したチェックアウト", + L10nKey::CmdRenameTab => "タブの名前を変更…", + L10nKey::CmdSplitRight => "右に分割", + L10nKey::CmdSplitDown => "下に分割", + L10nKey::CmdZoomPane => "ペインを拡大", + L10nKey::CmdNextPane => "次のペイン", + L10nKey::CmdPreviousPane => "前のペイン", + L10nKey::CmdFocusPaneLeft => "左のペインにフォーカス", + L10nKey::CmdFocusPaneRight => "右のペインにフォーカス", + L10nKey::CmdFocusPaneUp => "上のペインにフォーカス", + L10nKey::CmdFocusPaneDown => "下のペインにフォーカス", + L10nKey::CmdResizePaneLeft => "ペインを左にリサイズ", + L10nKey::CmdResizePaneRight => "ペインを右にリサイズ", + L10nKey::CmdResizePaneUp => "ペインを上にリサイズ", + L10nKey::CmdResizePaneDown => "ペインを下にリサイズ", + L10nKey::CmdSwapPaneNext => "次のペインと入れ替え", + L10nKey::CmdSwapPanePrevious => "前のペインと入れ替え", + L10nKey::CmdNextTab => "次のタブ", + L10nKey::CmdPreviousTab => "前のタブ", + L10nKey::CmdCopyWorkingDirectory => "作業ディレクトリをコピー", + L10nKey::CmdCopySessionId => "セッション ID をコピー", + L10nKey::CmdCopySessionIdSubtitle => "コーディングエージェント自身のセッション ID", + L10nKey::CmdForkSession => "セッションをフォーク", + L10nKey::CmdForkSessionSubtitle => "このエージェントのセッションを新しいタブにフォーク", + L10nKey::CmdMarkTabAsUnread => "タブを未読としてマーク", + L10nKey::CmdClosePaneTab => "ペイン / タブを閉じる", + L10nKey::CmdCloseOtherTabs => "他のタブを閉じる", + L10nKey::CmdCloseTabsToTheRight => "右側のタブを閉じる", + L10nKey::CmdReopenClosedTab => "閉じたタブをもう一度開く", + L10nKey::CmdNewWorkspace => "新しいワークスペース", + L10nKey::CmdSwitchWorkspace => "ワークスペースを切り替える…", + L10nKey::CmdRenameWorkspace => "ワークスペースの名前を変更…", + L10nKey::CmdStopWorkspace => "ワークスペースを停止…", + L10nKey::CmdStopWorkspaceSubtitle => "シェルを終了し、レイアウトを保持", + L10nKey::CmdDeleteWorkspace => "ワークスペースを削除…", + L10nKey::CmdDeleteWorkspaceSubtitle => "シェルを終了し、レイアウトを消去", + L10nKey::CmdShowLeftSidebar => "左サイドバーを表示", + L10nKey::CmdHideLeftSidebar => "左サイドバーを非表示", + L10nKey::CmdHideRightPanel => "右パネルを非表示", + L10nKey::CmdShowRightPanel => "右パネルを表示", + L10nKey::CmdShowCodePanel => "コードパネルを表示", + L10nKey::CmdTabBarMoveToTop => "タブバー: 上部へ移動", + L10nKey::CmdTabBarMoveToLeftSidebar => "タブバー: 左サイドバーへ移動", + L10nKey::CmdRightPanelInfo => "右パネル: 情報", + L10nKey::CmdRightPanelChanges => "右パネル: 変更", + L10nKey::CmdRightPanelFiles => "右パネル: ファイル", + L10nKey::CmdChangeTheme => "テーマを変更…", + L10nKey::CmdResetFontSize => "フォントサイズをリセット", + L10nKey::CmdEnterFullScreen => "全画面表示", + L10nKey::CmdClearScrollback => "スクロールバックをクリア", + L10nKey::CmdFindInTerminal => "ターミナル内を検索…", + L10nKey::CmdFindNext => "次を検索", + L10nKey::CmdFindPrevious => "前を検索", + L10nKey::CmdCopy => "コピー", + L10nKey::CmdCut => "切り取り", + L10nKey::CmdPaste => "貼り付け", + L10nKey::CmdSelectAll => "すべて選択", + L10nKey::CmdSshAddConnection => "SSH: 接続を追加…", + L10nKey::CmdSshManageProfiles => "SSH: プロファイルを管理…", + L10nKey::CmdSshReconnect => "SSH: 再接続", + L10nKey::CmdSshRemoteFiles => "SSH: リモートファイル", + L10nKey::CmdSshPortForwarding => "SSH: ポートフォワーディング", + L10nKey::CmdSshConnectWithInput => "SSH: {input} に接続", + L10nKey::CmdAgentSendSelection => "エージェント: 選択範囲を送信", + L10nKey::CmdAgentSendSelectionSubtitle => "選択範囲 → 実行中のコーディングエージェント", + L10nKey::CmdAgentSendGitDiffForReview => "エージェント: レビュー用に Git Diff を送信", + L10nKey::CmdAgentSendGitDiffSubtitle => "git diff → 実行中のコーディングエージェント", + L10nKey::CmdSettings => "設定…", + L10nKey::CmdKeyboardShortcuts => "キーボードショートカット", + L10nKey::CmdAboutTty7 => "tty7 について", + L10nKey::CmdCheckForUpdates => "アップデートを確認…", + L10nKey::CmdDocumentation => "ドキュメント", + L10nKey::CmdJoinDiscord => "Discord に参加", + L10nKey::CmdReportIssue => "問題を報告…", + L10nKey::CmdRestartServer => "サーバーを再起動…", + L10nKey::CmdRestartServerSubtitle => "実行中のすべてのシェルを終了し、レイアウトは保持", + L10nKey::CmdQuitTty7 => "tty7 を終了", + L10nKey::CmdQuitTty7Subtitle => "シェルは実行を継続", + L10nKey::CmdQuickConnect => "「{target}」に接続", + L10nKey::CmdQuickConnectSaveProfile => "「{target}」をプロファイルとして保存…", + L10nKey::CmdRecent => "最近", + L10nKey::AppRestartServerTitle => "サーバーを再起動しますか?", + L10nKey::AppRestartServerMismatchDetail => { + "シェルを保持中のサーバーは別のビルドです(v{build}、プロトコル {protocol} — このアプリは {ours} を使用)。そのまま使ってもシェルは残せますが、プロトコルが変わった機能は再起動まで正しく動かない可能性があります。再起動すると新しいサーバーが起動します。タブは新しいシェルで開きます。実行中のものはすべて終了します" + } + L10nKey::AppRestartServerOldDetail => { + "シェルを保持中のサーバーは、アプリの古いバージョンのものです。そのまま使ってもシェルは残せますが、新しい機能は再起動まで正しく動かない可能性があります。再起動すると新しいサーバーが起動します。タブは新しいシェルで開きます。実行中のものはすべて終了します" + } + L10nKey::AppKeepShells => "シェルを保持", + L10nKey::AppRestart => "再起動", + L10nKey::AppRestartServerNotSsh => { + "tty7 は SSH で到達できるマシン上のサーバーしか再起動できません。{label} はこのコンピュータで実行されています。代わりにそのワークスペースを止めてください" + } + L10nKey::AppRestartServerBody => { + "このコンピュータで実行中のすべてのシェルが停止します。タブとレイアウトは保持され、新しいシェルで開きます" + } + L10nKey::AppWorktreeRemoveDetailDirty => { + "閉じたタブの {path} にあるワークツリーには未コミットの変更があります" + } + L10nKey::AppWorktreeRemoveDetailClean => { + "閉じたタブの {path} にあるワークツリーはクリーンです" + } + L10nKey::AppWorktreeRemoveTitle => "ワークツリー「{branch}」を削除しますか?", + L10nKey::AppWorktreeDiscardAndRemove => "変更を破棄して削除", + L10nKey::AppWorktreeRemove => "ワークツリーを削除", + L10nKey::AppWorktreeKeep => "保持", + L10nKey::AppReopenTabFailed => "タブを開き直せませんでした: ターミナルが起動しませんでした", + L10nKey::AppOpenTerminalFailed => "ターミナルを開けませんでした: {error}", + L10nKey::AppSshConnectionFailed => "SSH 接続に失敗しました: {error}", + L10nKey::AppSshReconnectFailed => "SSH 再接続に失敗しました: {error}", + L10nKey::AppSplitPaneFailed => "ペインを分割できませんでした: {error}", + L10nKey::AppWorktreeRemoved => "ワークツリー「{branch}」を削除しました", + L10nKey::AppWorktreeRemoveFailed => "ワークツリーの削除に失敗しました: {error}", + L10nKey::AppForkStillConnecting => "フォークできませんでした: ペインはまだ接続中です", + L10nKey::AppPaneNoCodingAgent => "このペインはコーディングエージェントを実行していません", + L10nKey::AppForkNoCommand => "tty7 には {name} 用のフォークコマンドがありません", + L10nKey::AppForkLocalOnly => { + "{name} のセッションはローカルペインからしかフォークできません" + } + L10nKey::AppForkNoSessionId => { + "tty7 はこのペインで {name} のセッション ID を確認できていません — 設定 → エージェントでフックをインストールしてください" + } + L10nKey::AppForkSessionIdNotToken => { + "{name} のセッション ID はプレーンなトークンではありません" + } + L10nKey::AppForkMidTurn => { + "{name} は処理の途中です — 進行中のターンはフォークに含まれません" + } + L10nKey::AppTabNoWorkingDirectory => "このタブにはまだ作業ディレクトリがありません", + L10nKey::AppNothingSelected => { + "選択されているものはありません — 先にターミナルの出力を選択してください" + } + L10nKey::AppPaneNoKnownDirectory => "このペインには既知のディレクトリがありません", + L10nKey::AppNoUncommittedChanges => { + "{cwd} に未コミットの変更はありません(または git リポジトリではありません)" + } + L10nKey::AppCmdSshProfileTitle => "SSH: {title}", + L10nKey::AppCmdSwitchToTab => "タブに切り替え: {label}", + L10nKey::AppPlaceholderDescription => "説明", + L10nKey::AppPlaceholderSshQuickConnect => "user@host または user@host:port", + L10nKey::AppPlaceholderLoginShell => "ログインシェル", + L10nKey::AppPlaceholderNone => "なし", + L10nKey::AppPlaceholderOpenInDefaultApp => "デフォルトのアプリで開く", + L10nKey::AppThemeColorBackground => "背景", + L10nKey::AppThemeColorForeground => "前景", + L10nKey::AppThemeColorAccent => "アクセント", + L10nKey::AppThemeColorCursor => "カーソル", + L10nKey::AppThemeColorSelection => "選択範囲", + L10nKey::AppAgentHooksThisComputer => "このコンピュータ", + L10nKey::AppAgentHooksRemoteMachine => "リモートマシン", + L10nKey::AppAgentHooksNoHomeDir => { + "tty7 はこのコンピュータのホームディレクトリを特定できなかったため、インストール先がありません" + } + L10nKey::AppAgentHooksOffline => { + "このマシンに接続されていないため、エージェントの設定を読み書きできません。そのマシンでワークスペースを開いてから戻ってください" + } + L10nKey::AppAgentHooksHomeDirUnresolved => "ホームディレクトリを解決できません", + L10nKey::AppAgentHooksOpFailed => "失敗: {error}", + L10nKey::AppKeybindingDisplacedNote => { + "{action} が {previous} からショートカットを奪いました。{previous} は現在未設定です" + } + L10nKey::AppLocalServerName => "ローカルサーバー", + L10nKey::AppSshParseUnbalancedQuotes => "SSH コマンド内の引用符が閉じていません", + L10nKey::AppSshParseNoRemoteCommands => "ここではリモートコマンドをサポートしていません", + L10nKey::AppSshParseFlagNeedsValue => "-{flag} には値が必要です", + L10nKey::AppSshParseInvalidPort => "無効なポート「{value}」", + L10nKey::AppSshParseUnsupportedOption => "サポートされていないオプション「{option}」", + L10nKey::AppSshParseEnterHost => "接続先のホストを入力してください", + L10nKey::AppSshParseBadHost => "ホスト「{host}」を解析できません", + L10nKey::AppMenuMinimize => "最小化", + L10nKey::AppMenuZoom => "ズーム", + L10nKey::SwitcherStatusRestarting => "再起動中…", + L10nKey::SwitcherStatusInstalling => "インストール中…", + L10nKey::SwitcherStatusConnecting => "接続中…", + L10nKey::SwitcherStatusConnectFailed => "接続できませんでした", + L10nKey::SwitcherStatusNotConnected => "未接続", + L10nKey::SettingsFontDefault => "デフォルト(メインに合わせる)", + L10nKey::ForwardDescriptionPlaceholder => "用途", + L10nKey::SettingsShellDefaultLoginShell => "あなたのログインシェル", + L10nKey::SftpErrorUnexpectedReply => "予期しない応答: {reply}", + L10nKey::SftpErrorUnsafeRemoteName => "安全でないリモート名 {name} を拒否しました", + L10nKey::SftpErrorInvalidOctalMode => "無効な 8 進数モードです", + L10nKey::PanelMoreChangedFiles => { + "… さらに変更されたファイル {count} 個 — 表示するには `git diff` を実行してください" + } + L10nKey::PanelUntracked => "未追跡 {count}", + L10nKey::AppMenuAbout => "tty7 について", + L10nKey::AppMenuCheckForUpdates => "アップデートを確認…", + L10nKey::AppMenuSettings => "設定…", + L10nKey::AppMenuServices => "サービス", + L10nKey::AppMenuHideApp => "tty7 を非表示", + L10nKey::AppMenuHideOthers => "ほかを非表示", + L10nKey::AppMenuShowAll => "すべて表示", + L10nKey::AppMenuQuit => "tty7 を終了", + L10nKey::AppMenuFile => "ファイル", + L10nKey::AppMenuEdit => "編集", + L10nKey::AppMenuView => "表示", + L10nKey::AppMenuWindow => "ウィンドウ", + L10nKey::AppMenuHelp => "ヘルプ", + L10nKey::AppMenuNewTab => "新規タブ", + L10nKey::AppMenuNewWorkspace => "新規ワークスペース", + L10nKey::AppMenuNewWorktreeTab => "新規ワークツリータブ", + L10nKey::AppMenuSplitRight => "右に分割", + L10nKey::AppMenuSplitDown => "下に分割", + L10nKey::AppMenuRenameTab => "タブの名前を変更…", + L10nKey::AppMenuCopyWorkingDirectory => "作業ディレクトリをコピー", + L10nKey::AppMenuCopySessionId => "セッション ID をコピー", + L10nKey::AppMenuForkSession => "セッションをフォーク", + L10nKey::AppMenuClosePaneTab => "ペイン / タブを閉じる", + L10nKey::AppMenuCloseOtherTabs => "他のタブを閉じる", + L10nKey::AppMenuCloseTabsRight => "右側のタブを閉じる", + L10nKey::AppMenuReopenClosedTab => "閉じたタブをもう一度開く", + L10nKey::AppMenuRenameWorkspace => "ワークスペースの名前を変更…", + L10nKey::AppMenuStopWorkspace => "ワークスペースを停止…", + L10nKey::AppMenuDeleteWorkspace => "ワークスペースを削除…", + L10nKey::AppMenuUndo => "元に戻す", + L10nKey::AppMenuRedo => "やり直す", + L10nKey::AppMenuCut => "切り取り", + L10nKey::AppMenuCopy => "コピー", + L10nKey::AppMenuPaste => "貼り付け", + L10nKey::AppMenuSelectAll => "すべて選択", + L10nKey::AppMenuFind => "検索…", + L10nKey::AppMenuFindNext => "次を検索", + L10nKey::AppMenuFindPrevious => "前を検索", + L10nKey::AppMenuCommandPalette => "コマンドパレット…", + L10nKey::AppMenuIncreaseFontSize => "フォントサイズを拡大", + L10nKey::AppMenuDecreaseFontSize => "フォントサイズを縮小", + L10nKey::AppMenuResetFontSize => "フォントサイズをリセット", + L10nKey::AppMenuLeftSidebar => "左サイドバー", + L10nKey::AppMenuRightPanel => "右パネル", + L10nKey::AppMenuCodePanel => "コードパネル", + L10nKey::AppMenuTabBarPosition => "タブバーの位置", + L10nKey::AppMenuFocusNextPane => "次のペインにフォーカス", + L10nKey::AppMenuFocusPreviousPane => "前のペインにフォーカス", + L10nKey::AppMenuZoomPane => "ペインを拡大", + L10nKey::AppMenuClearScrollback => "スクロールバックをクリア", + L10nKey::AppMenuEnterFullscreen => "全画面表示", + L10nKey::AppMenuDocumentation => "tty7 ドキュメント", + L10nKey::AppMenuKeyboardShortcuts => "キーボードショートカット", + L10nKey::AppMenuJoinDiscord => "Discord に参加", + L10nKey::AppMenuReportIssue => "問題を報告…", + L10nKey::AppMenuRestartServer => "サーバーを再起動…", + L10nKey::WindowUntitled => "無題", + L10nKey::TrayShowTty7 => "tty7 を表示", + L10nKey::TrayNotifications => "通知", + L10nKey::TrayAgentNeedsInput => "入力が必要", + L10nKey::NotifyCommandFinished => "コマンドが {secs} 秒で完了しました", + L10nKey::NotifyCommandFinishedWithCommand => "{command} — {secs} 秒で完了しました", + L10nKey::NotifyAgentFinished => "{secs} 秒で完了しました", + L10nKey::NotifyAgentWaiting => "入力を待っています", + L10nKey::NotifyTurnFinished => "ターンが完了しました", + L10nKey::TabTooltipMore => "その他", + L10nKey::TabTooltipShowSidebar => "サイドバーを表示", + L10nKey::TabTooltipHideSidebar => "サイドバーを非表示", + L10nKey::TabTooltipHideDetailPanel => "詳細パネルを非表示", + L10nKey::TabTooltipShowDetailPanel => "詳細パネルを表示", + L10nKey::TabUnnamedShell => "シェル {n}", + L10nKey::ShellDefault => "デフォルト", + L10nKey::SidebarScratchGroup => "スクラッチ", + L10nKey::TabContextCloseTab => "タブを閉じる", + L10nKey::TabContextCloseTabsBelow => "下のタブを閉じる", + L10nKey::TabContextMarkUnread => "未読としてマーク", + }) +} + +pub fn translate_variant_ja(key: L10nKey, branch: &'static str) -> Option<&'static str> { + let res = match (key, branch) { + (L10nKey::SettingsAliasesLinked, "zero") => "エイリアスはまだリンクされていません", + (L10nKey::SettingsAliasesLinked, "one") => "エイリアス 1 件がリンクされています", + (L10nKey::SettingsAliasesLinked, "other") => "エイリアス {count} 件がリンクされています", + (L10nKey::SettingsRulesOpenedWithConnection, "zero") => "接続と同時に開くルール 0 件", + (L10nKey::SettingsRulesOpenedWithConnection, "one") => "接続と同時に開くルール 1 件", + (L10nKey::SettingsRulesOpenedWithConnection, "other") => { + "接続と同時に開くルール {count} 件" + } + (L10nKey::SettingsOfflineMachines, "zero") => { + "未接続の保存済みマシンはもうありません — いずれかでワークスペースを開くと、そこにフックをインストールできます" + } + (L10nKey::SettingsOfflineMachines, "one") => { + "未接続の保存済みマシンがもう 1 台あります — そのマシンでワークスペースを開くと、そこにフックをインストールできます" + } + (L10nKey::SettingsOfflineMachines, "other") => { + "未接続の保存済みマシンがさらに {count} 台あります — いずれかでワークスペースを開くと、そこにフックをインストールできます" + } + (L10nKey::PanelUntracked, "zero") => "未追跡 0", + (L10nKey::PanelUntracked, "one") => "未追跡 1", + (L10nKey::PanelUntracked, "other") => "未追跡 {count}", + (L10nKey::PanelMoreChangedFiles, "zero") => { + "… さらに変更されたファイル 0 個 — 表示するには `git diff` を実行してください" + } + (L10nKey::PanelMoreChangedFiles, "one") => { + "… さらに変更されたファイル 1 個 — 表示するには `git diff` を実行してください" + } + (L10nKey::PanelMoreChangedFiles, "other") => { + "… さらに変更されたファイル {count} 個 — 表示するには `git diff` を実行してください" + } + (L10nKey::DiffChangedFiles, "zero") => "変更されたファイル 0 個", + (L10nKey::DiffChangedFiles, "one") => "変更されたファイル 1 個", + (L10nKey::DiffChangedFiles, "other") => "変更されたファイル {count} 個", + (L10nKey::DiffUntrackedCount, "zero") => " · 未追跡 0 件", + (L10nKey::DiffUntrackedCount, "one") => " · 未追跡 1 件", + (L10nKey::DiffUntrackedCount, "other") => " · 未追跡 {count} 件", + (L10nKey::DiffMoreFiles, "zero") => { + "… さらに変更されたファイル 0 個 — ターミナルで `git diff` を実行して確認してください" + } + (L10nKey::DiffMoreFiles, "one") => { + "… さらに変更されたファイル 1 個 — ターミナルで `git diff` を実行して確認してください" + } + (L10nKey::DiffMoreFiles, "other") => { + "… さらに変更されたファイル {count} 個 — ターミナルで `git diff` を実行して確認してください" + } + (L10nKey::DiffUntrackedHeader, "zero") => "未追跡ファイル (0)", + (L10nKey::DiffUntrackedHeader, "one") => "未追跡ファイル (1)", + (L10nKey::DiffUntrackedHeader, "other") => "未追跡ファイル ({count})", + (L10nKey::DiffMoreUntracked, "zero") => { + "… さらに 0 個 — ターミナルで `git status` を実行して確認してください" + } + (L10nKey::DiffMoreUntracked, "one") => { + "… さらに 1 個 — ターミナルで `git status` を実行して確認してください" + } + (L10nKey::DiffMoreUntracked, "other") => { + "… さらに {count} 個 — ターミナルで `git status` を実行して確認してください" + } + (L10nKey::DiffUntrackedSummary, "zero") => "未追跡 0", + (L10nKey::DiffUntrackedSummary, "one") => "未追跡 1", + (L10nKey::DiffUntrackedSummary, "other") => "未追跡 {count}", + (L10nKey::HomeTimeMinutesAgo, "one") => "1 分前", + (L10nKey::HomeTimeMinutesAgo, "other") => "{count} 分前", + (L10nKey::HomeTimeHoursAgo, "one") => "1 時間前", + (L10nKey::HomeTimeHoursAgo, "other") => "{count} 時間前", + (L10nKey::HomeTimeDaysAgo, "one") => "1 日前", + (L10nKey::HomeTimeDaysAgo, "other") => "{count} 日前", + (L10nKey::WindowStopShells, "zero") => "レイアウトと作業ディレクトリは消去されます", + (L10nKey::WindowStopShells, "one") => "実行中のシェル 1 個が終了します", + (L10nKey::WindowStopShells, "other") => "実行中のシェル {count} 個が終了します", + (L10nKey::WindowDeleteShells, "zero") => "レイアウトと作業ディレクトリは消去されます", + (L10nKey::WindowDeleteShells, "one") => { + "実行中のシェル 1 個が終了し、レイアウトが消去されます" + } + (L10nKey::WindowDeleteShells, "other") => { + "{count} 個の実行中シェルが終了し、レイアウトが消去されます" + } + _ => return None, + }; + Some(res) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn japanese_covers_every_key() { + assert_eq!(translate_ja(L10nKey::SearchTabs), Some("タブを検索…")); + assert!(translate_variant_ja(L10nKey::WindowDeleteShells, "other").is_some()); + } +} diff --git a/src/ui/i18n/mod.rs b/src/ui/i18n/mod.rs new file mode 100644 index 00000000..ae2ace1b --- /dev/null +++ b/src/ui/i18n/mod.rs @@ -0,0 +1,2025 @@ +use std::sync::atomic::{AtomicU8, Ordering}; + +mod en; +mod ja; +mod zh; + +use en::{translate_en, translate_variant_en}; +use ja::{translate_ja, translate_variant_ja}; +use zh::{translate_variant_zh, translate_zh}; + +pub struct LanguageInfo { + pub code: &'static str, + pub label_key: L10nKey, + pub translate_fn: fn(L10nKey) -> Option<&'static str>, + pub translate_variant_fn: fn(L10nKey, &'static str) -> Option<&'static str>, +} + +pub const SUPPORTED_LANGUAGES: &[LanguageInfo] = &[ + LanguageInfo { + code: "en", + label_key: L10nKey::SettingsLanguageEnglish, + translate_fn: |k| Some(translate_en(k)), + translate_variant_fn: translate_variant_en, + }, + LanguageInfo { + code: "zh-CN", + label_key: L10nKey::SettingsLanguageChinese, + translate_fn: translate_zh, + translate_variant_fn: translate_variant_zh, + }, + LanguageInfo { + code: "ja-JP", + label_key: L10nKey::SettingsLanguageJapanese, + translate_fn: translate_ja, + translate_variant_fn: translate_variant_ja, + }, +]; + +pub fn find_language(code: &str) -> Option<&'static LanguageInfo> { + SUPPORTED_LANGUAGES.iter().find(|lang| lang.code == code) +} + +pub fn default_language_code() -> &'static str { + SUPPORTED_LANGUAGES[0].code +} + +static CURRENT: AtomicU8 = AtomicU8::new(0); + +#[cfg(test)] +thread_local! { + static TEST_LOCALE: std::cell::Cell> = const { std::cell::Cell::new(None) }; +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum L10nKey { + SearchTabs, + SearchFiles, + SearchThemes, + SearchSettings, + FilterHosts, + SearchCommandsOrHost, + SearchTheme, + Search, + SearchWorkspacesAndMachines, + SearchFonts, + NewFolderName, + NewFileName, + HomeNewTab, + HomeReopenClosedTab, + HomeSwitchWorkspace, + HomeCommandPalette, + HomeSplitRight, + HomeSplitDown, + HomeSettings, + TrayQuitStopServer, + Reconnect, + None, + TryAgain, + Refreshing, + Binary, + Delete, + NoMatchingCommands, + ConnectSshHint, + EditHint, + OpenFileFromTree, + FileChangedOnDisk, + Reload, + KeepMine, + Dismiss, + StoredPasswordRejected, + Trust, + Abort, + HostKeyOverrideMessage, + Override, + RememberKeychain, + CloseWindowTitle, + CloseWindowBody, + Cancel, + Close, + QuitStopServerTitle, + QuitStopServerBody, + QuitAndStop, + CloseSshConnectionTitle, + CloseSshConnectionBody, + Keep, + SettingsNavAppearance, + SettingsNavTerminal, + SettingsNavInput, + SettingsNavSsh, + SettingsNavAgents, + SettingsNavWindowTabs, + SettingsNavKeybindings, + SettingsNavAbout, + SettingsHeader, + Reset, + Save, + Connect, + Download, + Link, + SettingsThemeIntroTitle, + SettingsThemeIntroDesc, + SettingsTypography, + SettingsFontSize, + SettingsFontSizeDesc, + SettingsLineHeight, + SettingsLineHeightDesc, + SettingsFontFamily, + SettingsFontFamilyDesc, + SettingsBoldFont, + SettingsBoldFontDesc, + SettingsItalicFont, + SettingsItalicFontDesc, + SettingsFontLigatures, + SettingsFontLigaturesDesc, + SettingsCursor, + SettingsCursorShape, + SettingsCursorShapeDesc, + SettingsCursorBlink, + SettingsCursorBlinkDesc, + SettingsLanguage, + SettingsLanguageDesc, + SettingsLanguageEnglish, + SettingsLanguageChinese, + SettingsLanguageJapanese, + SettingsSearchLanguageKeywords, + SettingsTransparency, + SettingsOpacity, + SettingsOpacityDesc, + SettingsBlur, + SettingsBlurDesc, + FollowTheme, + SettingsDimInactivePanes, + SettingsDimInactivePanesDesc, + SettingsOpenThemesFolder, + SettingsChangeThemeImage, + SettingsChooseThemeImage, + SettingsRemoveThemeImage, + SettingsImageOpacity, + SettingsImageOpacityDesc, + SettingsEditTheme, + SettingsEditThemeIntro, + SettingsBackgroundImage, + SettingsBackgroundImageDesc, + SettingsAnsiColors, + SettingsCustomThemes, + SettingsCustomThemesIntro, + SettingsDuplicateToEdit, + SettingsHosts, + SettingsDefaults, + SettingsInheritedByEveryHost, + SettingsNoSavedHosts, + SettingsNothingMatches, + SettingsInTty7, + SettingsImportFromSshConfig, + SettingsExpandAllGroups, + SettingsNoHostsYet, + SettingsNothingSelected, + SettingsTypeAddressToConnect, + SettingsMoreInSshConfig, + SettingsAliasesLinked, + SettingsImportAliases, + SettingsImportAliasesDesc, + SettingsImportNow, + SettingsDefaultsIntro, + SettingsCopyAddress, + SettingsDuplicate, + SettingsForgetPassword, + SettingsForgotPasswordFor, + SettingsCouldntForgetPassword, + SettingsSecurity, + SettingsSecurityIntro, + SettingsVerifyHostKeys, + SettingsVerifyHostKeysDesc, + WarnBeforeClosing, + SettingsWarnBeforeClosingDesc, + SettingsNewHost, + SettingsName, + SettingsNameDesc, + SettingsHost, + SettingsHostDesc, + SettingsUser, + SettingsUserDesc, + SettingsAuth, + SettingsAuthDesc, + SettingsAuthModeAuto, + SettingsAuthModePassword, + SettingsAuthModeKey, + SettingsAuthModeAgent, + SettingsAuthMode2Fa, + SettingsJumpHost, + SettingsJumpHostDesc, + SettingsNoneSummary, + SettingsNoneLower, + SettingsPortForwarding, + SettingsRulesOpenedWithConnection, + SettingsAddRule, + SettingsFwdLegendLocal, + SettingsFwdLegendRemote, + SettingsFwdLegendDynamic, + SettingsFwdNeedsBoth, + SettingsFwdNeedsListen, + SettingsAdvanced, + SettingsAdvancedSummary, + SettingsIdentityFiles, + SettingsIdentityFilesDesc, + SettingsAgentForwarding, + SettingsAgentForwardingDesc, + SettingsProxyCommand, + SettingsProxyCommandDesc, + SettingsSocks5Proxy, + SettingsSocks5ProxyDesc, + SettingsHttpProxy, + SettingsHttpProxyDesc, + SettingsKexAlgorithms, + SettingsKexAlgorithmsDesc, + SettingsCiphers, + SettingsCiphersDesc, + SettingsMacs, + SettingsMacsDesc, + SettingsHostKeyAlgorithms, + SettingsHostKeyAlgorithmsDesc, + SettingsCompression, + SettingsJumpHostVia, + SettingsConnected, + SettingsProfileCopied, + SettingsCompressionDesc, + SettingsKeepaliveInterval, + SettingsKeepaliveIntervalDesc, + SettingsKeepaliveCountMax, + SettingsKeepaliveCountMaxDesc, + SettingsConnectTimeout, + SettingsConnectTimeoutDesc, + SettingsX11Forwarding, + SettingsX11ForwardingDesc, + SettingsShellIntegration, + SettingsShellIntegrationDesc, + SettingsLoginScripts, + SettingsLoginScriptsDesc, + SettingsSkipBanner, + SettingsSkipBannerDesc, + SettingsDefaultFollowsDefaults, + SettingsValueOn, + SettingsValueOff, + SettingsDefault, + SettingsOn, + SettingsOff, + SettingsShell, + SettingsShellIntro, + SettingsProgram, + SettingsProgramDesc, + SettingsArguments, + SettingsArgumentsDesc, + SettingsStartIn, + SettingsStartInDesc, + SettingsCustomPath, + SettingsCustomPathDesc, + SettingsWdInherit, + SettingsWdHome, + SettingsWdCustom, + SettingsShellFooter, + SettingsScrolling, + SettingsScrollback, + SettingsScrollbackDesc, + SettingsScrollSpeed, + SettingsScrollSpeedDesc, + SettingsMouse, + SettingsFocusFollowsMouse, + SettingsFocusFollowsMouseDesc, + SettingsHideMouseWhileTyping, + SettingsHideMouseWhileTypingDesc, + SettingsReportMouseToApps, + SettingsReportMouseToAppsDesc, + SettingsBell, + SettingsTerminalBell, + SettingsTerminalBellDesc, + SettingsLinks, + DetectUrls, + SettingsDetectUrlsDesc, + ForwardSshLoopbackLinks, + SettingsForwardSshLoopbackLinksDesc, + OpenFilesWith, + SettingsOpenFilesWithDesc, + SettingsBellModeOff, + SettingsBellModeVisual, + SettingsBellModeAudible, + SettingsBellModeBoth, + SettingsPrompt, + SettingsPromptIntro, + SettingsTabCompletion, + SettingsTabCompletionDesc, + SettingsHistorySearch, + SettingsHistorySearchDesc, + SettingsSelectionClipboard, + SettingsSmartSelection, + SettingsSmartSelectionDesc, + SettingsCopyOnSelect, + SettingsCopyOnSelectDesc, + SettingsTrimTrailingSpaces, + SettingsTrimTrailingSpacesDesc, + SettingsKeyboard, + SettingsOptionAsMeta, + SettingsOptionAsMetaDesc, + SettingsAgentsIntro, + SettingsAgentsIntroDesc, + SettingsReadingAgentConfig, + SettingsStatusNotInstalled, + SettingsStatusInstalled, + SettingsStatusOutdated, + SettingsInstall, + SettingsReinstall, + SettingsUpdate, + SettingsUninstall, + SettingsOfflineMachines, + SettingsSyncWithSystem, + SettingsSyncWithSystemDesc, + SettingsChangeTheme, + SettingsThemes, + SettingsThemePanelManual, + SettingsThemePanelLight, + SettingsThemePanelDark, + SettingsCustom, + SettingsBuiltIn, + SettingsDark, + SettingsLight, + SettingsLightMode, + SettingsDarkMode, + SettingsActive, + SettingsStartupWindow, + SettingsStartupWindowDesc, + SettingsRememberWindowSize, + SettingsRememberWindowSizeDesc, + SettingsRestoreLastLayout, + SettingsRestoreLastLayoutDesc, + SettingsConfirmLastWindowClose, + SettingsConfirmLastWindowCloseDesc, + SettingsShowTrayIcon, + SettingsShowTrayIconDesc, + SettingsTabs, + SettingsNewTabPosition, + SettingsNewTabPositionDesc, + SettingsTabBarPosition, + SettingsTabBarPositionDesc, + SettingsSidebarGrouping, + SettingsSidebarGroupingDesc, + SettingsDiffPreviewFromCounts, + SettingsDiffPreviewFromCountsDesc, + SettingsNotifications, + SettingsWindow, + SettingsNotifyOnCommandFinish, + SettingsNotifyOnCommandFinishDesc, + SettingsNotifyThreshold, + SettingsNotifyThresholdDesc, + NotifyModeNever, + NotifyModeUnfocused, + NotifyModeAlways, + SettingsStartupNormal, + SettingsStartupMaximized, + SettingsStartupFullscreen, + SettingsAfterCurrent, + SettingsAtEnd, + SettingsTop, + SettingsLeft, + SettingsByRepo, + SettingsFlat, + SettingsPreset, + SettingsPresetDesc, + SettingsPrefix, + SettingsPressKeys, + SettingsPauseToSaveEsc, + SettingsKeybindingsIntroDesc, + SettingsPrefixNote, + SettingsRestoreAllDefaults, + SettingsAboutDesc1, + SettingsAboutTech, + SettingsVersion, + SettingsUpdates, + SettingsUpdateAndRelaunch, + SettingsUpdateViewRelease, + SettingsUpdateChecking, + SettingsUpdateUpToDate, + SettingsUpdateDownloading, + SettingsUpdateInstalling, + SettingsUpdateCheckNow, + SettingsUpdateCheckFailed, + SettingsUpdatePrepareFailed, + SettingsUpdateLaunchFailed, + SettingsUpdateUnsupportedMacos, + SettingsUpdateUnsupportedLinux, + SettingsUpdateUnsupportedWindows, + SettingsUpdateWindowsAllUsers, + SettingsUpdateUnsupportedPlatform, + SettingsUpdateMissingPackage, + SettingsUpdateMissingChecksums, + SettingsVersionAvailable, + SettingsCheckUpdatesDesc, + SettingsCheckUpdatesOnLaunch, + SettingsCommandLine, + SettingsCommandLineDesc, + SettingsInstallCliOnPath, + SettingsServer, + SettingsServerDesc, + SettingsRestartServer, + SettingsAppHttpProxy, + SettingsAppHttpProxyDesc, + SettingsAppHttpProxyInvalid, + SettingsAgentClaudeCode, + SettingsAgentCodex, + SettingsAgentCopilotCli, + SettingsAgentOpencode, + SettingsAgentPi, + SettingsAgentGrokBuild, + SettingsSearchAppHttpProxyKeywords, + SettingsSearchAboutKeywords, + SettingsSearchAnsiColorsKeywords, + SettingsSearchArgumentsKeywords, + SettingsSearchBlurKeywords, + SettingsSearchBoldFontKeywords, + SettingsSearchClaudeCodeKeywords, + SettingsSearchCodexKeywords, + SettingsSearchCommandLineToolKeywords, + SettingsSearchCommandLineToolTitle, + SettingsSearchConfirmLastWindowCloseKeywords, + SettingsSearchCopilotCliKeywords, + SettingsSearchCopyOnSelectKeywords, + SettingsSearchCursorBlinkKeywords, + SettingsSearchCursorShapeKeywords, + SettingsSearchCustomThemesKeywords, + SettingsSearchDetectUrlsKeywords, + SettingsSearchDiffPreviewFromCountsKeywords, + SettingsSearchDimInactivePanesKeywords, + SettingsSearchFocusFollowsMouseKeywords, + SettingsSearchFontFamilyKeywords, + SettingsSearchFontLigaturesKeywords, + SettingsSearchFontSizeKeywords, + SettingsSearchForwardSshLoopbackLinksKeywords, + SettingsSearchGrokBuildKeywords, + SettingsSearchHideMouseWhileTypingKeywords, + SettingsSearchHistorySearchKeywords, + SettingsSearchHostsKeywords, + SettingsSearchHowShellsWorkKeywords, + SettingsSearchHowShellsWorkTitle, + SettingsSearchItalicFontKeywords, + SettingsSearchKeybindingsKeywords, + SettingsSearchKeybindingsTitle, + SettingsSearchLineHeightKeywords, + SettingsSearchNewTabPositionKeywords, + SettingsSearchNotifyOnCommandFinishKeywords, + SettingsSearchNotifyThresholdKeywords, + SettingsSearchOpacityKeywords, + SettingsSearchOpenFilesWithKeywords, + SettingsSearchOpencodeKeywords, + SettingsSearchOptionAsMetaKeywords, + SettingsSearchPiKeywords, + SettingsSearchPortForwardingKeywords, + SettingsSearchProgramKeywords, + SettingsSearchRememberWindowSizeKeywords, + SettingsSearchReportMouseToAppsKeywords, + SettingsSearchRestoreLastLayoutKeywords, + SettingsSearchScrollSpeedKeywords, + SettingsSearchScrollbackKeywords, + SettingsSearchShowTrayIconKeywords, + SettingsSearchSidebarGroupingKeywords, + SettingsSearchSmartSelectionKeywords, + SettingsSearchStartInKeywords, + SettingsSearchSyncWithSystemKeywords, + SettingsSearchTabBarPositionKeywords, + SettingsSearchTabCompletionKeywords, + SettingsSearchTerminalBellKeywords, + SettingsSearchThemeKeywords, + SettingsSearchTrimTrailingSpacesKeywords, + SettingsSearchVerifyHostKeysKeywords, + SettingsSearchWarnBeforeClosingKeywords, + SettingsSearchStartupWindowKeywords, + SwitcherNoMatch, + AddSshHost, + ClickForNewWindow, + RestartServer, + OtherMachines, + Ok, + SftpNoTransfers, + SftpPanelTitleFiles, + SftpTooltipRefresh, + SftpTooltipMore, + SftpMenuNewFolder, + SftpMenuNewFile, + SftpMenuUpload, + SftpMenuGotoShellCwd, + SftpMenuHideTransferHistory, + SftpMenuTransferHistory, + SftpEditNewFolder, + SftpEditNewFile, + SftpEditRename, + SftpEditPermissions, + SftpLoading, + SftpEmptyDirectory, + SftpContextOpen, + SftpContextFollowSymlink, + SftpContextRename, + SftpContextChmod, + SftpTransferSummaryRunning, + SftpTransferSummaryFailed, + SftpTransferSummaryIdle, + SftpTransferProgress, + SftpTransferDone, + SftpTransferCancelled, + SftpTransferError, + SftpImagePasteUploadFailed, + ForwardPanelTitle, + ForwardDisconnected, + ForwardDisconnectedFrom, + ForwardTooltipAdd, + ForwardTooltipRemove, + ForwardLocal, + ForwardRemote, + ForwardDynamic, + ForwardBindLabel, + ForwardToLabel, + ForwardSocksLabel, + ForwardAdd, + FileTreePlaceholderFileName, + FileTreePlaceholderFolderName, + FileTreePlaceholderNewName, + FileTreeDeleteTitle, + FileTreeDeleteFolderBody, + FileTreeDeleteFileBody, + FileTreeDeleteFailed, + FileTreeContextOpen, + FileTreeContextCdHere, + FileTreeContextInsertPath, + FileTreeContextAttachAgent, + FileTreeContextNewFile, + FileTreeContextNewFolder, + FileTreeContextRename, + FileTreeContextCopyPath, + FileTreeContextHideDotfiles, + FileTreeContextShowDotfiles, + SshPromptNewKey, + SshPromptOldKey, + EditorCantOpen, + EditorCantRead, + EditorNotUtf8, + EditorSaveFailed, + EditorUnsavedChanges, + EditorDiscard, + EditorNoFileOpen, + EditorBackToTerminal, + EditorLnCol, + EditorEdit, + EditorPreview, + EditorWrapOn, + EditorWrapOff, + EditorFileTooLarge, + EditorBinaryFile, + PanelInfoTitle, + PanelChangesTitle, + PanelFilesTitle, + PanelNoSession, + PanelNoSessionHint, + PanelNoWorkingDirectory, + PanelNoWorkingDirectoryHint, + PanelLoading, + PanelNotAGitRepo, + PanelNotAGitRepoHint, + PanelNoChanges, + PanelNoChangesHint, + PanelMoreChangedFiles, + PanelUntracked, + PanelSessionSubtitle, + PanelProcessesSubtitle, + PanelPortsSubtitle, + PanelCwd, + PanelShell, + PanelSsh, + PanelBranch, + PanelChangesRow, + PanelAgent, + PanelAgentIdle, + PanelAgentWorking, + PanelAgentWaiting, + PanelAgentDone, + PanelRevealInFinder, + PanelOpenFolder, + WindowStop, + WindowDelete, + WindowThisWorkspace, + WindowConfirmTitle, + WindowStopUnreachable, + WindowDeleteUnreachable, + WindowStopShells, + WindowDeleteShells, + DiffReading, + DiffNotARepo, + DiffReadFailed, + DiffWorkingTreeClean, + DiffCloseTooltip, + DiffChangedFiles, + DiffUntrackedCount, + DiffMoreFiles, + DiffOversizedNotice, + DiffTruncatedPerFile, + DiffTruncatedBudget, + DiffUntrackedHeader, + DiffMoreUntracked, + DiffLines, + DiffChangedLines, + DiffBudgetAndCap, + DiffBudget, + DiffPerFileCap, + DiffUntrackedSummary, + PendingConnecting, + PendingUnreachable, + WorktreePromptNeedsName, + WorktreePromptTitle, + WorktreePromptName, + WorktreePromptBranch, + WorktreePromptBase, + WorktreePromptCreating, + WorktreePromptCreate, + AppNewWorktreeFailed, + HomeTimeJustNow, + HomeTimeMinutesAgo, + HomeTimeHourAgo, + HomeTimeHoursAgo, + HomeTimeYesterday, + HomeTimeDaysAgo, + HomeTimeOverWeekAgo, + HomeReopenNamed, + AppMenuAbout, + AppMenuCheckForUpdates, + AppMenuSettings, + AppMenuServices, + AppMenuHideApp, + AppMenuHideOthers, + AppMenuShowAll, + AppMenuQuit, + AppMenuFile, + AppMenuEdit, + AppMenuView, + AppMenuWindow, + AppMenuHelp, + AppMenuNewTab, + AppMenuNewWorkspace, + AppMenuNewWorktreeTab, + AppMenuSplitRight, + AppMenuSplitDown, + AppMenuRenameTab, + AppMenuCopyWorkingDirectory, + AppMenuCopySessionId, + AppMenuForkSession, + AppMenuClosePaneTab, + AppMenuCloseOtherTabs, + AppMenuCloseTabsRight, + AppMenuReopenClosedTab, + AppMenuRenameWorkspace, + AppMenuStopWorkspace, + AppMenuDeleteWorkspace, + AppMenuUndo, + AppMenuRedo, + AppMenuCut, + AppMenuCopy, + AppMenuPaste, + AppMenuSelectAll, + AppMenuFind, + AppMenuFindNext, + AppMenuFindPrevious, + AppMenuCommandPalette, + AppMenuIncreaseFontSize, + AppMenuDecreaseFontSize, + AppMenuResetFontSize, + AppMenuLeftSidebar, + AppMenuRightPanel, + AppMenuCodePanel, + AppMenuTabBarPosition, + AppMenuFocusNextPane, + AppMenuFocusPreviousPane, + AppMenuZoomPane, + AppMenuClearScrollback, + AppMenuEnterFullscreen, + AppMenuDocumentation, + AppMenuKeyboardShortcuts, + AppMenuJoinDiscord, + AppMenuReportIssue, + AppMenuRestartServer, + WindowUntitled, + TrayShowTty7, + TrayNotifications, + TrayAgentNeedsInput, + NotifyCommandFinished, + NotifyCommandFinishedWithCommand, + NotifyAgentFinished, + NotifyAgentWaiting, + NotifyTurnFinished, + TabTooltipMore, + TabTooltipShowSidebar, + TabTooltipHideSidebar, + TabTooltipHideDetailPanel, + TabTooltipShowDetailPanel, + TabUnnamedShell, + ShellDefault, + SidebarScratchGroup, + TabContextCloseTab, + TabContextCloseTabsBelow, + TabContextMarkUnread, + RemoteStripDisconnected, + RemoteStripConnecting, + RemoteStripReconnecting, + RemoteStripReconnectingAttempt, + RemoteStripPreempted, + RemoteStripFailed, + RemoteNoticePreempted, + RemoteNoticeDisconnected, + RemoteActionRetryNow, + RemoteActionTakeBack, + RemoteActionConnect, + RemoteActionRetry, + RemoteNoConnectionDetails, + RemoteThisComputer, + RemoteRestartTitle, + RemoteRestartBody, + RemoteReplaceBody, + RemoteRestartFailedTitle, + RemoteRestartFailedBody, + RemoteHostUnreachable, + RemoteInstallTitle, + RemoteInstallDetail, + RemoteInstallPathLabel, + RemoteInstallVersionLabel, + RemoteInstallSizeLabel, + RemoteInstallFromLabel, + RemoteInstallShaLabel, + RemoteInstallSilentUpgrades, + RemoteInstallBytes, + RemoteMismatchTitle, + RemoteMismatchDetail, + RemoteMismatchUnknownBuild, + RemoteMismatchUnknownBuildFromExe, + RemoteMismatchReplaceServer, + RemoteDaemonStartFailed, + RemoteDaemonUnreachable, + RemoteDaemonTooOld, + RemoteProfileMissing, + RemoteAliasMissing, + RemoteWslNoSsh, + RemoteLocalStdioNoSsh, + RemoteHostNotTty7, + RemoteWorkspaceListFailed, + RemoteServerRestartFailed, + RemoteNoRouteToHost, + RemoteMachineTreeUnexpectedReply, + RemoteMismatchVersionFromExe, + AppNoRunningCodingAgent, + SwitcherThisComputer, + SwitcherRestartingServer, + SwitcherDownloadingServerWithTotal, + SwitcherDownloadingServerNoTotal, + SwitcherCopyingServer, + SwitcherThisWindow, + SwitcherOpen, + SwitcherDisconnect, + SwitcherOpenInNewWindow, + SwitcherRename, + SshPromptPasswordFor, + SshPromptPassphraseFor, + SshPromptTwoFactor, + SshPromptUnknownHost, + SshPromptHostKeyChanged, + SshPromptHostKeyChangedBody, + SshPromptConnect, + SshPromptUnlock, + SshPromptSubmit, + HostOpsError, + CmdGroupTabsPanes, + CmdGroupWorkspaces, + CmdGroupView, + CmdGroupTerminal, + CmdGroupSsh, + CmdGroupAgents, + CmdGroupApplication, + CmdNewTab, + CmdNewWorktreeTab, + CmdNewWorktreeTabSubtitle, + CmdRenameTab, + CmdSplitRight, + CmdSplitDown, + CmdZoomPane, + CmdNextPane, + CmdPreviousPane, + CmdFocusPaneLeft, + CmdFocusPaneRight, + CmdFocusPaneUp, + CmdFocusPaneDown, + CmdResizePaneLeft, + CmdResizePaneRight, + CmdResizePaneUp, + CmdResizePaneDown, + CmdSwapPaneNext, + CmdSwapPanePrevious, + CmdNextTab, + CmdPreviousTab, + CmdCopyWorkingDirectory, + CmdCopySessionId, + CmdCopySessionIdSubtitle, + CmdForkSession, + CmdForkSessionSubtitle, + CmdMarkTabAsUnread, + CmdClosePaneTab, + CmdCloseOtherTabs, + CmdCloseTabsToTheRight, + CmdReopenClosedTab, + CmdNewWorkspace, + CmdSwitchWorkspace, + CmdRenameWorkspace, + CmdStopWorkspace, + CmdStopWorkspaceSubtitle, + CmdDeleteWorkspace, + CmdDeleteWorkspaceSubtitle, + CmdShowLeftSidebar, + CmdHideLeftSidebar, + CmdHideRightPanel, + CmdShowRightPanel, + CmdShowCodePanel, + CmdTabBarMoveToTop, + CmdTabBarMoveToLeftSidebar, + CmdRightPanelInfo, + CmdRightPanelChanges, + CmdRightPanelFiles, + CmdChangeTheme, + CmdResetFontSize, + CmdEnterFullScreen, + CmdClearScrollback, + CmdFindInTerminal, + CmdFindNext, + CmdFindPrevious, + CmdCopy, + CmdCut, + CmdPaste, + CmdSelectAll, + CmdSshAddConnection, + CmdSshManageProfiles, + CmdSshReconnect, + CmdSshRemoteFiles, + CmdSshPortForwarding, + CmdSshConnectWithInput, + CmdAgentSendSelection, + CmdAgentSendSelectionSubtitle, + CmdAgentSendGitDiffForReview, + CmdAgentSendGitDiffSubtitle, + CmdSettings, + CmdKeyboardShortcuts, + CmdAboutTty7, + CmdCheckForUpdates, + CmdDocumentation, + CmdJoinDiscord, + CmdReportIssue, + CmdRestartServer, + CmdRestartServerSubtitle, + CmdQuitTty7, + CmdQuitTty7Subtitle, + CmdQuickConnect, + CmdQuickConnectSaveProfile, + CmdRecent, + AppRestartServerTitle, + AppRestartServerMismatchDetail, + AppRestartServerOldDetail, + AppKeepShells, + AppRestart, + AppRestartServerNotSsh, + AppRestartServerBody, + AppWorktreeRemoveDetailDirty, + AppWorktreeRemoveDetailClean, + AppWorktreeRemoveTitle, + AppWorktreeDiscardAndRemove, + AppWorktreeRemove, + AppWorktreeKeep, + AppReopenTabFailed, + AppOpenTerminalFailed, + AppSshConnectionFailed, + AppSshReconnectFailed, + AppSplitPaneFailed, + AppWorktreeRemoved, + AppWorktreeRemoveFailed, + AppForkStillConnecting, + AppPaneNoCodingAgent, + AppForkNoCommand, + AppForkLocalOnly, + AppForkNoSessionId, + AppForkSessionIdNotToken, + AppForkMidTurn, + AppTabNoWorkingDirectory, + AppNothingSelected, + AppPaneNoKnownDirectory, + AppNoUncommittedChanges, + AppCmdSshProfileTitle, + AppCmdSwitchToTab, + AppPlaceholderDescription, + AppPlaceholderSshQuickConnect, + AppPlaceholderLoginShell, + AppPlaceholderNone, + AppPlaceholderOpenInDefaultApp, + AppThemeColorBackground, + AppThemeColorForeground, + AppThemeColorAccent, + AppThemeColorCursor, + AppThemeColorSelection, + AppAgentHooksThisComputer, + AppAgentHooksRemoteMachine, + AppAgentHooksNoHomeDir, + AppAgentHooksOffline, + AppAgentHooksHomeDirUnresolved, + AppAgentHooksOpFailed, + AppKeybindingDisplacedNote, + AppLocalServerName, + AppSshParseUnbalancedQuotes, + AppSshParseNoRemoteCommands, + AppSshParseFlagNeedsValue, + AppSshParseInvalidPort, + AppSshParseUnsupportedOption, + AppSshParseEnterHost, + AppSshParseBadHost, + AppMenuMinimize, + AppMenuZoom, + SwitcherStatusRestarting, + SwitcherStatusInstalling, + SwitcherStatusConnecting, + SwitcherStatusConnectFailed, + SwitcherStatusNotConnected, + SettingsFontDefault, + ForwardDescriptionPlaceholder, + SettingsShellDefaultLoginShell, + SftpErrorUnexpectedReply, + SftpErrorUnsafeRemoteName, + SftpErrorInvalidOctalMode, +} + +pub fn set_locale(gui_language: &str) { + let index = SUPPORTED_LANGUAGES + .iter() + .position(|lang| lang.code == gui_language) + .unwrap_or(0) as u8; + #[cfg(test)] + TEST_LOCALE.with(|slot| slot.set(Some(index))); + #[cfg(not(test))] + CURRENT.store(index, Ordering::Relaxed); +} + +pub fn t(key: L10nKey) -> &'static str { + translate(current_locale_index(), key) +} + +pub fn t_fmt(key: L10nKey, args: &[(&str, &str)]) -> String { + apply_template(t(key), args, None) +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PluralCategory { + Zero, + One, + Other, +} + +impl PluralCategory { + pub fn from_count(n: usize) -> Self { + match n { + 0 => Self::Zero, + 1 => Self::One, + _ => Self::Other, + } + } + + pub fn as_str(self) -> &'static str { + match self { + Self::Zero => "zero", + Self::One => "one", + Self::Other => "other", + } + } +} + +/// Select a plural-aware translation and fill placeholders. +/// The template may use `{count}`; it is always substituted first. +pub fn t_plural(key: L10nKey, count: usize, args: &[(&str, &str)]) -> String { + let branch = PluralCategory::from_count(count).as_str(); + apply_template( + translate_variant(current_locale_index(), key, branch), + args, + Some(count), + ) +} + +/// Select a named branch of a translation and fill placeholders. +pub fn t_select(key: L10nKey, branch: &'static str, args: &[(&str, &str)]) -> String { + apply_template( + translate_variant(current_locale_index(), key, branch), + args, + None, + ) +} + +fn apply_template(template: &'static str, args: &[(&str, &str)], count: Option) -> String { + let mut text = template.to_string(); + if let Some(n) = count { + text = text.replace("{count}", &n.to_string()); + } + for (name, value) in args { + text = text.replace(&format!("{{{name}}}"), value); + } + text +} + +fn current_locale_index() -> usize { + #[cfg(test)] + if let Some(idx) = TEST_LOCALE.with(|slot| slot.get()) { + return idx as usize; + } + CURRENT.load(Ordering::Relaxed) as usize +} + +fn translate(locale_idx: usize, key: L10nKey) -> &'static str { + if let Some(lang) = SUPPORTED_LANGUAGES.get(locale_idx) { + if let Some(text) = (lang.translate_fn)(key) { + return text; + } + } + translate_en(key) +} + +fn translate_variant(locale_idx: usize, key: L10nKey, branch: &'static str) -> &'static str { + if let Some(lang) = SUPPORTED_LANGUAGES.get(locale_idx) { + if let Some(text) = (lang.translate_variant_fn)(key, branch) { + return text; + } + } + translate_variant_en(key, branch).unwrap_or_else(|| translate(locale_idx, key)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn zh_translations_cover_the_initial_keys() { + for key in [ + L10nKey::SearchTabs, + L10nKey::SearchFiles, + L10nKey::SearchThemes, + L10nKey::SearchSettings, + L10nKey::FilterHosts, + L10nKey::SearchCommandsOrHost, + L10nKey::SearchTheme, + L10nKey::Search, + L10nKey::SearchWorkspacesAndMachines, + L10nKey::SearchFonts, + L10nKey::NewFolderName, + L10nKey::NewFileName, + L10nKey::HomeNewTab, + L10nKey::HomeReopenClosedTab, + L10nKey::HomeSwitchWorkspace, + L10nKey::HomeCommandPalette, + L10nKey::HomeSplitRight, + L10nKey::HomeSplitDown, + L10nKey::HomeSettings, + L10nKey::TrayQuitStopServer, + L10nKey::Reconnect, + L10nKey::None, + L10nKey::TryAgain, + L10nKey::Refreshing, + L10nKey::Binary, + L10nKey::Delete, + L10nKey::NoMatchingCommands, + L10nKey::ConnectSshHint, + L10nKey::EditHint, + L10nKey::OpenFileFromTree, + L10nKey::FileChangedOnDisk, + L10nKey::Reload, + L10nKey::KeepMine, + L10nKey::Dismiss, + L10nKey::StoredPasswordRejected, + L10nKey::Trust, + L10nKey::Abort, + L10nKey::HostKeyOverrideMessage, + L10nKey::Override, + L10nKey::RememberKeychain, + L10nKey::CloseWindowTitle, + L10nKey::CloseWindowBody, + L10nKey::Cancel, + L10nKey::Close, + L10nKey::QuitStopServerTitle, + L10nKey::QuitStopServerBody, + L10nKey::QuitAndStop, + L10nKey::CloseSshConnectionTitle, + L10nKey::CloseSshConnectionBody, + L10nKey::Keep, + L10nKey::SettingsNavAppearance, + L10nKey::SettingsNavTerminal, + L10nKey::SettingsNavInput, + L10nKey::SettingsNavSsh, + L10nKey::SettingsNavAgents, + L10nKey::SettingsNavWindowTabs, + L10nKey::SettingsNavKeybindings, + L10nKey::SettingsNavAbout, + L10nKey::SettingsHeader, + L10nKey::Reset, + L10nKey::Save, + L10nKey::Connect, + L10nKey::Download, + L10nKey::Link, + L10nKey::SettingsThemeIntroTitle, + L10nKey::SettingsThemeIntroDesc, + L10nKey::SettingsTypography, + L10nKey::SettingsFontSize, + L10nKey::SettingsFontSizeDesc, + L10nKey::SettingsLineHeight, + L10nKey::SettingsLineHeightDesc, + L10nKey::SettingsFontFamily, + L10nKey::SettingsFontFamilyDesc, + L10nKey::SettingsBoldFont, + L10nKey::SettingsBoldFontDesc, + L10nKey::SettingsItalicFont, + L10nKey::SettingsItalicFontDesc, + L10nKey::SettingsFontLigatures, + L10nKey::SettingsFontLigaturesDesc, + L10nKey::SettingsCursor, + L10nKey::SettingsCursorShape, + L10nKey::SettingsCursorShapeDesc, + L10nKey::SettingsCursorBlink, + L10nKey::SettingsCursorBlinkDesc, + L10nKey::SettingsTransparency, + L10nKey::SettingsOpacity, + L10nKey::SettingsOpacityDesc, + L10nKey::SettingsBlur, + L10nKey::SettingsBlurDesc, + L10nKey::FollowTheme, + L10nKey::SettingsDimInactivePanes, + L10nKey::SettingsDimInactivePanesDesc, + L10nKey::SettingsOpenThemesFolder, + L10nKey::SettingsChangeThemeImage, + L10nKey::SettingsChooseThemeImage, + L10nKey::SettingsRemoveThemeImage, + L10nKey::SettingsImageOpacity, + L10nKey::SettingsImageOpacityDesc, + L10nKey::SettingsEditTheme, + L10nKey::SettingsEditThemeIntro, + L10nKey::SettingsBackgroundImage, + L10nKey::SettingsBackgroundImageDesc, + L10nKey::SettingsAnsiColors, + L10nKey::SettingsCustomThemes, + L10nKey::SettingsCustomThemesIntro, + L10nKey::SettingsDuplicateToEdit, + L10nKey::SettingsHosts, + L10nKey::SettingsDefaults, + L10nKey::SettingsInheritedByEveryHost, + L10nKey::SettingsNoSavedHosts, + L10nKey::SettingsNothingMatches, + L10nKey::SettingsInTty7, + L10nKey::SettingsImportFromSshConfig, + L10nKey::SettingsExpandAllGroups, + L10nKey::SettingsNoHostsYet, + L10nKey::SettingsNothingSelected, + L10nKey::SettingsTypeAddressToConnect, + L10nKey::SettingsMoreInSshConfig, + L10nKey::SettingsAliasesLinked, + L10nKey::SettingsImportAliases, + L10nKey::SettingsImportAliasesDesc, + L10nKey::SettingsImportNow, + L10nKey::SettingsDefaultsIntro, + L10nKey::SettingsCopyAddress, + L10nKey::SettingsDuplicate, + L10nKey::SettingsForgetPassword, + L10nKey::SettingsForgotPasswordFor, + L10nKey::SettingsCouldntForgetPassword, + L10nKey::SettingsSecurity, + L10nKey::SettingsSecurityIntro, + L10nKey::SettingsVerifyHostKeys, + L10nKey::SettingsVerifyHostKeysDesc, + L10nKey::WarnBeforeClosing, + L10nKey::SettingsWarnBeforeClosingDesc, + L10nKey::SettingsNewHost, + L10nKey::SettingsName, + L10nKey::SettingsNameDesc, + L10nKey::SettingsHost, + L10nKey::SettingsHostDesc, + L10nKey::SettingsUser, + L10nKey::SettingsUserDesc, + L10nKey::SettingsAuth, + L10nKey::SettingsAuthDesc, + L10nKey::SettingsAuthModeAuto, + L10nKey::SettingsAuthModePassword, + L10nKey::SettingsAuthModeKey, + L10nKey::SettingsAuthModeAgent, + L10nKey::SettingsAuthMode2Fa, + L10nKey::SettingsJumpHost, + L10nKey::SettingsJumpHostDesc, + L10nKey::SettingsNoneSummary, + L10nKey::SettingsNoneLower, + L10nKey::SettingsPortForwarding, + L10nKey::SettingsRulesOpenedWithConnection, + L10nKey::SettingsAddRule, + L10nKey::SettingsFwdLegendLocal, + L10nKey::SettingsFwdLegendRemote, + L10nKey::SettingsFwdLegendDynamic, + L10nKey::SettingsFwdNeedsBoth, + L10nKey::SettingsFwdNeedsListen, + L10nKey::SettingsAdvanced, + L10nKey::SettingsAdvancedSummary, + L10nKey::SettingsIdentityFiles, + L10nKey::SettingsIdentityFilesDesc, + L10nKey::SettingsAgentForwarding, + L10nKey::SettingsAgentForwardingDesc, + L10nKey::SettingsProxyCommand, + L10nKey::SettingsProxyCommandDesc, + L10nKey::SettingsSocks5Proxy, + L10nKey::SettingsSocks5ProxyDesc, + L10nKey::SettingsHttpProxy, + L10nKey::SettingsHttpProxyDesc, + L10nKey::SettingsKexAlgorithms, + L10nKey::SettingsKexAlgorithmsDesc, + L10nKey::SettingsCiphers, + L10nKey::SettingsCiphersDesc, + L10nKey::SettingsMacs, + L10nKey::SettingsMacsDesc, + L10nKey::SettingsHostKeyAlgorithms, + L10nKey::SettingsHostKeyAlgorithmsDesc, + L10nKey::SettingsCompression, + L10nKey::SettingsJumpHostVia, + L10nKey::SettingsConnected, + L10nKey::SettingsProfileCopied, + L10nKey::SettingsCompressionDesc, + L10nKey::SettingsKeepaliveInterval, + L10nKey::SettingsKeepaliveIntervalDesc, + L10nKey::SettingsKeepaliveCountMax, + L10nKey::SettingsKeepaliveCountMaxDesc, + L10nKey::SettingsConnectTimeout, + L10nKey::SettingsConnectTimeoutDesc, + L10nKey::SettingsX11Forwarding, + L10nKey::SettingsX11ForwardingDesc, + L10nKey::SettingsShellIntegration, + L10nKey::SettingsShellIntegrationDesc, + L10nKey::SettingsLoginScripts, + L10nKey::SettingsLoginScriptsDesc, + L10nKey::SettingsSkipBanner, + L10nKey::SettingsSkipBannerDesc, + L10nKey::SettingsDefaultFollowsDefaults, + L10nKey::SettingsValueOn, + L10nKey::SettingsValueOff, + L10nKey::SettingsDefault, + L10nKey::SettingsOn, + L10nKey::SettingsOff, + L10nKey::SettingsShell, + L10nKey::SettingsShellIntro, + L10nKey::SettingsProgram, + L10nKey::SettingsProgramDesc, + L10nKey::SettingsArguments, + L10nKey::SettingsArgumentsDesc, + L10nKey::SettingsStartIn, + L10nKey::SettingsStartInDesc, + L10nKey::SettingsCustomPath, + L10nKey::SettingsCustomPathDesc, + L10nKey::SettingsWdInherit, + L10nKey::SettingsWdHome, + L10nKey::SettingsWdCustom, + L10nKey::SettingsShellFooter, + L10nKey::SettingsScrolling, + L10nKey::SettingsScrollback, + L10nKey::SettingsScrollbackDesc, + L10nKey::SettingsScrollSpeed, + L10nKey::SettingsScrollSpeedDesc, + L10nKey::SettingsMouse, + L10nKey::SettingsFocusFollowsMouseDesc, + L10nKey::SettingsHideMouseWhileTypingDesc, + L10nKey::SettingsReportMouseToAppsDesc, + L10nKey::SettingsBell, + L10nKey::SettingsTerminalBellDesc, + L10nKey::SettingsLinks, + L10nKey::SettingsDetectUrlsDesc, + L10nKey::SettingsForwardSshLoopbackLinksDesc, + L10nKey::SettingsOpenFilesWithDesc, + L10nKey::SettingsBellModeOff, + L10nKey::SettingsBellModeVisual, + L10nKey::SettingsBellModeAudible, + L10nKey::SettingsBellModeBoth, + L10nKey::SettingsPrompt, + L10nKey::SettingsPromptIntro, + L10nKey::SettingsTabCompletionDesc, + L10nKey::SettingsHistorySearchDesc, + L10nKey::SettingsSelectionClipboard, + L10nKey::SettingsSmartSelectionDesc, + L10nKey::SettingsCopyOnSelectDesc, + L10nKey::SettingsTrimTrailingSpacesDesc, + L10nKey::SettingsKeyboard, + L10nKey::SettingsOptionAsMetaDesc, + L10nKey::SettingsAgentsIntro, + L10nKey::SettingsAgentsIntroDesc, + L10nKey::SettingsReadingAgentConfig, + L10nKey::SettingsStatusNotInstalled, + L10nKey::SettingsStatusInstalled, + L10nKey::SettingsStatusOutdated, + L10nKey::SettingsInstall, + L10nKey::SettingsReinstall, + L10nKey::SettingsUpdate, + L10nKey::SettingsUninstall, + L10nKey::SettingsOfflineMachines, + L10nKey::SettingsSyncWithSystem, + L10nKey::SettingsSyncWithSystemDesc, + L10nKey::SettingsChangeTheme, + L10nKey::SettingsThemes, + L10nKey::SettingsThemePanelManual, + L10nKey::SettingsThemePanelLight, + L10nKey::SettingsThemePanelDark, + L10nKey::SettingsCustom, + L10nKey::SettingsBuiltIn, + L10nKey::SettingsDark, + L10nKey::SettingsLight, + L10nKey::SettingsActive, + L10nKey::SettingsStartupWindow, + L10nKey::SettingsStartupWindowDesc, + L10nKey::SettingsRememberWindowSize, + L10nKey::SettingsRememberWindowSizeDesc, + L10nKey::SettingsRestoreLastLayout, + L10nKey::SettingsRestoreLastLayoutDesc, + L10nKey::SettingsConfirmLastWindowClose, + L10nKey::SettingsConfirmLastWindowCloseDesc, + L10nKey::SettingsShowTrayIcon, + L10nKey::SettingsShowTrayIconDesc, + L10nKey::SettingsTabs, + L10nKey::SettingsNewTabPosition, + L10nKey::SettingsNewTabPositionDesc, + L10nKey::SettingsTabBarPosition, + L10nKey::SettingsTabBarPositionDesc, + L10nKey::SettingsSidebarGrouping, + L10nKey::SettingsSidebarGroupingDesc, + L10nKey::SettingsDiffPreviewFromCounts, + L10nKey::SettingsDiffPreviewFromCountsDesc, + L10nKey::SettingsNotifications, + L10nKey::SettingsNotifyOnCommandFinish, + L10nKey::SettingsNotifyOnCommandFinishDesc, + L10nKey::SettingsNotifyThreshold, + L10nKey::SettingsNotifyThresholdDesc, + L10nKey::NotifyModeNever, + L10nKey::NotifyModeUnfocused, + L10nKey::NotifyModeAlways, + L10nKey::SettingsStartupNormal, + L10nKey::SettingsStartupMaximized, + L10nKey::SettingsStartupFullscreen, + L10nKey::SettingsAfterCurrent, + L10nKey::SettingsAtEnd, + L10nKey::SettingsTop, + L10nKey::SettingsLeft, + L10nKey::SettingsByRepo, + L10nKey::SettingsFlat, + L10nKey::SettingsPreset, + L10nKey::SettingsPresetDesc, + L10nKey::SettingsPrefix, + L10nKey::SettingsPressKeys, + L10nKey::SettingsPauseToSaveEsc, + L10nKey::SettingsKeybindingsIntroDesc, + L10nKey::SettingsPrefixNote, + L10nKey::SettingsRestoreAllDefaults, + L10nKey::SettingsAboutDesc1, + L10nKey::SettingsAboutTech, + L10nKey::SettingsUpdates, + L10nKey::SettingsUpdateAndRelaunch, + L10nKey::SettingsUpdateViewRelease, + L10nKey::SettingsUpdateChecking, + L10nKey::SettingsUpdateUpToDate, + L10nKey::SettingsUpdateDownloading, + L10nKey::SettingsUpdateInstalling, + L10nKey::SettingsUpdateCheckNow, + L10nKey::SettingsUpdateCheckFailed, + L10nKey::SettingsUpdatePrepareFailed, + L10nKey::SettingsUpdateLaunchFailed, + L10nKey::SettingsUpdateUnsupportedMacos, + L10nKey::SettingsUpdateUnsupportedLinux, + L10nKey::SettingsUpdateUnsupportedWindows, + L10nKey::SettingsUpdateWindowsAllUsers, + L10nKey::SettingsUpdateUnsupportedPlatform, + L10nKey::SettingsUpdateMissingPackage, + L10nKey::SettingsUpdateMissingChecksums, + L10nKey::SettingsVersionAvailable, + L10nKey::SettingsCheckUpdatesDesc, + L10nKey::SettingsCheckUpdatesOnLaunch, + L10nKey::SettingsCommandLine, + L10nKey::SettingsCommandLineDesc, + L10nKey::SettingsInstallCliOnPath, + L10nKey::SettingsServer, + L10nKey::SettingsServerDesc, + L10nKey::SettingsRestartServer, + L10nKey::SettingsAppHttpProxy, + L10nKey::SettingsAppHttpProxyDesc, + L10nKey::SettingsAppHttpProxyInvalid, + L10nKey::SettingsAgentClaudeCode, + L10nKey::SettingsAgentCodex, + L10nKey::SettingsAgentCopilotCli, + L10nKey::SettingsAgentOpencode, + L10nKey::SettingsAgentPi, + L10nKey::SettingsAgentGrokBuild, + L10nKey::SettingsSearchAboutKeywords, + L10nKey::SettingsSearchAppHttpProxyKeywords, + L10nKey::SettingsSearchAnsiColorsKeywords, + L10nKey::SettingsSearchArgumentsKeywords, + L10nKey::SettingsSearchBlurKeywords, + L10nKey::SettingsSearchBoldFontKeywords, + L10nKey::SettingsSearchClaudeCodeKeywords, + L10nKey::SettingsSearchCodexKeywords, + L10nKey::SettingsSearchCommandLineToolKeywords, + L10nKey::SettingsSearchCommandLineToolTitle, + L10nKey::SettingsSearchConfirmLastWindowCloseKeywords, + L10nKey::SettingsSearchCopilotCliKeywords, + L10nKey::SettingsSearchCopyOnSelectKeywords, + L10nKey::SettingsSearchCursorBlinkKeywords, + L10nKey::SettingsSearchCursorShapeKeywords, + L10nKey::SettingsSearchCustomThemesKeywords, + L10nKey::SettingsSearchDetectUrlsKeywords, + L10nKey::SettingsSearchDiffPreviewFromCountsKeywords, + L10nKey::SettingsSearchDimInactivePanesKeywords, + L10nKey::SettingsSearchFocusFollowsMouseKeywords, + L10nKey::SettingsSearchFontFamilyKeywords, + L10nKey::SettingsSearchFontLigaturesKeywords, + L10nKey::SettingsSearchFontSizeKeywords, + L10nKey::SettingsSearchForwardSshLoopbackLinksKeywords, + L10nKey::SettingsSearchGrokBuildKeywords, + L10nKey::SettingsSearchHideMouseWhileTypingKeywords, + L10nKey::SettingsSearchHistorySearchKeywords, + L10nKey::SettingsSearchHostsKeywords, + L10nKey::SettingsSearchHowShellsWorkKeywords, + L10nKey::SettingsSearchHowShellsWorkTitle, + L10nKey::SettingsSearchItalicFontKeywords, + L10nKey::SettingsSearchKeybindingsKeywords, + L10nKey::SettingsSearchKeybindingsTitle, + L10nKey::SettingsSearchLineHeightKeywords, + L10nKey::SettingsSearchNewTabPositionKeywords, + L10nKey::SettingsSearchNotifyOnCommandFinishKeywords, + L10nKey::SettingsSearchNotifyThresholdKeywords, + L10nKey::SettingsSearchOpacityKeywords, + L10nKey::SettingsSearchOpenFilesWithKeywords, + L10nKey::SettingsSearchOpencodeKeywords, + L10nKey::SettingsSearchOptionAsMetaKeywords, + L10nKey::SettingsSearchPiKeywords, + L10nKey::SettingsSearchPortForwardingKeywords, + L10nKey::SettingsSearchProgramKeywords, + L10nKey::SettingsSearchRememberWindowSizeKeywords, + L10nKey::SettingsSearchReportMouseToAppsKeywords, + L10nKey::SettingsSearchRestoreLastLayoutKeywords, + L10nKey::SettingsSearchScrollSpeedKeywords, + L10nKey::SettingsSearchScrollbackKeywords, + L10nKey::SettingsSearchShowTrayIconKeywords, + L10nKey::SettingsSearchSidebarGroupingKeywords, + L10nKey::SettingsSearchSmartSelectionKeywords, + L10nKey::SettingsSearchStartInKeywords, + L10nKey::SettingsSearchSyncWithSystemKeywords, + L10nKey::SettingsSearchTabBarPositionKeywords, + L10nKey::SettingsSearchTabCompletionKeywords, + L10nKey::SettingsSearchTerminalBellKeywords, + L10nKey::SettingsSearchThemeKeywords, + L10nKey::SettingsSearchTrimTrailingSpacesKeywords, + L10nKey::SettingsSearchVerifyHostKeysKeywords, + L10nKey::SettingsSearchWarnBeforeClosingKeywords, + L10nKey::SettingsSearchStartupWindowKeywords, + L10nKey::SwitcherNoMatch, + L10nKey::AddSshHost, + L10nKey::ClickForNewWindow, + L10nKey::RestartServer, + L10nKey::OtherMachines, + L10nKey::Ok, + L10nKey::SftpNoTransfers, + L10nKey::SftpPanelTitleFiles, + L10nKey::SftpTooltipRefresh, + L10nKey::SftpTooltipMore, + L10nKey::SftpMenuNewFolder, + L10nKey::SftpMenuNewFile, + L10nKey::SftpMenuUpload, + L10nKey::SftpMenuGotoShellCwd, + L10nKey::SftpMenuHideTransferHistory, + L10nKey::SftpMenuTransferHistory, + L10nKey::SftpEditNewFolder, + L10nKey::SftpEditNewFile, + L10nKey::SftpEditRename, + L10nKey::SftpEditPermissions, + L10nKey::SftpLoading, + L10nKey::SftpEmptyDirectory, + L10nKey::SftpContextOpen, + L10nKey::SftpContextFollowSymlink, + L10nKey::SftpContextRename, + L10nKey::SftpContextChmod, + L10nKey::SftpTransferSummaryRunning, + L10nKey::SftpTransferSummaryFailed, + L10nKey::SftpTransferSummaryIdle, + L10nKey::SftpTransferProgress, + L10nKey::SftpTransferDone, + L10nKey::SftpTransferCancelled, + L10nKey::SftpTransferError, + L10nKey::SftpImagePasteUploadFailed, + L10nKey::ForwardPanelTitle, + L10nKey::ForwardDisconnected, + L10nKey::ForwardDisconnectedFrom, + L10nKey::ForwardTooltipAdd, + L10nKey::ForwardTooltipRemove, + L10nKey::ForwardLocal, + L10nKey::ForwardRemote, + L10nKey::ForwardDynamic, + L10nKey::ForwardBindLabel, + L10nKey::ForwardToLabel, + L10nKey::ForwardSocksLabel, + L10nKey::ForwardAdd, + L10nKey::FileTreePlaceholderFileName, + L10nKey::FileTreePlaceholderFolderName, + L10nKey::FileTreePlaceholderNewName, + L10nKey::FileTreeDeleteTitle, + L10nKey::FileTreeDeleteFolderBody, + L10nKey::FileTreeDeleteFileBody, + L10nKey::FileTreeDeleteFailed, + L10nKey::FileTreeContextOpen, + L10nKey::FileTreeContextCdHere, + L10nKey::FileTreeContextInsertPath, + L10nKey::FileTreeContextAttachAgent, + L10nKey::FileTreeContextNewFile, + L10nKey::FileTreeContextNewFolder, + L10nKey::FileTreeContextRename, + L10nKey::FileTreeContextCopyPath, + L10nKey::FileTreeContextHideDotfiles, + L10nKey::FileTreeContextShowDotfiles, + L10nKey::SshPromptNewKey, + L10nKey::SshPromptOldKey, + L10nKey::EditorCantOpen, + L10nKey::EditorCantRead, + L10nKey::EditorNotUtf8, + L10nKey::EditorSaveFailed, + L10nKey::EditorUnsavedChanges, + L10nKey::EditorDiscard, + L10nKey::EditorNoFileOpen, + L10nKey::EditorBackToTerminal, + L10nKey::EditorLnCol, + L10nKey::EditorEdit, + L10nKey::EditorPreview, + L10nKey::EditorWrapOn, + L10nKey::EditorWrapOff, + L10nKey::EditorFileTooLarge, + L10nKey::EditorBinaryFile, + L10nKey::PanelInfoTitle, + L10nKey::PanelChangesTitle, + L10nKey::PanelFilesTitle, + L10nKey::PanelNoSession, + L10nKey::PanelNoSessionHint, + L10nKey::PanelNoWorkingDirectory, + L10nKey::PanelNoWorkingDirectoryHint, + L10nKey::PanelLoading, + L10nKey::PanelNotAGitRepo, + L10nKey::PanelNotAGitRepoHint, + L10nKey::PanelNoChanges, + L10nKey::PanelNoChangesHint, + L10nKey::PanelMoreChangedFiles, + L10nKey::PanelUntracked, + L10nKey::PanelSessionSubtitle, + L10nKey::PanelProcessesSubtitle, + L10nKey::PanelPortsSubtitle, + L10nKey::PanelCwd, + L10nKey::PanelShell, + L10nKey::PanelSsh, + L10nKey::PanelBranch, + L10nKey::PanelChangesRow, + L10nKey::PanelAgent, + L10nKey::PanelAgentIdle, + L10nKey::PanelAgentWorking, + L10nKey::PanelAgentWaiting, + L10nKey::PanelAgentDone, + L10nKey::PanelRevealInFinder, + L10nKey::PanelOpenFolder, + L10nKey::WindowStop, + L10nKey::WindowDelete, + L10nKey::WindowThisWorkspace, + L10nKey::WindowConfirmTitle, + L10nKey::WindowStopUnreachable, + L10nKey::WindowDeleteUnreachable, + L10nKey::WindowStopShells, + L10nKey::WindowDeleteShells, + L10nKey::DiffReading, + L10nKey::DiffNotARepo, + L10nKey::DiffReadFailed, + L10nKey::DiffWorkingTreeClean, + L10nKey::DiffCloseTooltip, + L10nKey::DiffChangedFiles, + L10nKey::DiffUntrackedCount, + L10nKey::DiffMoreFiles, + L10nKey::DiffOversizedNotice, + L10nKey::DiffTruncatedPerFile, + L10nKey::DiffTruncatedBudget, + L10nKey::DiffUntrackedHeader, + L10nKey::DiffMoreUntracked, + L10nKey::DiffLines, + L10nKey::DiffChangedLines, + L10nKey::DiffBudgetAndCap, + L10nKey::DiffBudget, + L10nKey::DiffPerFileCap, + L10nKey::DiffUntrackedSummary, + L10nKey::PendingConnecting, + L10nKey::PendingUnreachable, + L10nKey::WorktreePromptNeedsName, + L10nKey::WorktreePromptTitle, + L10nKey::WorktreePromptName, + L10nKey::WorktreePromptBranch, + L10nKey::WorktreePromptBase, + L10nKey::WorktreePromptCreating, + L10nKey::WorktreePromptCreate, + L10nKey::AppNewWorktreeFailed, + L10nKey::HomeTimeJustNow, + L10nKey::HomeTimeMinutesAgo, + L10nKey::HomeTimeHourAgo, + L10nKey::HomeTimeHoursAgo, + L10nKey::HomeTimeYesterday, + L10nKey::HomeTimeDaysAgo, + L10nKey::HomeTimeOverWeekAgo, + L10nKey::HomeReopenNamed, + L10nKey::AppMenuAbout, + L10nKey::AppMenuCheckForUpdates, + L10nKey::AppMenuSettings, + L10nKey::AppMenuServices, + L10nKey::AppMenuHideApp, + L10nKey::AppMenuHideOthers, + L10nKey::AppMenuShowAll, + L10nKey::AppMenuQuit, + L10nKey::AppMenuFile, + L10nKey::AppMenuEdit, + L10nKey::AppMenuView, + L10nKey::AppMenuWindow, + L10nKey::AppMenuHelp, + L10nKey::AppMenuNewTab, + L10nKey::AppMenuNewWorkspace, + L10nKey::AppMenuNewWorktreeTab, + L10nKey::AppMenuSplitRight, + L10nKey::AppMenuSplitDown, + L10nKey::AppMenuRenameTab, + L10nKey::AppMenuCopyWorkingDirectory, + L10nKey::AppMenuCopySessionId, + L10nKey::AppMenuForkSession, + L10nKey::AppMenuClosePaneTab, + L10nKey::AppMenuCloseOtherTabs, + L10nKey::AppMenuCloseTabsRight, + L10nKey::AppMenuReopenClosedTab, + L10nKey::AppMenuRenameWorkspace, + L10nKey::AppMenuStopWorkspace, + L10nKey::AppMenuDeleteWorkspace, + L10nKey::AppMenuUndo, + L10nKey::AppMenuRedo, + L10nKey::AppMenuCut, + L10nKey::AppMenuCopy, + L10nKey::AppMenuPaste, + L10nKey::AppMenuSelectAll, + L10nKey::AppMenuFind, + L10nKey::AppMenuFindNext, + L10nKey::AppMenuFindPrevious, + L10nKey::AppMenuCommandPalette, + L10nKey::AppMenuIncreaseFontSize, + L10nKey::AppMenuDecreaseFontSize, + L10nKey::AppMenuResetFontSize, + L10nKey::AppMenuLeftSidebar, + L10nKey::AppMenuRightPanel, + L10nKey::AppMenuCodePanel, + L10nKey::AppMenuTabBarPosition, + L10nKey::AppMenuFocusNextPane, + L10nKey::AppMenuFocusPreviousPane, + L10nKey::AppMenuZoomPane, + L10nKey::AppMenuClearScrollback, + L10nKey::AppMenuEnterFullscreen, + L10nKey::AppMenuDocumentation, + L10nKey::AppMenuKeyboardShortcuts, + L10nKey::AppMenuJoinDiscord, + L10nKey::AppMenuReportIssue, + L10nKey::AppMenuRestartServer, + L10nKey::WindowUntitled, + L10nKey::TrayShowTty7, + L10nKey::TrayNotifications, + L10nKey::TrayAgentNeedsInput, + L10nKey::NotifyCommandFinished, + L10nKey::NotifyCommandFinishedWithCommand, + L10nKey::NotifyAgentFinished, + L10nKey::NotifyAgentWaiting, + L10nKey::NotifyTurnFinished, + L10nKey::TabTooltipMore, + L10nKey::TabTooltipShowSidebar, + L10nKey::TabTooltipHideSidebar, + L10nKey::TabTooltipHideDetailPanel, + L10nKey::TabTooltipShowDetailPanel, + L10nKey::TabUnnamedShell, + L10nKey::ShellDefault, + L10nKey::SidebarScratchGroup, + L10nKey::TabContextCloseTab, + L10nKey::TabContextCloseTabsBelow, + L10nKey::TabContextMarkUnread, + L10nKey::RemoteStripDisconnected, + L10nKey::RemoteStripConnecting, + L10nKey::RemoteStripReconnecting, + L10nKey::RemoteStripReconnectingAttempt, + L10nKey::RemoteStripPreempted, + L10nKey::RemoteStripFailed, + L10nKey::RemoteNoticePreempted, + L10nKey::RemoteNoticeDisconnected, + L10nKey::RemoteActionRetryNow, + L10nKey::RemoteActionTakeBack, + L10nKey::RemoteActionConnect, + L10nKey::RemoteActionRetry, + L10nKey::RemoteNoConnectionDetails, + L10nKey::RemoteThisComputer, + L10nKey::RemoteRestartTitle, + L10nKey::RemoteRestartBody, + L10nKey::RemoteReplaceBody, + L10nKey::RemoteRestartFailedTitle, + L10nKey::RemoteRestartFailedBody, + L10nKey::RemoteHostUnreachable, + L10nKey::RemoteInstallTitle, + L10nKey::RemoteInstallDetail, + L10nKey::RemoteInstallPathLabel, + L10nKey::RemoteInstallVersionLabel, + L10nKey::RemoteInstallSizeLabel, + L10nKey::RemoteInstallFromLabel, + L10nKey::RemoteInstallShaLabel, + L10nKey::RemoteInstallSilentUpgrades, + L10nKey::RemoteInstallBytes, + L10nKey::RemoteMismatchTitle, + L10nKey::RemoteMismatchDetail, + L10nKey::RemoteMismatchUnknownBuild, + L10nKey::RemoteMismatchUnknownBuildFromExe, + L10nKey::RemoteMismatchReplaceServer, + L10nKey::RemoteDaemonStartFailed, + L10nKey::RemoteDaemonUnreachable, + L10nKey::RemoteDaemonTooOld, + L10nKey::RemoteProfileMissing, + L10nKey::RemoteAliasMissing, + L10nKey::RemoteWslNoSsh, + L10nKey::RemoteLocalStdioNoSsh, + L10nKey::RemoteHostNotTty7, + L10nKey::RemoteWorkspaceListFailed, + L10nKey::RemoteServerRestartFailed, + L10nKey::RemoteNoRouteToHost, + L10nKey::RemoteMachineTreeUnexpectedReply, + L10nKey::RemoteMismatchVersionFromExe, + L10nKey::AppNoRunningCodingAgent, + L10nKey::SwitcherThisComputer, + L10nKey::SwitcherRestartingServer, + L10nKey::SwitcherDownloadingServerWithTotal, + L10nKey::SwitcherDownloadingServerNoTotal, + L10nKey::SwitcherCopyingServer, + L10nKey::SwitcherThisWindow, + L10nKey::SwitcherOpen, + L10nKey::SwitcherDisconnect, + L10nKey::SwitcherOpenInNewWindow, + L10nKey::SwitcherRename, + L10nKey::SshPromptPasswordFor, + L10nKey::SshPromptPassphraseFor, + L10nKey::SshPromptTwoFactor, + L10nKey::SshPromptUnknownHost, + L10nKey::SshPromptHostKeyChanged, + L10nKey::SshPromptHostKeyChangedBody, + L10nKey::SshPromptConnect, + L10nKey::SshPromptUnlock, + L10nKey::SshPromptSubmit, + L10nKey::HostOpsError, + L10nKey::CmdGroupTabsPanes, + L10nKey::CmdGroupWorkspaces, + L10nKey::CmdGroupView, + L10nKey::CmdGroupTerminal, + L10nKey::CmdGroupSsh, + L10nKey::CmdGroupAgents, + L10nKey::CmdGroupApplication, + L10nKey::CmdNewTab, + L10nKey::CmdNewWorktreeTab, + L10nKey::CmdNewWorktreeTabSubtitle, + L10nKey::CmdRenameTab, + L10nKey::CmdSplitRight, + L10nKey::CmdSplitDown, + L10nKey::CmdZoomPane, + L10nKey::CmdNextPane, + L10nKey::CmdPreviousPane, + L10nKey::CmdFocusPaneLeft, + L10nKey::CmdFocusPaneRight, + L10nKey::CmdFocusPaneUp, + L10nKey::CmdFocusPaneDown, + L10nKey::CmdResizePaneLeft, + L10nKey::CmdResizePaneRight, + L10nKey::CmdResizePaneUp, + L10nKey::CmdResizePaneDown, + L10nKey::CmdSwapPaneNext, + L10nKey::CmdSwapPanePrevious, + L10nKey::CmdNextTab, + L10nKey::CmdPreviousTab, + L10nKey::CmdCopyWorkingDirectory, + L10nKey::CmdCopySessionId, + L10nKey::CmdCopySessionIdSubtitle, + L10nKey::CmdForkSession, + L10nKey::CmdForkSessionSubtitle, + L10nKey::CmdMarkTabAsUnread, + L10nKey::CmdClosePaneTab, + L10nKey::CmdCloseOtherTabs, + L10nKey::CmdCloseTabsToTheRight, + L10nKey::CmdReopenClosedTab, + L10nKey::CmdNewWorkspace, + L10nKey::CmdSwitchWorkspace, + L10nKey::CmdRenameWorkspace, + L10nKey::CmdStopWorkspace, + L10nKey::CmdStopWorkspaceSubtitle, + L10nKey::CmdDeleteWorkspace, + L10nKey::CmdDeleteWorkspaceSubtitle, + L10nKey::CmdShowLeftSidebar, + L10nKey::CmdHideLeftSidebar, + L10nKey::CmdHideRightPanel, + L10nKey::CmdShowRightPanel, + L10nKey::CmdShowCodePanel, + L10nKey::CmdTabBarMoveToTop, + L10nKey::CmdTabBarMoveToLeftSidebar, + L10nKey::CmdRightPanelInfo, + L10nKey::CmdRightPanelChanges, + L10nKey::CmdRightPanelFiles, + L10nKey::CmdChangeTheme, + L10nKey::CmdResetFontSize, + L10nKey::CmdEnterFullScreen, + L10nKey::CmdClearScrollback, + L10nKey::CmdFindInTerminal, + L10nKey::CmdFindNext, + L10nKey::CmdFindPrevious, + L10nKey::CmdCopy, + L10nKey::CmdCut, + L10nKey::CmdPaste, + L10nKey::CmdSelectAll, + L10nKey::CmdSshAddConnection, + L10nKey::CmdSshManageProfiles, + L10nKey::CmdSshReconnect, + L10nKey::CmdSshRemoteFiles, + L10nKey::CmdSshPortForwarding, + L10nKey::CmdSshConnectWithInput, + L10nKey::CmdAgentSendSelection, + L10nKey::CmdAgentSendSelectionSubtitle, + L10nKey::CmdAgentSendGitDiffForReview, + L10nKey::CmdAgentSendGitDiffSubtitle, + L10nKey::CmdSettings, + L10nKey::CmdKeyboardShortcuts, + L10nKey::CmdAboutTty7, + L10nKey::CmdCheckForUpdates, + L10nKey::CmdDocumentation, + L10nKey::CmdJoinDiscord, + L10nKey::CmdReportIssue, + L10nKey::CmdRestartServer, + L10nKey::CmdRestartServerSubtitle, + L10nKey::CmdQuitTty7, + L10nKey::CmdQuitTty7Subtitle, + L10nKey::CmdQuickConnect, + L10nKey::CmdQuickConnectSaveProfile, + L10nKey::CmdRecent, + L10nKey::AppRestartServerTitle, + L10nKey::AppRestartServerMismatchDetail, + L10nKey::AppRestartServerOldDetail, + L10nKey::AppKeepShells, + L10nKey::AppRestart, + L10nKey::AppRestartServerNotSsh, + L10nKey::AppRestartServerBody, + L10nKey::AppWorktreeRemoveDetailDirty, + L10nKey::AppWorktreeRemoveDetailClean, + L10nKey::AppWorktreeRemoveTitle, + L10nKey::AppWorktreeDiscardAndRemove, + L10nKey::AppWorktreeRemove, + L10nKey::AppWorktreeKeep, + L10nKey::AppReopenTabFailed, + L10nKey::AppOpenTerminalFailed, + L10nKey::AppSshConnectionFailed, + L10nKey::AppSshReconnectFailed, + L10nKey::AppSplitPaneFailed, + L10nKey::AppWorktreeRemoved, + L10nKey::AppWorktreeRemoveFailed, + L10nKey::AppForkStillConnecting, + L10nKey::AppPaneNoCodingAgent, + L10nKey::AppForkNoCommand, + L10nKey::AppForkLocalOnly, + L10nKey::AppForkNoSessionId, + L10nKey::AppForkSessionIdNotToken, + L10nKey::AppForkMidTurn, + L10nKey::AppTabNoWorkingDirectory, + L10nKey::AppNothingSelected, + L10nKey::AppPaneNoKnownDirectory, + L10nKey::AppNoUncommittedChanges, + L10nKey::AppCmdSshProfileTitle, + L10nKey::AppCmdSwitchToTab, + L10nKey::AppPlaceholderDescription, + L10nKey::AppPlaceholderSshQuickConnect, + L10nKey::AppPlaceholderLoginShell, + L10nKey::AppPlaceholderNone, + L10nKey::AppPlaceholderOpenInDefaultApp, + L10nKey::AppThemeColorBackground, + L10nKey::AppThemeColorForeground, + L10nKey::AppThemeColorAccent, + L10nKey::AppThemeColorCursor, + L10nKey::AppThemeColorSelection, + L10nKey::AppAgentHooksThisComputer, + L10nKey::AppAgentHooksRemoteMachine, + L10nKey::AppAgentHooksNoHomeDir, + L10nKey::AppAgentHooksOffline, + L10nKey::AppAgentHooksHomeDirUnresolved, + L10nKey::AppAgentHooksOpFailed, + L10nKey::AppKeybindingDisplacedNote, + L10nKey::AppLocalServerName, + L10nKey::AppSshParseUnbalancedQuotes, + L10nKey::AppSshParseNoRemoteCommands, + L10nKey::AppSshParseFlagNeedsValue, + L10nKey::AppSshParseInvalidPort, + L10nKey::AppSshParseUnsupportedOption, + L10nKey::AppSshParseEnterHost, + L10nKey::AppSshParseBadHost, + L10nKey::AppMenuMinimize, + L10nKey::AppMenuZoom, + L10nKey::SwitcherStatusRestarting, + L10nKey::SwitcherStatusInstalling, + L10nKey::SwitcherStatusConnecting, + L10nKey::SwitcherStatusConnectFailed, + L10nKey::SwitcherStatusNotConnected, + L10nKey::SettingsLanguage, + L10nKey::SettingsLanguageDesc, + L10nKey::SettingsLanguageEnglish, + L10nKey::SettingsLanguageChinese, + L10nKey::SettingsLanguageJapanese, + L10nKey::SettingsSearchLanguageKeywords, + L10nKey::SettingsFontDefault, + L10nKey::ForwardDescriptionPlaceholder, + L10nKey::SettingsShellDefaultLoginShell, + L10nKey::SftpErrorUnexpectedReply, + L10nKey::SftpErrorUnsafeRemoteName, + L10nKey::SftpErrorInvalidOctalMode, + ] { + assert!( + translate_zh(key).is_some_and(|text| !text.is_empty()), + "missing zh translation for {key:?}" + ); + assert!( + translate_ja(key).is_some_and(|text| !text.is_empty()), + "missing ja translation for {key:?}" + ); + assert!( + !translate_en(key).is_empty(), + "missing en translation for {key:?}" + ); + } + } + + #[test] + fn explicit_languages_select_the_right_locale() { + set_locale("zh-CN"); + assert_eq!(current_locale_index(), 1); + set_locale("ja-JP"); + assert_eq!(current_locale_index(), 2); + set_locale("en"); + assert_eq!(current_locale_index(), 0); + set_locale("ko"); + assert_eq!(current_locale_index(), 0); + } + + #[test] + fn plural_and_select_branches_are_translated() { + let plural_keys = [ + L10nKey::SettingsAliasesLinked, + L10nKey::SettingsRulesOpenedWithConnection, + L10nKey::SettingsOfflineMachines, + L10nKey::PanelUntracked, + L10nKey::PanelMoreChangedFiles, + L10nKey::WindowStopShells, + L10nKey::WindowDeleteShells, + L10nKey::DiffChangedFiles, + L10nKey::DiffUntrackedCount, + L10nKey::DiffMoreFiles, + L10nKey::DiffUntrackedHeader, + L10nKey::DiffMoreUntracked, + L10nKey::DiffUntrackedSummary, + L10nKey::HomeTimeMinutesAgo, + L10nKey::HomeTimeHoursAgo, + L10nKey::HomeTimeDaysAgo, + ]; + for key in plural_keys { + for branch in ["zero", "one", "other"] { + assert!( + !translate_variant(0, key, branch).is_empty(), + "missing en plural/select branch {branch:?} for {key:?}" + ); + assert!( + !translate_variant(1, key, branch).is_empty(), + "missing zh plural/select branch {branch:?} for {key:?}" + ); + assert!( + !translate_variant(2, key, branch).is_empty(), + "missing ja plural/select branch {branch:?} for {key:?}" + ); + // Not every key spells out a "zero" branch; the ones that do + // must spell it out in every language rather than lean on the + // English fallback. + if translate_variant_en(key, branch).is_some() { + assert!( + translate_variant_zh(key, branch).is_some(), + "zh is missing plural/select branch {branch:?} for {key:?}" + ); + assert!( + translate_variant_ja(key, branch).is_some(), + "ja is missing plural/select branch {branch:?} for {key:?}" + ); + } + } + // Smoke-check t_plural does not produce empty strings. + assert!(!t_plural(key, 0, &[]).is_empty()); + assert!(!t_plural(key, 1, &[]).is_empty()); + assert!(!t_plural(key, 5, &[]).is_empty()); + } + } +} diff --git a/src/ui/i18n/zh.rs b/src/ui/i18n/zh.rs new file mode 100644 index 00000000..f646f8fd --- /dev/null +++ b/src/ui/i18n/zh.rs @@ -0,0 +1,1241 @@ +use super::L10nKey; + +pub fn translate_zh(key: L10nKey) -> Option<&'static str> { + Some(match key { + L10nKey::SearchTabs => "搜索标签页…", + L10nKey::SearchFiles => "搜索文件…", + L10nKey::SearchThemes => "搜索主题…", + L10nKey::SearchSettings => "搜索设置…", + L10nKey::FilterHosts => "筛选主机…", + L10nKey::SearchCommandsOrHost => "搜索或输入 user@host 连接…", + L10nKey::SearchTheme => "搜索…", + L10nKey::Search => "搜索", + L10nKey::SearchWorkspacesAndMachines => "搜索工作区与机器", + L10nKey::SearchFonts => "搜索字体…", + L10nKey::NewFolderName => "新文件夹名", + L10nKey::NewFileName => "新文件名", + L10nKey::HomeNewTab => "新标签页", + L10nKey::HomeReopenClosedTab => "重新打开已关闭的标签页", + L10nKey::HomeSwitchWorkspace => "切换工作区", + L10nKey::HomeCommandPalette => "命令面板", + L10nKey::HomeSplitRight => "向右分屏", + L10nKey::HomeSplitDown => "向下分屏", + L10nKey::HomeSettings => "设置…", + L10nKey::TrayQuitStopServer => "退出并停止服务器…", + L10nKey::Reconnect => "重新连接", + L10nKey::None => "无。", + L10nKey::TryAgain => "重试", + L10nKey::Refreshing => "正在刷新…", + L10nKey::Binary => "二进制文件", + L10nKey::Delete => "删除", + L10nKey::NoMatchingCommands => "没有匹配的命令", + L10nKey::ConnectSshHint => "输入 user@host 改为通过 SSH 连接。", + L10nKey::EditHint => "→ 编辑", + L10nKey::OpenFileFromTree => "从文件树打开文件", + L10nKey::FileChangedOnDisk => "文件在磁盘上已被修改", + L10nKey::Reload => "重新加载", + L10nKey::KeepMine => "保留我的版本", + L10nKey::Dismiss => "关闭", + L10nKey::StoredPasswordRejected => "已存储的密码被拒绝,请输入新密码。", + L10nKey::Trust => "信任", + L10nKey::Abort => "中止", + L10nKey::HostKeyOverrideMessage => "输入 yes 覆盖并信任新密钥,或按 Esc 中止。", + L10nKey::Override => "覆盖", + L10nKey::RememberKeychain => "记住(钥匙串)", + L10nKey::CloseWindowTitle => "是否关闭窗口?", + L10nKey::CloseWindowBody => { + "你的会话会继续在后台运行。此工作区将保留,下次启动时可在主页和标题栏工作区菜单中找到。" + } + L10nKey::Cancel => "取消", + L10nKey::Close => "关闭", + L10nKey::QuitStopServerTitle => "退出并停止服务器?", + L10nKey::QuitStopServerBody => { + "这会退出 tty7 并停止后台服务器,所有仍在运行的 shell 都会被终止。你的标签页和布局会被保留,下次启动时以全新的 shell 重新打开。(普通退出会保持 shell 运行。)" + } + L10nKey::QuitAndStop => "退出并停止", + L10nKey::CloseSshConnectionTitle => "关闭这个 SSH 连接?", + L10nKey::CloseSshConnectionBody => "连接仍处于活动状态,关闭会断开它。", + L10nKey::Keep => "保留", + L10nKey::SettingsNavAppearance => "外观", + L10nKey::SettingsNavTerminal => "终端", + L10nKey::SettingsNavInput => "输入", + L10nKey::SettingsNavSsh => "SSH", + L10nKey::SettingsNavAgents => "Agents", + L10nKey::SettingsNavWindowTabs => "窗口与标签页", + L10nKey::SettingsNavKeybindings => "按键绑定", + L10nKey::SettingsNavAbout => "关于", + L10nKey::SettingsHeader => "设置", + L10nKey::Reset => "重置", + L10nKey::Save => "保存", + L10nKey::Connect => "连接", + L10nKey::Download => "下载", + L10nKey::Link => "关联", + L10nKey::SettingsThemeIntroTitle => "主题", + L10nKey::SettingsThemeIntroDesc => "选择配色主题。每个主题都有各自的浅色或深色外观。", + L10nKey::SettingsTypography => "字体排版", + L10nKey::SettingsFontSize => "字号", + L10nKey::SettingsFontSizeDesc => "终端文字大小(像素)。", + L10nKey::SettingsLineHeight => "行高", + L10nKey::SettingsLineHeightDesc => "行间距为字号的倍数。", + L10nKey::SettingsFontFamily => "字体族", + L10nKey::SettingsFontFamilyDesc => "从系统已安装的字体中选择。", + L10nKey::SettingsBoldFont => "粗体字体", + L10nKey::SettingsBoldFontDesc => "粗体文字使用的字体;默认由主字体合成。", + L10nKey::SettingsItalicFont => "斜体字体", + L10nKey::SettingsItalicFontDesc => "斜体文字使用的字体;默认由主字体合成。", + L10nKey::SettingsFontLigatures => "字体连字", + L10nKey::SettingsFontLigaturesDesc => "为终端文字启用常见的编程连字特性。", + L10nKey::SettingsCursor => "光标", + L10nKey::SettingsCursorShape => "光标形状", + L10nKey::SettingsCursorShapeDesc => "终端光标的绘制方式。", + L10nKey::SettingsCursorBlink => "光标闪烁", + L10nKey::SettingsCursorBlinkDesc => "终端获得焦点时让光标闪烁。", + L10nKey::SettingsLanguage => "语言", + L10nKey::SettingsLanguageDesc => "选择 tty7 界面使用的语言。", + L10nKey::SettingsLanguageEnglish => "English", + L10nKey::SettingsLanguageChinese => "简体中文", + L10nKey::SettingsLanguageJapanese => "日本語", + L10nKey::SettingsSearchLanguageKeywords => { + "语言 区域设置 英文 中文 language locale english chinese" + } + L10nKey::SettingsTransparency => "透明度", + L10nKey::SettingsOpacity => "不透明度", + L10nKey::SettingsOpacityDesc => { + "窗口背景的不透明度,适用于所有主题。低于 100% 时可以看到桌面。" + } + L10nKey::SettingsBlur => "模糊", + L10nKey::SettingsBlurDesc => "模糊半透明窗口背后的内容(macOS)。", + L10nKey::FollowTheme => "跟随主题", + L10nKey::SettingsDimInactivePanes => "调暗非活动窗格", + L10nKey::SettingsDimInactivePanesDesc => "在分屏中淡化未聚焦的窗格,让活动窗格更突出。", + L10nKey::SettingsOpenThemesFolder => "打开主题文件夹", + L10nKey::SettingsChangeThemeImage => "更改…", + L10nKey::SettingsChooseThemeImage => "选择…", + L10nKey::SettingsRemoveThemeImage => "移除", + L10nKey::SettingsImageOpacity => "图片不透明度", + L10nKey::SettingsImageOpacityDesc => "图片叠加在背景色上的显示强度。", + L10nKey::SettingsEditTheme => "编辑主题", + L10nKey::SettingsEditThemeIntro => { + "你正在编辑一份副本。更改会保存到主题文件夹中的对应文件并实时生效。" + } + L10nKey::SettingsBackgroundImage => "背景图片", + L10nKey::SettingsBackgroundImageDesc => "叠加在背景色之上、文字之下。", + L10nKey::SettingsAnsiColors => "ANSI 颜色", + L10nKey::SettingsCustomThemes => "自定义主题", + L10nKey::SettingsCustomThemesIntro => { + "复制一个主题后可在此编辑其颜色,或者把自定义主题放入主题文件夹:tty7 YAML 主题或 iTerm2 的 .itermcolors 方案。" + } + L10nKey::SettingsDuplicateToEdit => "复制以编辑", + L10nKey::SettingsHosts => "主机", + L10nKey::SettingsDefaults => "默认值", + L10nKey::SettingsInheritedByEveryHost => "对所有主机生效", + L10nKey::SettingsNoSavedHosts => "还没有保存的主机。", + L10nKey::SettingsNothingMatches => "没有匹配 {query} 的内容。", + L10nKey::SettingsInTty7 => "在 tty7 中", + L10nKey::SettingsImportFromSshConfig => "从 ~/.ssh/config 导入", + L10nKey::SettingsExpandAllGroups => "展开所有分组", + L10nKey::SettingsNoHostsYet => "还没有主机", + L10nKey::SettingsNothingSelected => "未选择任何内容", + L10nKey::SettingsTypeAddressToConnect => "输入地址即可立刻连接,之后 tty7 会提示保存。", + L10nKey::SettingsMoreInSshConfig => "~/.ssh/config 中还有 {count} 个", + L10nKey::SettingsAliasesLinked => "已关联 {count} 个别名。", + L10nKey::SettingsImportAliases => "导入别名", + L10nKey::SettingsImportAliasesDesc => { + "重新读取文件并添加新内容。你在这里做的编辑由 tty7 保存——不会写入该文件本身。" + } + L10nKey::SettingsImportNow => "立即导入", + L10nKey::SettingsDefaultsIntro => { + "所有主机都从这些设置开始。每个主机都可以在自己的高级选项中覆盖某项。" + } + L10nKey::SettingsCopyAddress => "复制地址", + L10nKey::SettingsDuplicate => "复制", + L10nKey::SettingsForgetPassword => "清除已保存的密码", + L10nKey::SettingsForgotPasswordFor => "已清除 {endpoint} 的已保存密码", + L10nKey::SettingsCouldntForgetPassword => "无法清除 {endpoint} 的已保存密码:{error}", + L10nKey::SettingsSecurity => "安全", + L10nKey::SettingsSecurityIntro => "主机可以在自己的高级选项中覆盖这些设置。", + L10nKey::SettingsVerifyHostKeys => "校验主机密钥", + L10nKey::SettingsVerifyHostKeysDesc => { + "在连接前对照 known_hosts 检查每台服务器的密钥,并确认未知或已更改的密钥。关闭后连接不做检查,被仿冒的服务器也不会被察觉。" + } + L10nKey::WarnBeforeClosing => "关闭前警告", + L10nKey::SettingsWarnBeforeClosingDesc => { + "在关闭带有活动 SSH 会话的标签页或窗格前请求确认。" + } + L10nKey::SettingsNewHost => "新主机", + L10nKey::SettingsName => "名称", + L10nKey::SettingsNameDesc => "此连接的标签。", + L10nKey::SettingsHost => "主机", + L10nKey::SettingsHostDesc => "主机名或 IP 地址。", + L10nKey::SettingsUser => "用户", + L10nKey::SettingsUserDesc => "登录用户(留空表示连接时解析)。", + L10nKey::SettingsAuth => "认证", + L10nKey::SettingsAuthDesc => "认证方式。自动会依次尝试所有适用的方式。", + L10nKey::SettingsAuthModeAuto => "自动", + L10nKey::SettingsAuthModePassword => "密码", + L10nKey::SettingsAuthModeKey => "密钥", + L10nKey::SettingsAuthModeAgent => "ssh-agent", + L10nKey::SettingsAuthMode2Fa => "2FA", + L10nKey::SettingsJumpHost => "跳板主机", + L10nKey::SettingsJumpHostDesc => "用于中转的另一个主机配置的名称(留空 = 直连)。", + L10nKey::SettingsNoneSummary => "(无)", + L10nKey::SettingsNoneLower => "无", + L10nKey::SettingsPortForwarding => "端口转发", + L10nKey::SettingsRulesOpenedWithConnection => "1 条规则,随连接打开", + L10nKey::SettingsAddRule => "+ 添加规则", + L10nKey::SettingsFwdLegendLocal => "L — 本地端口可达远程侧", + L10nKey::SettingsFwdLegendRemote => "R — 远程端口可达本机", + L10nKey::SettingsFwdLegendDynamic => "D — 动态 SOCKS 代理", + L10nKey::SettingsFwdNeedsBoth => "需要监听端口和目标 host:port——不会被保存。", + L10nKey::SettingsFwdNeedsListen => "需要监听端口——不会被保存。", + L10nKey::SettingsAdvanced => "高级", + L10nKey::SettingsAdvancedSummary => "算法 / 保活 / 代理 / X11 / 登录脚本", + L10nKey::SettingsIdentityFiles => "身份文件", + L10nKey::SettingsIdentityFilesDesc => "私钥路径,每行一个(支持 %h/%r 展开)。", + L10nKey::SettingsAgentForwarding => "ssh-agent 转发", + L10nKey::SettingsAgentForwardingDesc => "将本机 ssh-agent 转发到该连接。", + L10nKey::SettingsProxyCommand => "代理命令", + L10nKey::SettingsProxyCommandDesc => "传输命令(%h/%p/%r 会被替换)。", + L10nKey::SettingsSocks5Proxy => "SOCKS5 代理", + L10nKey::SettingsSocks5ProxyDesc => "host:port(留空 = 无)。", + L10nKey::SettingsHttpProxy => "HTTP 代理", + L10nKey::SettingsHttpProxyDesc => "host:port(留空 = 无)。", + L10nKey::SettingsKexAlgorithms => "KEX 算法", + L10nKey::SettingsKexAlgorithmsDesc => "逗号分隔(留空 = 库默认值)。", + L10nKey::SettingsCiphers => "加密算法", + L10nKey::SettingsCiphersDesc => "逗号分隔(留空 = 默认值)。", + L10nKey::SettingsMacs => "MAC 算法", + L10nKey::SettingsMacsDesc => "逗号分隔(留空 = 默认值)。", + L10nKey::SettingsHostKeyAlgorithms => "主机密钥算法", + L10nKey::SettingsHostKeyAlgorithmsDesc => "逗号分隔(留空 = 默认值)。", + L10nKey::SettingsCompression => "压缩", + L10nKey::SettingsJumpHostVia => "经由 {jump_name}", + L10nKey::SettingsConnected => "已连接", + L10nKey::SettingsProfileCopied => "{name}(副本)", + L10nKey::SettingsCompressionDesc => "逗号分隔(留空 = 默认值)。", + L10nKey::SettingsKeepaliveInterval => "保活间隔(秒)", + L10nKey::SettingsKeepaliveIntervalDesc => "留空 = 库默认值。", + L10nKey::SettingsKeepaliveCountMax => "最大保活次数", + L10nKey::SettingsKeepaliveCountMaxDesc => "判定断连前允许丢失的保活次数。", + L10nKey::SettingsConnectTimeout => "连接超时(秒)", + L10nKey::SettingsConnectTimeoutDesc => "留空 = 库默认值。", + L10nKey::SettingsX11Forwarding => "X11 转发", + L10nKey::SettingsX11ForwardingDesc => "请求 X11 转发(macOS 上需要 XQuartz)。", + L10nKey::SettingsShellIntegration => "Shell 集成", + L10nKey::SettingsShellIntegrationDesc => "让远程 shell 报告提示符、退出码和目录。", + L10nKey::SettingsLoginScripts => "登录脚本", + L10nKey::SettingsLoginScriptsDesc => "shell 打开后发送的命令,每行一个。", + L10nKey::SettingsSkipBanner => "跳过横幅", + L10nKey::SettingsSkipBannerDesc => "抑制服务器登录横幅。", + L10nKey::SettingsDefaultFollowsDefaults => "默认跟随默认设置,当前为 {value}。", + L10nKey::SettingsValueOn => "开", + L10nKey::SettingsValueOff => "关", + L10nKey::SettingsDefault => "默认", + L10nKey::SettingsOn => "开", + L10nKey::SettingsOff => "关", + L10nKey::SettingsShell => "Shell", + L10nKey::SettingsShellIntro => { + "每个新终端启动的程序。将“程序”留空可使用平台默认值({default})。" + } + L10nKey::SettingsProgram => "程序", + L10nKey::SettingsProgramDesc => "PATH 中的可执行文件名或绝对路径,例如 zsh、fish、pwsh。", + L10nKey::SettingsArguments => "参数", + L10nKey::SettingsArgumentsDesc => "以空格分隔的启动参数,例如登录 shell 用 -l。", + L10nKey::SettingsStartIn => "起始目录", + L10nKey::SettingsStartInDesc => "新 shell 的启动目录:tty7 的启动目录、主目录或固定路径。", + L10nKey::SettingsCustomPath => "自定义路径", + L10nKey::SettingsCustomPathDesc => "新 shell 启动的目录。", + L10nKey::SettingsWdInherit => "继承", + L10nKey::SettingsWdHome => "主目录", + L10nKey::SettingsWdCustom => "自定义", + L10nKey::SettingsShellFooter => { + "仅适用于没有可继承目录的 shell,例如窗口的第一个标签页。新标签页和分屏仍会继承活动窗格的目录,已经打开的 shell 会继续运行。" + } + L10nKey::SettingsScrolling => "滚动", + L10nKey::SettingsScrollback => "Scrollback", + L10nKey::SettingsScrollbackDesc => "每个窗格保留的历史行数。仅适用于新窗格。", + L10nKey::SettingsScrollSpeed => "滚动速度", + L10nKey::SettingsScrollSpeedDesc => "应用于鼠标滚轮滚动的倍率。", + L10nKey::SettingsMouse => "鼠标", + L10nKey::SettingsFocusFollowsMouse => "焦点跟随鼠标", + L10nKey::SettingsFocusFollowsMouseDesc => "悬停窗格即聚焦,无需点击。", + L10nKey::SettingsHideMouseWhileTyping => "输入时隐藏鼠标", + L10nKey::SettingsHideMouseWhileTypingDesc => "输入时隐藏指针;下次移动鼠标时恢复。", + L10nKey::SettingsReportMouseToApps => "向应用报告鼠标", + L10nKey::SettingsReportMouseToAppsDesc => { + "让全屏应用(如 vim、tmux)处理点击和滚动;按住 Shift 可让操作保持本地。" + } + L10nKey::SettingsBell => "铃声", + L10nKey::SettingsTerminalBell => "终端铃声", + L10nKey::SettingsTerminalBellDesc => { + "铃声(^G)的通知方式:静音、短暂闪烁、系统声音,或两者同时。" + } + L10nKey::SettingsLinks => "链接", + L10nKey::DetectUrls => "检测 URL", + L10nKey::SettingsDetectUrlsDesc => "悬停时给链接加下划线,通过 {modifier}+点击 打开。", + L10nKey::ForwardSshLoopbackLinks => "转发 SSH 回环链接", + L10nKey::SettingsForwardSshLoopbackLinksDesc => { + "当窗格处于 SSH 中时,通过临时端口转发打开 localhost 链接。" + } + L10nKey::OpenFilesWith => "打开文件方式", + L10nKey::SettingsOpenFilesWithDesc => { + "{modifier}+点击 文件链接时运行的命令,而不是默认应用。可使用 {path}、{line}、{column};参数值缺失的标志会被丢弃(例如 herdr edit {path} --line={line})。留空使用默认应用。" + } + L10nKey::SettingsBellModeOff => "关", + L10nKey::SettingsBellModeVisual => "闪烁", + L10nKey::SettingsBellModeAudible => "声音", + L10nKey::SettingsBellModeBoth => "闪烁 + 声音", + L10nKey::SettingsPrompt => "提示符", + L10nKey::SettingsPromptIntro => { + "shell 提示符处的 tty7 自带菜单。关闭某项即可把按键交还给 shell。" + } + L10nKey::SettingsTabCompletion => "Tab 补全", + L10nKey::SettingsTabCompletionDesc => { + "在提示符按 Tab 打开 tty7 的补全菜单。关闭后 Tab 交由 shell 自身的补全处理。" + } + L10nKey::SettingsHistorySearch => "历史搜索", + L10nKey::SettingsHistorySearchDesc => { + "在提示符按 ⌃R 打开 tty7 的模糊历史菜单。关闭后 ⌃R 交由 shell 处理——它自带的反向搜索,或你在那里绑定的其它功能(fzf、percol)。" + } + L10nKey::SettingsSelectionClipboard => "选择与剪贴板", + L10nKey::SettingsSmartSelection => "智能选择", + L10nKey::SettingsSmartSelectionDesc => { + "双击选择光标下的完整 URL、文件路径、邮箱或成对的括号。" + } + L10nKey::SettingsCopyOnSelect => "选中即复制", + L10nKey::SettingsCopyOnSelectDesc => "用鼠标选中文本时立即复制到剪贴板,无需按 ⌘C。", + L10nKey::SettingsTrimTrailingSpaces => "复制时去除末尾空格", + L10nKey::SettingsTrimTrailingSpacesDesc => "去除每行复制文本末尾的空白。", + L10nKey::SettingsKeyboard => "键盘", + L10nKey::SettingsOptionAsMeta => "Option (⌥) 作为 Meta", + L10nKey::SettingsOptionAsMetaDesc => { + "⌥+按键 发送 shell 期望的转义组合键(⌥B = 后退一个词),而不是输入特殊字符(∫)。" + } + L10nKey::SettingsAgentsIntro => "Agents", + L10nKey::SettingsAgentsIntroDesc => { + "hook 集成让标签栏中的窗格实时显示这些 agent 的会话状态(进行中 / 等待中 / 已完成)。仅在 tty7 内生效。" + } + L10nKey::SettingsReadingAgentConfig => "正在读取这台机器的 agent 配置…", + L10nKey::SettingsStatusNotInstalled => "未安装", + L10nKey::SettingsStatusInstalled => "已安装", + L10nKey::SettingsStatusOutdated => "已过时", + L10nKey::SettingsInstall => "安装", + L10nKey::SettingsReinstall => "重新安装", + L10nKey::SettingsUpdate => "更新", + L10nKey::SettingsUninstall => "卸载", + L10nKey::SettingsOfflineMachines => { + "还有 {count} 台已保存的机器未连接——在其中一台上打开工作区,即可在那台机器上安装 hook。" + } + L10nKey::SettingsSyncWithSystem => "跟随系统", + L10nKey::SettingsSyncWithSystemDesc => "跟随操作系统外观,并分别使用浅色与深色主题。", + L10nKey::SettingsChangeTheme => "更换主题", + L10nKey::SettingsThemes => "主题", + L10nKey::SettingsThemePanelManual => "更改当前主题。", + L10nKey::SettingsThemePanelLight => "选择浅色模式的主题。", + L10nKey::SettingsThemePanelDark => "选择深色模式的主题。", + L10nKey::SettingsCustom => "自定义", + L10nKey::SettingsBuiltIn => "内置", + L10nKey::SettingsDark => "深色", + L10nKey::SettingsLight => "浅色", + L10nKey::SettingsLightMode => "浅色模式", + L10nKey::SettingsDarkMode => "深色模式", + L10nKey::SettingsActive => "使用中", + L10nKey::SettingsStartupWindow => "启动窗口", + L10nKey::SettingsStartupWindowDesc => "tty7 启动时的窗口状态。", + L10nKey::SettingsRememberWindowSize => "记住窗口大小与位置", + L10nKey::SettingsRememberWindowSizeDesc => { + "以 tty7 上次退出时窗口的大小和位置重新打开。关闭时以默认大小居中打开。" + } + L10nKey::SettingsRestoreLastLayout => "恢复上次布局", + L10nKey::SettingsRestoreLastLayoutDesc => { + "启动时恢复上次窗口的标签页、分屏和目录。关闭时从单个新终端开始。" + } + L10nKey::SettingsConfirmLastWindowClose => "关闭最后一个窗口前确认", + L10nKey::SettingsConfirmLastWindowCloseDesc => { + "关闭最后一个窗口会同时退出 tty7,所以先问一句。关掉此项则直接关窗——两种情况下你的 shell 都会在后台继续运行。" + } + L10nKey::SettingsShowTrayIcon => "显示托盘图标", + L10nKey::SettingsShowTrayIconDesc => { + "在系统托盘/菜单栏保留状态项:当编码 agent 需要输入时发出提示,其菜单可跳转到该 agent 的窗格。" + } + L10nKey::SettingsTabs => "标签页", + L10nKey::SettingsNewTabPosition => "新标签页位置", + L10nKey::SettingsNewTabPositionDesc => "新打开的标签页插入的位置。", + L10nKey::SettingsTabBarPosition => "标签栏位置", + L10nKey::SettingsTabBarPositionDesc => "将标签页显示为顶部横向条或左侧垂直侧栏。", + L10nKey::SettingsSidebarGrouping => "侧栏分组", + L10nKey::SettingsSidebarGroupingDesc => { + "按 git 仓库在标题下对侧栏标签页分组,非仓库标签页放在“草稿”分组。仅适用于左侧栏。" + } + L10nKey::SettingsDiffPreviewFromCounts => "从侧栏计数打开 diff 预览", + L10nKey::SettingsDiffPreviewFromCountsDesc => { + "点击行上的 +N −N 可在浮层中打开 worktree diff。关闭时行上仍显示分支和计数,但不再可点击。" + } + L10nKey::SettingsNotifications => "通知", + L10nKey::SettingsNotifyOnCommandFinish => "命令完成时通知", + L10nKey::SettingsNotifyOnCommandFinishDesc => "较长的前台命令完成后发出桌面提醒。", + L10nKey::SettingsNotifyThreshold => "通知阈值", + L10nKey::SettingsNotifyThresholdDesc => "命令需运行多久才能算作\"较长\"。", + L10nKey::SettingsWindow => "窗口", + L10nKey::NotifyModeNever => "从不", + L10nKey::NotifyModeUnfocused => "窗口未聚焦时", + L10nKey::NotifyModeAlways => "总是", + L10nKey::SettingsStartupNormal => "普通", + L10nKey::SettingsStartupMaximized => "最大化", + L10nKey::SettingsStartupFullscreen => "全屏", + L10nKey::SettingsAfterCurrent => "当前之后", + L10nKey::SettingsAtEnd => "末尾", + L10nKey::SettingsTop => "顶部", + L10nKey::SettingsLeft => "左侧", + L10nKey::SettingsByRepo => "按仓库", + L10nKey::SettingsFlat => "平铺", + L10nKey::SettingsPreset => "预设", + L10nKey::SettingsPresetDesc => { + "tmux 预设把窗格/标签页操作映射为前缀序列(例如 Ctrl-B 后按 C)。" + } + L10nKey::SettingsPrefix => "前缀", + L10nKey::SettingsPressKeys => "按下按键…", + L10nKey::SettingsPauseToSaveEsc => "暂停以保存 · Esc", + L10nKey::SettingsKeybindingsIntroDesc => { + "点击某个快捷键,然后按下新按键,短暂停顿后便会保存。可连续按键组成序列,例如 Ctrl-B 后按 X。Esc 取消;Backspace 移除最后一个按键,若最先按下则重置为默认。" + } + L10nKey::SettingsPrefixNote => { + "启用前缀后,单独按前缀键约 1 秒后会传给 shell,前缀 + 未绑定的按键会直接发送到终端。" + } + L10nKey::SettingsRestoreAllDefaults => "恢复全部默认值", + L10nKey::SettingsAboutDesc1 => "终端工作台:常驻会话、远程工作、agent。", + L10nKey::SettingsAboutTech => "纯 Rust · GPU 渲染基于 Zed 的 gpui · VT 内核来自 Alacritty", + L10nKey::SettingsVersion => "版本", + L10nKey::SettingsUpdates => "更新", + L10nKey::SettingsUpdateAndRelaunch => "更新并重新启动", + L10nKey::SettingsUpdateViewRelease => "查看发布页面", + L10nKey::SettingsUpdateChecking => "正在检查更新…", + L10nKey::SettingsUpdateUpToDate => "当前已是最新版本。", + L10nKey::SettingsUpdateDownloading => "正在下载并验证更新…", + L10nKey::SettingsUpdateInstalling => "正在通过更新重新启动…", + L10nKey::SettingsUpdateCheckNow => "立即检查", + L10nKey::SettingsUpdateCheckFailed => "无法检查更新:{error}", + L10nKey::SettingsUpdatePrepareFailed => "更新失败:{error}", + L10nKey::SettingsUpdateLaunchFailed => "无法启动安装程序:{error}", + L10nKey::SettingsUpdateUnsupportedMacos => { + "当前副本并非从可写的 tty7.app 包运行,直接替换并不安全。请将 tty7 移到“应用程序”或其他可写文件夹,或者打开发布页面安装更新。" + } + L10nKey::SettingsUpdateUnsupportedLinux => { + "当前应用内更新器支持打包的 macOS 应用。请通过发布页面或包管理器更新此 Linux 安装。" + } + L10nKey::SettingsUpdateUnsupportedWindows => { + "Windows 自动更新适用于可识别的 Inno Setup 安装版和便携 ZIP 版。当前副本缺少有效的安装标记、更新程序或可写的便携目录,请打开发布页面手动更新。" + } + L10nKey::SettingsUpdateWindowsAllUsers => { + "tty7 是为所有用户安装的,替换它需要管理员权限。tty7 不会自行弹出提权请求,请打开发布页面并自行运行安装程序进行更新。" + } + L10nKey::SettingsUpdateUnsupportedPlatform => "此平台不支持自动安装,请打开发布页面。", + L10nKey::SettingsUpdateMissingPackage => { + "该版本没有适用于当前安装的 {name} 包。请打开发布页面选择其他包。" + } + L10nKey::SettingsUpdateMissingChecksums => { + "该版本缺少 checksums.txt,因此 tty7 拒绝自动安装。" + } + L10nKey::SettingsVersionAvailable => "新版本 {version} 可用。", + L10nKey::SettingsCheckUpdatesDesc => "无法就地更新的安装方式会改为打开发布页面。", + L10nKey::SettingsCheckUpdatesOnLaunch => "启动时检查更新", + L10nKey::SettingsCommandLine => "命令行", + L10nKey::SettingsCommandLineDesc => { + "启动时将自带的 `tty7` 命令加入 PATH,让脚本和编码 agent 可在任意终端驱动 tty7。在 tty7 窗格内两种情况都可用。如果你自己构建或安装了 `tty7` 且不希望被遮蔽,请关闭此选项。下次启动时生效。" + } + L10nKey::SettingsInstallCliOnPath => "将 `tty7` 命令安装到 PATH", + L10nKey::SettingsServer => "服务器", + L10nKey::SettingsServerDesc => { + "重启在后台维持 shell 运行的服务器。这会结束这台计算机上所有正在运行的 shell;你的标签页和布局会以全新的 shell 重新打开。" + } + L10nKey::SettingsRestartServer => "重启服务器…", + L10nKey::SettingsAppHttpProxy => "更新代理", + L10nKey::SettingsAppHttpProxyDesc => { + "供 tty7 自身的更新检查和下载使用的可选代理。不影响面板中运行的程序,它们仍按各自的环境变量走。留空则跟随系统代理。例如:http://127.0.0.1:7890、socks5://127.0.0.1:1080。" + } + L10nKey::SettingsAppHttpProxyInvalid => "不是有效的代理地址,该值未保存。", + L10nKey::SettingsAgentClaudeCode => "Claude Code", + L10nKey::SettingsAgentCodex => "Codex", + L10nKey::SettingsAgentCopilotCli => "Copilot CLI", + L10nKey::SettingsAgentOpencode => "OpenCode", + L10nKey::SettingsAgentPi => "Pi", + L10nKey::SettingsAgentGrokBuild => "Grok Build", + L10nKey::SettingsSearchAboutKeywords => { + "关于 版本 许可证 致谢 构建 更新 检查 github about version license credits update" + } + L10nKey::SettingsSearchAppHttpProxyKeywords => { + "代理 proxy http https socks socks5 clash v2ray 网络 下载 更新" + } + L10nKey::SettingsSearchAnsiColorsKeywords => { + "ANSI颜色 调色板 终端颜色 主题 ansi colors palette terminal theme" + } + L10nKey::SettingsSearchArgumentsKeywords => { + "参数 shell 启动参数 登录参数 arguments shell flags login args" + } + L10nKey::SettingsSearchBlurKeywords => { + "模糊 毛玻璃 半透明 窗口 背景 blur frosted vibrancy window background" + } + L10nKey::SettingsSearchBoldFontKeywords => "粗体 字体粗细 字重 bold font weight typeface", + L10nKey::SettingsSearchClaudeCodeKeywords => { + "Claude Code agent 集成 hook 安装 卸载 状态 会话 claude agent integration hooks install" + } + L10nKey::SettingsSearchCodexKeywords => { + "Codex agent 集成 hook 安装 OpenAI codex agent integration hooks install" + } + L10nKey::SettingsSearchCommandLineToolKeywords => { + "命令行工具 cli tty7 路径 shell 命令 安装 符号链接 terminal command line tool" + } + L10nKey::SettingsSearchCommandLineToolTitle => "命令行工具", + L10nKey::SettingsSearchConfirmLastWindowCloseKeywords => { + "关闭最后一个窗口前确认 关闭 退出 确认 提示 最后一个窗口 confirm close last window quit" + } + L10nKey::SettingsSearchCopilotCliKeywords => { + "Copilot CLI agent 集成 hook 安装 GitHub copilot agent integration hooks install" + } + L10nKey::SettingsSearchCopyOnSelectKeywords => { + "选中即复制 复制 剪贴板 选择 鼠标 copy on select clipboard yank" + } + L10nKey::SettingsSearchCursorBlinkKeywords => { + "光标闪烁 闪烁 光标 blink cursor blinking flash" + } + L10nKey::SettingsSearchCursorShapeKeywords => { + "光标形状 光标 块 竖线 下划线 cursor shape caret block bar underline beam" + } + L10nKey::SettingsSearchCustomThemesKeywords => { + "自定义主题 复制 编辑 颜色 文件夹 yaml 导入 theme custom edit duplicate colors import" + } + L10nKey::SettingsSearchDetectUrlsKeywords => { + "检测URL 链接 超链接 可点击 打开 detect urls links hyperlink open" + } + L10nKey::SettingsSearchDiffPreviewFromCountsKeywords => { + "从侧栏计数打开 diff 预览 diff 预览 侧栏 git diff preview sidebar counts git changes" + } + L10nKey::SettingsSearchDimInactivePanesKeywords => { + "调暗 非活动窗格 淡化 未聚焦 分屏 高亮 active dimming pane focus" + } + L10nKey::SettingsSearchFocusFollowsMouseKeywords => { + "焦点跟随鼠标 悬停 激活 窗格 focus follows mouse hover activate pane" + } + L10nKey::SettingsSearchFontFamilyKeywords => { + "字体 字体族 等宽 排版 font family monospace typography typeface" + } + L10nKey::SettingsSearchFontLigaturesKeywords => { + "字体连字 连字 字形 typography ligatures glyph fira" + } + L10nKey::SettingsSearchFontSizeKeywords => { + "字号 字体大小 文字 放大 缩小 typography font size bigger smaller zoom" + } + L10nKey::SettingsSearchForwardSshLoopbackLinksKeywords => { + "SSH回环链接 端口转发 隧道 localhost 转发 forward ssh loopback links tunnel" + } + L10nKey::SettingsSearchGrokBuildKeywords => { + "Grok Build agent 集成 hook 安装 xai grok build agent integration hooks install" + } + L10nKey::SettingsSearchHideMouseWhileTypingKeywords => { + "输入时隐藏鼠标 隐藏鼠标 指针 自动隐藏 hide mouse typing cursor pointer autohide" + } + L10nKey::SettingsSearchHistorySearchKeywords => { + "历史搜索 反向搜索 模糊搜索 ctrl-r fzf history search recall" + } + L10nKey::SettingsSearchHostsKeywords => { + "主机 SSH 连接 保存 主机配置 配置文件 导入 ssh_config 管理 添加 编辑 快速连接 hosts ssh profile import connect" + } + L10nKey::SettingsSearchHowShellsWorkKeywords => { + "Shell工作原理 shell 会话 守护进程 持久化 后台 工作区 布局 survive reboot daemon how shells work" + } + L10nKey::SettingsSearchHowShellsWorkTitle => "Shell 工作原理", + L10nKey::SettingsSearchItalicFontKeywords => "斜体 字体样式 italic oblique typeface", + L10nKey::SettingsSearchKeybindingsKeywords => { + "按键绑定 快捷键 热键 键盘 绑定 前缀 tmux keybindings shortcut hotkey binding prefix" + } + L10nKey::SettingsSearchKeybindingsTitle => "按键绑定", + L10nKey::SettingsSearchLineHeightKeywords => { + "行高 行间距 行距 typography line height spacing leading" + } + L10nKey::SettingsSearchNewTabPositionKeywords => { + "新标签页位置 标签页 顺序 末尾 当前之后 new tab position tabs order end after current" + } + L10nKey::SettingsSearchNotifyOnCommandFinishKeywords => { + "命令完成时通知 通知 提醒 命令 notify command finish notification alert desktop" + } + L10nKey::SettingsSearchNotifyThresholdKeywords => { + "通知阈值 通知 秒数 时长 命令 notify threshold notification duration seconds" + } + L10nKey::SettingsSearchOpacityKeywords => { + "不透明度 透明度 窗口 半透明 alpha opacity transparency translucent window" + } + L10nKey::SettingsSearchOpenFilesWithKeywords => { + "打开文件 链接 编辑器 命令 外部应用 路径 行号 列号 open files editor command path line column" + } + L10nKey::SettingsSearchOpencodeKeywords => { + "OpenCode agent 集成 插件 安装 opencode agent integration plugin install" + } + L10nKey::SettingsSearchOptionAsMetaKeywords => { + "Option作为Meta 修饰键 alt option meta 转义 escape macos keyboard modifier" + } + L10nKey::SettingsSearchPiKeywords => { + "Pi agent 集成 扩展 安装 pi agent integration extension install" + } + L10nKey::SettingsSearchPortForwardingKeywords => { + "端口转发 SSH 隧道 本地 远程 动态 SOCKS 转发 port forwarding ssh tunnel local remote" + } + L10nKey::SettingsSearchProgramKeywords => { + "程序 shell 二进制 zsh bash fish nu nushell pwsh powershell 可执行文件 启动 program shell binary launch" + } + L10nKey::SettingsSearchRememberWindowSizeKeywords => { + "记住窗口大小位置 窗口 大小 位置 启动 记住 remember window size position geometry" + } + L10nKey::SettingsSearchReportMouseToAppsKeywords => { + "鼠标报告 鼠标 vim tmux 点击 滚动 shift report mouse apps" + } + L10nKey::SettingsSearchRestoreLastLayoutKeywords => { + "恢复上次布局 恢复 会话 标签页 分屏 布局 restore last layout tabs splits" + } + L10nKey::SettingsSearchScrollSpeedKeywords => { + "滚动速度 鼠标滚轮 滚动倍率 scroll speed mouse wheel multiplier scrolling" + } + L10nKey::SettingsSearchScrollbackKeywords => { + "scrollback 回看 向上滚动 历史 缓冲区 行数 scrollback history buffer lines" + } + L10nKey::SettingsSearchShowTrayIconKeywords => { + "显示托盘图标 托盘 菜单栏 状态 图标 show tray icon menu bar status" + } + L10nKey::SettingsSearchSidebarGroupingKeywords => { + "侧栏分组 标签页 分组 仓库 git 侧栏 sidebar grouping tabs repo repository" + } + L10nKey::SettingsSearchSmartSelectionKeywords => { + "智能选择 双击 选择 单词 URL 路径 邮箱 括号 smart selection double click" + } + L10nKey::SettingsSearchStartInKeywords => { + "起始目录 工作目录 启动目录 主目录 继承 自定义 cwd working directory start home inherit custom" + } + L10nKey::SettingsSearchSyncWithSystemKeywords => { + "主题 跟随系统 自动 深色 浅色 外观 模式 theme dark light auto follow system" + } + L10nKey::SettingsSearchTabBarPositionKeywords => { + "标签栏位置 标签栏 侧边栏 左侧 顶部 布局 tab bar position tabs sidebar left top" + } + L10nKey::SettingsSearchTabCompletionKeywords => { + "Tab补全 补全 菜单 建议 tab completion suggestions prompt" + } + L10nKey::SettingsSearchTerminalBellKeywords => { + "终端铃声 铃声 提示音 闪烁 静音 两者 同时 beep bell terminal audible visual both" + } + L10nKey::SettingsSearchThemeKeywords => { + "外观 颜色 主题 配色 深色 浅色 背景 前景 强调色 跟随系统 appearance color scheme dark light palette" + } + L10nKey::SettingsSearchTrimTrailingSpacesKeywords => { + "复制时去除空格 去除末尾空格 剪贴板 空白 trim trailing spaces copy whitespace" + } + L10nKey::SettingsSearchVerifyHostKeysKeywords => { + "校验主机密钥 主机密钥 known_hosts 指纹 mitm 安全 verification ssh host keys" + } + L10nKey::SettingsSearchWarnBeforeClosingKeywords => { + "关闭前警告 确认关闭 SSH 标签页 窗格 会话 warn before closing ssh confirm" + } + L10nKey::SettingsSearchStartupWindowKeywords => { + "启动窗口 启动 最大化 全屏 普通 startup window launch maximized fullscreen normal" + } + L10nKey::SwitcherNoMatch => "没有匹配的工作区或机器。", + L10nKey::AddSshHost => "添加 SSH 主机…", + L10nKey::ClickForNewWindow => "点击打开新窗口", + L10nKey::RestartServer => "重启服务器", + L10nKey::OtherMachines => "其他机器", + L10nKey::Ok => "确定", + L10nKey::SftpNoTransfers => "还没有传输任务。", + L10nKey::SftpPanelTitleFiles => "文件", + L10nKey::SftpTooltipRefresh => "刷新", + L10nKey::SftpTooltipMore => "更多", + L10nKey::SftpMenuNewFolder => "新建文件夹", + L10nKey::SftpMenuNewFile => "新建文件", + L10nKey::SftpMenuUpload => "上传…", + L10nKey::SftpMenuGotoShellCwd => "转到 shell 目录", + L10nKey::SftpMenuHideTransferHistory => "隐藏传输历史", + L10nKey::SftpMenuTransferHistory => "传输历史", + L10nKey::SftpEditNewFolder => "新建文件夹", + L10nKey::SftpEditNewFile => "新建文件", + L10nKey::SftpEditRename => "重命名", + L10nKey::SftpEditPermissions => "权限 · {mode}", + L10nKey::SftpLoading => "加载中…", + L10nKey::SftpEmptyDirectory => "空文件夹。", + L10nKey::SftpContextOpen => "打开", + L10nKey::SftpContextFollowSymlink => "跟随符号链接", + L10nKey::SftpContextRename => "重命名", + L10nKey::SftpContextChmod => "权限…", + L10nKey::SftpTransferSummaryRunning => "{count} 个传输中 · {pct}%", + L10nKey::SftpTransferSummaryFailed => "{count} 个失败", + L10nKey::SftpTransferSummaryIdle => "传输", + L10nKey::SftpTransferProgress => "{done} / {total} ({pct}%)", + L10nKey::SftpTransferDone => "完成", + L10nKey::SftpTransferCancelled => "已取消", + L10nKey::SftpTransferError => "错误", + L10nKey::SftpImagePasteUploadFailed => "无法将粘贴的图片上传到 {host}:{error}", + L10nKey::ForwardPanelTitle => "端口转发", + L10nKey::ForwardDisconnected => "已断开", + L10nKey::ForwardDisconnectedFrom => "与 {host} 的连接已断开", + L10nKey::ForwardTooltipAdd => "添加转发", + L10nKey::ForwardTooltipRemove => "移除", + L10nKey::ForwardLocal => "本地", + L10nKey::ForwardRemote => "远程", + L10nKey::ForwardDynamic => "动态", + L10nKey::ForwardBindLabel => "绑定", + L10nKey::ForwardToLabel => "到", + L10nKey::ForwardSocksLabel => "SOCKS", + L10nKey::ForwardAdd => "添加", + L10nKey::FileTreePlaceholderFileName => "文件名", + L10nKey::FileTreePlaceholderFolderName => "文件夹名", + L10nKey::FileTreePlaceholderNewName => "新名称", + L10nKey::FileTreeDeleteTitle => "删除\"{name}\"?", + L10nKey::FileTreeDeleteFolderBody => "该文件夹及其中的所有内容都将被删除。", + L10nKey::FileTreeDeleteFileBody => "该文件将被删除。", + L10nKey::FileTreeDeleteFailed => "删除失败", + L10nKey::FileTreeContextOpen => "打开", + L10nKey::FileTreeContextCdHere => "cd 到此处", + L10nKey::FileTreeContextInsertPath => "在终端中插入路径", + L10nKey::FileTreeContextAttachAgent => "附加到 agent", + L10nKey::FileTreeContextNewFile => "新建文件", + L10nKey::FileTreeContextNewFolder => "新建文件夹", + L10nKey::FileTreeContextRename => "重命名", + L10nKey::FileTreeContextCopyPath => "复制路径", + L10nKey::FileTreeContextHideDotfiles => "隐藏点文件", + L10nKey::FileTreeContextShowDotfiles => "显示点文件", + L10nKey::SshPromptNewKey => "新 {fingerprint}", + L10nKey::SshPromptOldKey => "旧 {old_fingerprint}", + L10nKey::EditorCantOpen => "无法打开 {path}:{e}", + L10nKey::EditorCantRead => "无法读取 {path}:{e}", + L10nKey::EditorNotUtf8 => "\"{path}\" 不是有效的 UTF-8", + L10nKey::EditorSaveFailed => "保存失败", + L10nKey::EditorUnsavedChanges => "\"{name}\" 有未保存的更改", + L10nKey::EditorDiscard => "放弃", + L10nKey::EditorNoFileOpen => "没有打开的文件", + L10nKey::EditorBackToTerminal => "返回终端 (Esc)", + L10nKey::EditorLnCol => "行 {line},列 {column}", + L10nKey::EditorEdit => "编辑", + L10nKey::EditorPreview => "预览", + L10nKey::EditorWrapOn => "自动换行:开", + L10nKey::EditorWrapOff => "自动换行:关", + L10nKey::EditorFileTooLarge => "\"{path}\" 太大,无法在编辑器中打开({size} MB)", + L10nKey::EditorBinaryFile => "\"{path}\" 看起来是二进制文件", + L10nKey::PanelInfoTitle => "信息", + L10nKey::PanelChangesTitle => "变更", + L10nKey::PanelFilesTitle => "文件", + L10nKey::PanelNoSession => "没有活动会话。", + L10nKey::PanelNoSessionHint => "打开一个标签页以在此处查看其 shell、目录和进程。", + L10nKey::PanelNoWorkingDirectory => "没有工作目录。", + L10nKey::PanelNoWorkingDirectoryHint => "此窗格尚未报告工作目录。", + L10nKey::PanelLoading => "加载中…", + L10nKey::PanelNotAGitRepo => "不是 git 仓库。", + L10nKey::PanelNotAGitRepoHint => "进入 git 仓库后,此标签页会列出未提交的变更。", + L10nKey::PanelNoChanges => "没有未提交的变更。", + L10nKey::PanelNoChangesHint => "worktree 是干净的。", + L10nKey::PanelSessionSubtitle => "会话", + L10nKey::PanelProcessesSubtitle => "进程", + L10nKey::PanelPortsSubtitle => "端口", + L10nKey::PanelCwd => "工作目录", + L10nKey::PanelShell => "shell", + L10nKey::PanelSsh => "ssh", + L10nKey::PanelBranch => "分支", + L10nKey::PanelChangesRow => "变更", + L10nKey::PanelAgent => "agent", + L10nKey::PanelAgentIdle => "空闲", + L10nKey::PanelAgentWorking => "进行中", + L10nKey::PanelAgentWaiting => "等待中", + L10nKey::PanelAgentDone => "已完成", + L10nKey::PanelRevealInFinder => "在 Finder 中显示", + L10nKey::PanelOpenFolder => "打开文件夹", + L10nKey::WindowStop => "停止", + L10nKey::WindowDelete => "删除", + L10nKey::WindowThisWorkspace => "此工作区", + L10nKey::WindowConfirmTitle => "{verb}工作区\"{name}\"?", + L10nKey::WindowStopUnreachable => "无法连接到其所在机器。仍在运行的 shell 将会被终止。", + L10nKey::WindowDeleteUnreachable => { + "无法连接到其所在机器。仍在运行的 shell 将会被终止,布局也将被清除。" + } + L10nKey::WindowStopShells => "{count} 个正在运行的 shell 将会被终止。", + L10nKey::WindowDeleteShells => "{count} 个正在运行的 shell 将会被终止,布局也将被清除。", + L10nKey::DiffReading => "正在读取 diff…", + L10nKey::DiffNotARepo => "不是 git 仓库", + L10nKey::DiffReadFailed => "无法读取 worktree diff——下次刷新时重试。", + L10nKey::DiffWorkingTreeClean => "worktree 干净", + L10nKey::DiffCloseTooltip => "关闭 diff (Esc)", + L10nKey::DiffChangedFiles => "{count} 个变更文件", + L10nKey::DiffUntrackedCount => " · {count} 个未跟踪文件", + L10nKey::DiffMoreFiles => "…还有 {count} 个变更文件——在终端中运行 `git diff` 查看。", + L10nKey::DiffOversizedNotice => { + "此 worktree 太大,无法高效渲染({summary})。每个文件都已折叠——可展开单个文件,或在终端中运行 `git diff`。" + } + L10nKey::DiffTruncatedPerFile => { + "diff 在 {limit} 行处截断——在终端中运行 `git diff` 查看其余部分。" + } + L10nKey::DiffTruncatedBudget => { + "内容未加载——此 worktree 已超出 tty7 的 diff 预算。在终端中运行 `git diff` 查看此文件。" + } + L10nKey::DiffUntrackedHeader => "未跟踪文件 ({count})", + L10nKey::DiffMoreUntracked => "…还有 {count} 个——在终端中运行 `git status` 查看。", + L10nKey::DiffLines => "{count} 行 diff", + L10nKey::DiffChangedLines => "{total} 行变更,在 {cap} 截断前已加载 {loaded} 行 diff", + L10nKey::DiffBudgetAndCap => "tty7 的预算和单文件上限", + L10nKey::DiffBudget => "tty7 的预算", + L10nKey::DiffPerFileCap => "单文件上限", + L10nKey::DiffUntrackedSummary => "{count} 个未跟踪", + L10nKey::PendingConnecting => "正在连接 {machine}…", + L10nKey::PendingUnreachable => "无法连接到 {machine}", + L10nKey::WorktreePromptNeedsName => "worktree 需要一个名称", + L10nKey::WorktreePromptTitle => "新建 worktree 标签页", + L10nKey::WorktreePromptName => "worktree 名称", + L10nKey::WorktreePromptBranch => "新分支", + L10nKey::WorktreePromptBase => "起始分支", + L10nKey::WorktreePromptCreating => "正在创建…", + L10nKey::WorktreePromptCreate => "创建", + L10nKey::AppNewWorktreeFailed => "新建 worktree 失败:{error}", + L10nKey::HomeTimeJustNow => "刚刚", + L10nKey::HomeTimeMinutesAgo => "{count} 分钟前", + L10nKey::HomeTimeHourAgo => "1 小时前", + L10nKey::HomeTimeHoursAgo => "{count} 小时前", + L10nKey::HomeTimeYesterday => "昨天", + L10nKey::HomeTimeDaysAgo => "{count} 天前", + L10nKey::HomeTimeOverWeekAgo => "一周多前", + L10nKey::HomeReopenNamed => "重新打开\"{name}\"", + L10nKey::RemoteStripDisconnected => "未连接到 {machine}", + L10nKey::RemoteStripConnecting => "正在连接 {machine}…", + L10nKey::RemoteStripReconnecting => "正在重新连接 {machine}…", + L10nKey::RemoteStripReconnectingAttempt => "正在重新连接 {machine}…(第 {count} 次尝试)", + L10nKey::RemoteStripPreempted => "此工作区已在 {by} 上打开", + L10nKey::RemoteStripFailed => "未连接到 {machine}——{error}", + L10nKey::RemoteNoticePreempted => "已在别处打开——输入无效", + L10nKey::RemoteNoticeDisconnected => "未连接——输入无效", + L10nKey::RemoteActionRetryNow => "立即重试", + L10nKey::RemoteActionTakeBack => "收回", + L10nKey::RemoteActionConnect => "连接", + L10nKey::RemoteActionRetry => "重试", + L10nKey::RemoteNoConnectionDetails => { + "此窗口是 {machine} 上的工作区,但 tty7 已没有它的连接详情——\ + 请检查其 SSH 主机配置或 ~/.ssh/config 条目是否仍然存在。" + } + L10nKey::RemoteThisComputer => "本机", + L10nKey::RemoteRestartTitle => "重启 \"{machine}\" 上的 tty7 服务器?", + L10nKey::RemoteRestartBody => { + "这将停止 {machine} 上的所有 shell——其中仍在运行的任何内容都会被终止,\ + 包括此窗口未显示的 shell。工作区和布局会被保留,并以全新的 shell 恢复。" + } + L10nKey::RemoteReplaceBody => { + "{machine} 上运行的 tty7-server 使用了此客户端无法识别的协议。\ + tty7 会在该机器上重启为可识别的服务,如果 {machine} 尚未安装则会先安装。\n\ + \n\ + {machine} 上运行的所有会话都会结束,包括此窗口未连接的会话。" + } + L10nKey::RemoteRestartFailedTitle => "\"{machine}\" 上的 tty7 服务器未被重启", + L10nKey::RemoteRestartFailedBody => { + "{error}\n\ + \n\ + 那里仍在运行的会话用的还是旧版本。如果它们已经结束,重新连接就会启动此版本的服务器。" + } + L10nKey::RemoteHostUnreachable => "无法连接到 {machine}:{error}", + L10nKey::RemoteInstallTitle => "在 \"{machine}\" 上安装 tty7 服务器?", + L10nKey::RemoteInstallDetail => { + "tty7 会将其服务器二进制文件写入 {machine},以便本机可以在那里托管\ + 工作区。{machine} 上的其他内容不会被修改,也不会使用 sudo。\n\ + \n\ + {path_label}\u{2003}{path}\n\ + {version_label}\u{2003}{version}\n\ + {size_label}\u{2003}{size}\n\ + {from_label}\u{2003}{from}\n\ + {sha_label}\u{2003}{sha256}\n\ + \n\ + {silent_upgrades}" + } + L10nKey::RemoteInstallPathLabel => "路径", + L10nKey::RemoteInstallVersionLabel => "版本", + L10nKey::RemoteInstallSizeLabel => "大小", + L10nKey::RemoteInstallFromLabel => "来源", + L10nKey::RemoteInstallShaLabel => "SHA-256", + L10nKey::RemoteInstallSilentUpgrades => "此后在该机器上的升级将静默安装。", + L10nKey::RemoteInstallBytes => "字节", + L10nKey::RemoteMismatchTitle => "更新 \"{machine}\" 上的 tty7 服务器端?", + L10nKey::RemoteMismatchDetail => { + "{machine} 正在使用 {running} 提供 tty7 会话,该版本使用的协议无法被\ + 此客户端({wanted})识别。tty7 已在那里安装了匹配的服务器端,\ + 但正在运行的是你当前会话所在的版本。\n\ + \n\ + {replace_server}\u{2003}会将其替换为 {wanted} 并结束其托管的所有会话。\n\ + {cancel}\u{2003}会保持 {machine} 现状不变。此窗口将不会连接。" + } + L10nKey::RemoteMismatchReplaceServer => "更新服务器端", + L10nKey::RemoteMismatchUnknownBuild => "未知构建", + L10nKey::RemoteMismatchUnknownBuildFromExe => "未知构建(来自 {exe})", + L10nKey::RemoteDaemonStartFailed => "无法启动 tty7 本地服务器:{error}", + L10nKey::RemoteDaemonUnreachable => "无法连接到 tty7 本地服务器:{error}", + L10nKey::RemoteDaemonTooOld => { + "此机器上的 tty7 守护进程版本较旧,无法重启 {machine} 上的服务器。\ + 请退出 tty7(这会停止守护进程)并重新打开,然后重试。" + } + L10nKey::RemoteProfileMissing => "该已保存的 SSH 主机配置已不存在", + L10nKey::RemoteAliasMissing => "`{alias}` 已不再位于 ~/.ssh/config 中", + L10nKey::RemoteWslNoSsh => "WSL 工作区没有 SSH 连接", + L10nKey::RemoteLocalStdioNoSsh => "本地 --stdio 工作区没有 SSH 连接", + L10nKey::RemoteHostNotTty7 => "{machine} 已响应,但并非作为 tty7 服务器:{error}", + L10nKey::RemoteWorkspaceListFailed => "已连接到 {machine},但其工作区列表获取失败:{error}", + L10nKey::RemoteServerRestartFailed => "无法重启 {machine} 上的 tty7 服务器:{error}", + L10nKey::RemoteNoRouteToHost => "tty7 已无法到达 {machine}", + L10nKey::RemoteMachineTreeUnexpectedReply => "服务器用 {reply} 回复了机器树请求", + L10nKey::RemoteMismatchVersionFromExe => "{version}(来自 {exe})", + L10nKey::AppNoRunningCodingAgent => { + "未找到运行中的编码 agent——请先在某个窗格中启动一个(claude、codex 等)。" + } + L10nKey::SwitcherThisComputer => "本机", + L10nKey::SwitcherRestartingServer => "正在重启 tty7 服务器…", + L10nKey::SwitcherDownloadingServerWithTotal => "正在下载 tty7 服务器… {done} / {total}", + L10nKey::SwitcherDownloadingServerNoTotal => "正在下载 tty7 服务器… {done}", + L10nKey::SwitcherCopyingServer => "正在复制 tty7 服务器… {done} / {total}", + L10nKey::SwitcherThisWindow => "当前窗口", + L10nKey::SwitcherOpen => "已打开", + L10nKey::SwitcherDisconnect => "断开连接", + L10nKey::SwitcherOpenInNewWindow => "在新窗口中打开", + L10nKey::SwitcherRename => "重命名…", + L10nKey::SshPromptPasswordFor => "{user}@{host} 的密码", + L10nKey::SshPromptPassphraseFor => "{key_path} 的密码短语", + L10nKey::SshPromptTwoFactor => "双因素认证", + L10nKey::SshPromptUnknownHost => "未知主机 {host}", + L10nKey::SshPromptHostKeyChanged => "主机密钥已更改——可能存在中间人攻击", + L10nKey::SshPromptHostKeyChangedBody => "主机密钥与之前信任的密钥不同,这可能是一次攻击。", + L10nKey::SshPromptConnect => "连接", + L10nKey::SshPromptUnlock => "解锁", + L10nKey::SshPromptSubmit => "提交", + L10nKey::HostOpsError => "{context}:{error}", + L10nKey::CmdGroupTabsPanes => "标签页与窗格", + L10nKey::CmdGroupWorkspaces => "工作区", + L10nKey::CmdGroupView => "视图", + L10nKey::CmdGroupTerminal => "终端", + L10nKey::CmdGroupSsh => "SSH", + L10nKey::CmdGroupAgents => "Agents", + L10nKey::CmdGroupApplication => "应用", + L10nKey::CmdNewTab => "新标签页", + L10nKey::CmdNewWorktreeTab => "新建 worktree 标签页", + L10nKey::CmdNewWorktreeTabSubtitle => "在全新分支上独立检出", + L10nKey::CmdRenameTab => "重命名标签页…", + L10nKey::CmdSplitRight => "向右分屏", + L10nKey::CmdSplitDown => "向下分屏", + L10nKey::CmdZoomPane => "缩放窗格", + L10nKey::CmdNextPane => "下一窗格", + L10nKey::CmdPreviousPane => "上一窗格", + L10nKey::CmdFocusPaneLeft => "聚焦左侧窗格", + L10nKey::CmdFocusPaneRight => "聚焦右侧窗格", + L10nKey::CmdFocusPaneUp => "聚焦上方窗格", + L10nKey::CmdFocusPaneDown => "聚焦下方窗格", + L10nKey::CmdResizePaneLeft => "向左调整窗格", + L10nKey::CmdResizePaneRight => "向右调整窗格", + L10nKey::CmdResizePaneUp => "向上调整窗格", + L10nKey::CmdResizePaneDown => "向下调整窗格", + L10nKey::CmdSwapPaneNext => "与下一窗格交换", + L10nKey::CmdSwapPanePrevious => "与上一窗格交换", + L10nKey::CmdNextTab => "下一标签页", + L10nKey::CmdPreviousTab => "上一标签页", + L10nKey::CmdCopyWorkingDirectory => "复制工作目录", + L10nKey::CmdCopySessionId => "复制会话 ID", + L10nKey::CmdCopySessionIdSubtitle => "编码 agent 自身的会话 ID", + L10nKey::CmdForkSession => "Fork 会话", + L10nKey::CmdForkSessionSubtitle => "将此 agent 会话 fork 到新标签页", + L10nKey::CmdMarkTabAsUnread => "将标签页标记为未读", + L10nKey::CmdClosePaneTab => "关闭窗格/标签页", + L10nKey::CmdCloseOtherTabs => "关闭其他标签页", + L10nKey::CmdCloseTabsToTheRight => "关闭右侧标签页", + L10nKey::CmdReopenClosedTab => "重新打开已关闭标签页", + L10nKey::CmdNewWorkspace => "新建工作区", + L10nKey::CmdSwitchWorkspace => "切换工作区…", + L10nKey::CmdRenameWorkspace => "重命名工作区…", + L10nKey::CmdStopWorkspace => "停止工作区…", + L10nKey::CmdStopWorkspaceSubtitle => "结束其 shell,保留布局", + L10nKey::CmdDeleteWorkspace => "删除工作区…", + L10nKey::CmdDeleteWorkspaceSubtitle => "结束其 shell,清除布局", + L10nKey::CmdShowLeftSidebar => "显示左侧边栏", + L10nKey::CmdHideLeftSidebar => "隐藏左侧边栏", + L10nKey::CmdHideRightPanel => "隐藏右侧面板", + L10nKey::CmdShowRightPanel => "显示右侧面板", + L10nKey::CmdShowCodePanel => "显示代码面板", + L10nKey::CmdTabBarMoveToTop => "标签栏:移到顶部", + L10nKey::CmdTabBarMoveToLeftSidebar => "标签栏:移到左侧边栏", + L10nKey::CmdRightPanelInfo => "右侧面板:信息", + L10nKey::CmdRightPanelChanges => "右侧面板:变更", + L10nKey::CmdRightPanelFiles => "右侧面板:文件", + L10nKey::CmdChangeTheme => "更改主题…", + L10nKey::CmdResetFontSize => "重置字号", + L10nKey::CmdEnterFullScreen => "进入全屏", + L10nKey::CmdClearScrollback => "清除 scrollback", + L10nKey::CmdFindInTerminal => "在终端中查找…", + L10nKey::CmdFindNext => "查找下一个", + L10nKey::CmdFindPrevious => "查找上一个", + L10nKey::CmdCopy => "复制", + L10nKey::CmdCut => "剪切", + L10nKey::CmdPaste => "粘贴", + L10nKey::CmdSelectAll => "全选", + L10nKey::CmdSshAddConnection => "SSH:添加连接…", + L10nKey::CmdSshManageProfiles => "SSH:管理主机配置…", + L10nKey::CmdSshReconnect => "SSH:重新连接", + L10nKey::CmdSshRemoteFiles => "SSH:远程文件", + L10nKey::CmdSshPortForwarding => "SSH:端口转发", + L10nKey::CmdSshConnectWithInput => "SSH:连接 {input}", + L10nKey::CmdAgentSendSelection => "Agent:发送选区", + L10nKey::CmdAgentSendSelectionSubtitle => "选区 → 运行中的编码 agent", + L10nKey::CmdAgentSendGitDiffForReview => "Agent:发送 git diff 以供审查", + L10nKey::CmdAgentSendGitDiffSubtitle => "git diff → 运行中的编码 agent", + L10nKey::CmdSettings => "设置…", + L10nKey::CmdKeyboardShortcuts => "键盘快捷键", + L10nKey::CmdAboutTty7 => "关于 tty7", + L10nKey::CmdCheckForUpdates => "检查更新…", + L10nKey::CmdDocumentation => "文档", + L10nKey::CmdJoinDiscord => "加入 Discord", + L10nKey::CmdReportIssue => "报告问题…", + L10nKey::CmdRestartServer => "重启服务器…", + L10nKey::CmdRestartServerSubtitle => "结束所有运行中的 shell;保留布局", + L10nKey::CmdQuitTty7 => "退出 tty7", + L10nKey::CmdQuitTty7Subtitle => "shell 保持运行", + L10nKey::CmdQuickConnect => "连接到 \"{target}\"", + L10nKey::CmdQuickConnectSaveProfile => "将 \"{target}\" 保存为主机配置…", + L10nKey::CmdRecent => "最近使用", + L10nKey::AppRestartServerTitle => "重启服务器?", + L10nKey::AppRestartServerMismatchDetail => { + "正在运行你 shell 的服务器来自另一个构建(v{build},协议 {protocol};此应用使用 {ours})。你可以继续使用,shell 也会保留,但协议格式已变更的功能可能会表现异常,直到重启服务器。重启会启动一个干净的服务器:标签页会以全新的 shell 重新打开,其中正在运行的所有内容都会被终止。" + } + L10nKey::AppRestartServerOldDetail => { + "正在运行你 shell 的服务器来自应用的旧版本。你可以继续使用,shell 也会保留,但新功能可能会表现异常,直到重启服务器。重启会启动一个干净的服务器:标签页会以全新的 shell 重新打开,其中正在运行的所有内容都会被终止。" + } + L10nKey::AppKeepShells => "保留 Shell", + L10nKey::AppRestart => "重启", + L10nKey::AppRestartServerNotSsh => { + "tty7 只能重启通过 SSH 连接的机器上的服务器。{label} 由本机提供服务——请改为停止其工作区。" + } + L10nKey::AppRestartServerBody => { + "这会停止本机上所有正在运行的 shell——其中仍在运行的任何内容都会被终止。你的标签页和布局会被保留,并以全新的 shell 重新打开。" + } + L10nKey::AppWorktreeRemoveDetailDirty => { + "位于 {path} 的已关闭标签页的 worktree 有未提交的变更。" + } + L10nKey::AppWorktreeRemoveDetailClean => "位于 {path} 的已关闭标签页的 worktree 是干净的。", + L10nKey::AppWorktreeRemoveTitle => "删除 worktree\"{branch}\"?", + L10nKey::AppWorktreeDiscardAndRemove => "放弃变更并删除", + L10nKey::AppWorktreeRemove => "删除 worktree", + L10nKey::AppWorktreeKeep => "保留", + L10nKey::AppReopenTabFailed => "无法重新打开标签页:没有启动终端", + L10nKey::AppOpenTerminalFailed => "无法打开终端:{error}", + L10nKey::AppSshConnectionFailed => "SSH 连接失败:{error}", + L10nKey::AppSshReconnectFailed => "SSH 重新连接失败:{error}", + L10nKey::AppSplitPaneFailed => "无法拆分窗格:{error}", + L10nKey::AppWorktreeRemoved => "已删除 worktree\"{branch}\"", + L10nKey::AppWorktreeRemoveFailed => "删除 worktree 失败:{error}", + L10nKey::AppForkStillConnecting => "无法 fork:窗格仍在连接中", + L10nKey::AppPaneNoCodingAgent => "此窗格未运行编码 agent", + L10nKey::AppForkNoCommand => "tty7 没有用于 {name} 的 fork 命令", + L10nKey::AppForkLocalOnly => "{name} 会话只能从本地窗格 fork", + L10nKey::AppForkNoSessionId => { + "tty7 尚未在此窗格中看到 {name} 的会话 ID——请在设置 → Agents 中安装其 hook" + } + L10nKey::AppForkSessionIdNotToken => "{name} 的会话 ID 不是普通令牌", + L10nKey::AppForkMidTurn => "{name} 正在处理中——fork 不会包含进行中的这一轮", + L10nKey::AppTabNoWorkingDirectory => "此标签页还没有工作目录", + L10nKey::AppNothingSelected => "未选择任何内容——请先选择一些终端输出。", + L10nKey::AppPaneNoKnownDirectory => "此窗格没有已知的目录。", + L10nKey::AppNoUncommittedChanges => "{cwd} 中没有未提交的更改(或不是 git 仓库)。", + L10nKey::AppCmdSshProfileTitle => "SSH:{title}", + L10nKey::AppCmdSwitchToTab => "切换到标签页:{label}", + L10nKey::AppPlaceholderDescription => "描述", + L10nKey::AppPlaceholderSshQuickConnect => "user@host 或 user@host:port", + L10nKey::AppPlaceholderLoginShell => "登录 shell", + L10nKey::AppPlaceholderNone => "无", + L10nKey::AppPlaceholderOpenInDefaultApp => "在默认应用中打开", + L10nKey::AppThemeColorBackground => "背景", + L10nKey::AppThemeColorForeground => "前景", + L10nKey::AppThemeColorAccent => "强调色", + L10nKey::AppThemeColorCursor => "光标", + L10nKey::AppThemeColorSelection => "选区", + L10nKey::AppAgentHooksThisComputer => "本机", + L10nKey::AppAgentHooksRemoteMachine => "远程机器", + L10nKey::AppAgentHooksNoHomeDir => { + "tty7 无法确定这台计算机的主目录,因此没有可安装的位置。" + } + L10nKey::AppAgentHooksOffline => { + "未连接到这台机器,因此无法读取或写入其 agent 配置。请在其上打开一个工作区后再回来。" + } + L10nKey::AppAgentHooksHomeDirUnresolved => "无法解析主目录", + L10nKey::AppAgentHooksOpFailed => "失败:{error}", + L10nKey::AppKeybindingDisplacedNote => { + "{action} 占用了原属于 {previous} 的快捷键,{previous} 现在没有快捷键了。" + } + L10nKey::AppLocalServerName => "本地服务器", + L10nKey::AppSshParseUnbalancedQuotes => "SSH 命令中的引号不匹配", + L10nKey::AppSshParseNoRemoteCommands => "此处不支持远程命令", + L10nKey::AppSshParseFlagNeedsValue => "-{flag} 需要一个值", + L10nKey::AppSshParseInvalidPort => "无效端口 \"{value}\"", + L10nKey::AppSshParseUnsupportedOption => "不支持的选项 \"{option}\"", + L10nKey::AppSshParseEnterHost => "输入要连接的主机", + L10nKey::AppSshParseBadHost => "无法解析主机 \"{host}\"", + L10nKey::AppMenuMinimize => "最小化", + L10nKey::AppMenuZoom => "缩放", + L10nKey::SwitcherStatusRestarting => "正在重启…", + L10nKey::SwitcherStatusInstalling => "正在安装…", + L10nKey::SwitcherStatusConnecting => "正在连接…", + L10nKey::SwitcherStatusConnectFailed => "连接失败", + L10nKey::SwitcherStatusNotConnected => "未连接", + L10nKey::SettingsFontDefault => "默认(匹配主字体)", + L10nKey::ForwardDescriptionPlaceholder => "用途说明", + L10nKey::SettingsShellDefaultLoginShell => "你的登录 shell", + L10nKey::SftpErrorUnexpectedReply => "意外回复:{reply}", + L10nKey::SftpErrorUnsafeRemoteName => "拒绝不安全的远程名称 {name}", + L10nKey::SftpErrorInvalidOctalMode => "无效的八进制模式", + L10nKey::PanelMoreChangedFiles => "…还有 {count} 个变更文件——运行 `git diff` 查看。", + L10nKey::PanelUntracked => "{count} 个未跟踪文件", + L10nKey::AppMenuAbout => "关于 tty7", + L10nKey::AppMenuCheckForUpdates => "检查更新…", + L10nKey::AppMenuSettings => "设置…", + L10nKey::AppMenuServices => "服务", + L10nKey::AppMenuHideApp => "隐藏 tty7", + L10nKey::AppMenuHideOthers => "隐藏其他", + L10nKey::AppMenuShowAll => "显示全部", + L10nKey::AppMenuQuit => "退出 tty7", + L10nKey::AppMenuFile => "文件", + L10nKey::AppMenuEdit => "编辑", + L10nKey::AppMenuView => "视图", + L10nKey::AppMenuWindow => "窗口", + L10nKey::AppMenuHelp => "帮助", + L10nKey::AppMenuNewTab => "新标签页", + L10nKey::AppMenuNewWorkspace => "新工作区", + L10nKey::AppMenuNewWorktreeTab => "新 worktree 标签页", + L10nKey::AppMenuSplitRight => "向右分屏", + L10nKey::AppMenuSplitDown => "向下分屏", + L10nKey::AppMenuRenameTab => "重命名标签页…", + L10nKey::AppMenuCopyWorkingDirectory => "复制工作目录", + L10nKey::AppMenuCopySessionId => "复制会话 ID", + L10nKey::AppMenuForkSession => "Fork 会话", + L10nKey::AppMenuClosePaneTab => "关闭窗格 / 标签页", + L10nKey::AppMenuCloseOtherTabs => "关闭其他标签页", + L10nKey::AppMenuCloseTabsRight => "关闭右侧标签页", + L10nKey::AppMenuReopenClosedTab => "重新打开已关闭的标签页", + L10nKey::AppMenuRenameWorkspace => "重命名工作区…", + L10nKey::AppMenuStopWorkspace => "停止工作区…", + L10nKey::AppMenuDeleteWorkspace => "删除工作区…", + L10nKey::AppMenuUndo => "撤销", + L10nKey::AppMenuRedo => "重做", + L10nKey::AppMenuCut => "剪切", + L10nKey::AppMenuCopy => "复制", + L10nKey::AppMenuPaste => "粘贴", + L10nKey::AppMenuSelectAll => "全选", + L10nKey::AppMenuFind => "查找…", + L10nKey::AppMenuFindNext => "查找下一个", + L10nKey::AppMenuFindPrevious => "查找上一个", + L10nKey::AppMenuCommandPalette => "命令面板…", + L10nKey::AppMenuIncreaseFontSize => "增大字号", + L10nKey::AppMenuDecreaseFontSize => "减小字号", + L10nKey::AppMenuResetFontSize => "重置字号", + L10nKey::AppMenuLeftSidebar => "左侧边栏", + L10nKey::AppMenuRightPanel => "右侧面板", + L10nKey::AppMenuCodePanel => "代码面板", + L10nKey::AppMenuTabBarPosition => "标签栏位置", + L10nKey::AppMenuFocusNextPane => "聚焦下一个窗格", + L10nKey::AppMenuFocusPreviousPane => "聚焦上一个窗格", + L10nKey::AppMenuZoomPane => "缩放窗格", + L10nKey::AppMenuClearScrollback => "清除 scrollback", + L10nKey::AppMenuEnterFullscreen => "进入全屏", + L10nKey::AppMenuDocumentation => "tty7 文档", + L10nKey::AppMenuKeyboardShortcuts => "键盘快捷键", + L10nKey::AppMenuJoinDiscord => "加入 Discord", + L10nKey::AppMenuReportIssue => "报告问题…", + L10nKey::AppMenuRestartServer => "重启服务器…", + L10nKey::WindowUntitled => "未命名", + L10nKey::TrayShowTty7 => "显示 tty7", + L10nKey::TrayNotifications => "通知", + L10nKey::TrayAgentNeedsInput => "需要输入", + L10nKey::NotifyCommandFinished => "命令运行完成,用时 {secs} 秒", + L10nKey::NotifyCommandFinishedWithCommand => "{command} 已完成,用时 {secs} 秒", + L10nKey::NotifyAgentFinished => "已完成,用时 {secs} 秒", + L10nKey::NotifyAgentWaiting => "等待你的输入", + L10nKey::NotifyTurnFinished => "本轮已完成", + L10nKey::TabTooltipMore => "更多", + L10nKey::TabTooltipShowSidebar => "显示侧栏", + L10nKey::TabTooltipHideSidebar => "隐藏侧栏", + L10nKey::TabTooltipHideDetailPanel => "隐藏详情面板", + L10nKey::TabTooltipShowDetailPanel => "显示详情面板", + L10nKey::TabUnnamedShell => "终端 {n}", + L10nKey::ShellDefault => "默认", + L10nKey::SidebarScratchGroup => "草稿", + L10nKey::TabContextCloseTab => "关闭标签页", + L10nKey::TabContextCloseTabsBelow => "关闭下方标签页", + L10nKey::TabContextMarkUnread => "标记为未读", + }) +} + +pub fn translate_variant_zh(key: L10nKey, branch: &'static str) -> Option<&'static str> { + let res = match (key, branch) { + (L10nKey::SettingsAliasesLinked, "zero") => "还没有关联别名。", + (L10nKey::SettingsAliasesLinked, "one") => "已关联 1 个别名。", + (L10nKey::SettingsAliasesLinked, "other") => "已关联 {count} 个别名。", + (L10nKey::SettingsRulesOpenedWithConnection, "zero") => "0 条规则,随连接打开", + (L10nKey::SettingsRulesOpenedWithConnection, "one") => "1 条规则,随连接打开", + (L10nKey::SettingsRulesOpenedWithConnection, "other") => "{count} 条规则,随连接打开", + (L10nKey::SettingsOfflineMachines, "zero") => { + "还有 0 台已保存的机器未连接——在其中一台上打开工作区,即可在那台机器上安装 hook。" + } + (L10nKey::SettingsOfflineMachines, "one") => { + "还有 1 台已保存的机器未连接——在那台机器上打开工作区,即可在那里安装 hook。" + } + (L10nKey::SettingsOfflineMachines, "other") => { + "还有 {count} 台已保存的机器未连接——在其中一台上打开工作区,即可在那台机器上安装 hook。" + } + (L10nKey::PanelUntracked, "zero") => "0 个未跟踪文件", + (L10nKey::PanelUntracked, "one") => "1 个未跟踪文件", + (L10nKey::PanelUntracked, "other") => "{count} 个未跟踪文件", + (L10nKey::PanelMoreChangedFiles, "zero") => "…还有 0 个变更文件——运行 `git diff` 查看。", + (L10nKey::PanelMoreChangedFiles, "one") => "…还有 1 个变更文件——运行 `git diff` 查看。", + (L10nKey::PanelMoreChangedFiles, "other") => { + "…还有 {count} 个变更文件——运行 `git diff` 查看。" + } + (L10nKey::DiffChangedFiles, "zero") => "0 个变更文件", + (L10nKey::DiffChangedFiles, "one") => "1 个变更文件", + (L10nKey::DiffChangedFiles, "other") => "{count} 个变更文件", + (L10nKey::DiffUntrackedCount, "zero") => " · 0 个未跟踪文件", + (L10nKey::DiffUntrackedCount, "one") => " · 1 个未跟踪文件", + (L10nKey::DiffUntrackedCount, "other") => " · {count} 个未跟踪文件", + (L10nKey::DiffMoreFiles, "zero") => "…还有 0 个变更文件——在终端中运行 `git diff` 查看。", + (L10nKey::DiffMoreFiles, "one") => "…还有 1 个变更文件——在终端中运行 `git diff` 查看。", + (L10nKey::DiffMoreFiles, "other") => { + "…还有 {count} 个变更文件——在终端中运行 `git diff` 查看。" + } + (L10nKey::DiffUntrackedHeader, "zero") => "未跟踪文件 (0)", + (L10nKey::DiffUntrackedHeader, "one") => "未跟踪文件 (1)", + (L10nKey::DiffUntrackedHeader, "other") => "未跟踪文件 ({count})", + (L10nKey::DiffMoreUntracked, "zero") => "…还有 0 个——在终端中运行 `git status` 查看。", + (L10nKey::DiffMoreUntracked, "one") => "…还有 1 个——在终端中运行 `git status` 查看。", + (L10nKey::DiffMoreUntracked, "other") => { + "…还有 {count} 个——在终端中运行 `git status` 查看。" + } + (L10nKey::DiffUntrackedSummary, "zero") => "0 个未跟踪", + (L10nKey::DiffUntrackedSummary, "one") => "1 个未跟踪", + (L10nKey::DiffUntrackedSummary, "other") => "{count} 个未跟踪", + (L10nKey::HomeTimeMinutesAgo, "one") => "1 分钟前", + (L10nKey::HomeTimeMinutesAgo, "other") => "{count} 分钟前", + (L10nKey::HomeTimeHoursAgo, "one") => "1 小时前", + (L10nKey::HomeTimeHoursAgo, "other") => "{count} 小时前", + (L10nKey::HomeTimeDaysAgo, "one") => "1 天前", + (L10nKey::HomeTimeDaysAgo, "other") => "{count} 天前", + (L10nKey::WindowStopShells, "zero") => "其布局和工作目录将被清除。", + (L10nKey::WindowStopShells, "one") => "1 个正在运行的 shell 将会被终止。", + (L10nKey::WindowStopShells, "other") => "{count} 个正在运行的 shell 将会被终止。", + (L10nKey::WindowDeleteShells, "zero") => "其布局和工作目录将被清除。", + (L10nKey::WindowDeleteShells, "one") => { + "1 个正在运行的 shell 将会被终止,其布局也将被清除。" + } + (L10nKey::WindowDeleteShells, "other") => { + "{count} 个正在运行的 shell 将会被终止,布局也将被清除。" + } + _ => return None, + }; + Some(res) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn chinese_covers_every_key() { + assert_eq!(translate_zh(L10nKey::SearchTabs), Some("搜索标签页…")); + } +}