mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-27 08:02:36 +00:00
Merge pull request #915 from l0ng-ai/feat/settings-redesign
Redesign settings organization, search, and editing workflows
This commit is contained in:
@@ -63,7 +63,7 @@ Native builds for macOS, Windows, and Linux on [**Releases**](https://github.com
|
||||
## Supported agents
|
||||
|
||||
**Detection** is free: brand avatar, branch + diff, tab title.
|
||||
**Status** takes one click under Settings → Agents to install that agent's hook,
|
||||
**Status** takes one click under Settings → Integrations to install that agent's hook,
|
||||
and brings the status dot, notifications, the tray icon, `tty7 wait`, and resume
|
||||
after a reboot. **Fork** needs both — the agent's own fork command, and the hook
|
||||
that tells tty7 which session to fork.
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ macOS、Windows、Linux 的原生构建都在 [**Releases**](https://github.com/
|
||||
## 支持的 agent
|
||||
|
||||
**识别**无需配置:品牌头像、分支与 diff、标签页标题。
|
||||
**状态**需要在设置 → Agents 中为该 agent 安装 hook,一次点击,之后才有状态点、通知、托盘提醒、`tty7 wait` 和重启后恢复会话。
|
||||
**状态**需要在设置 → 集成 中为该 agent 安装 hook,一次点击,之后才有状态点、通知、托盘提醒、`tty7 wait` 和重启后恢复会话。
|
||||
**Fork** 两个条件都要:agent 自己提供 fork 命令,且 hook 已装——tty7 得知道 fork 的是哪个会话。
|
||||
|
||||
<details>
|
||||
|
||||
@@ -867,28 +867,25 @@ impl Config {
|
||||
}
|
||||
|
||||
pub fn save(&self) {
|
||||
if let Err(error) = self.try_save() {
|
||||
log::warn!("failed to save config: {error}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Persist without hiding a failure from an interactive settings editor.
|
||||
pub fn try_save(&self) -> std::io::Result<()> {
|
||||
if self.quarantined {
|
||||
// The file this instance stands in for could not be read, so what
|
||||
// the user wrote is still on disk — writing these defaults over it
|
||||
// is the wholesale loss #537 is about. The fix is to repair the
|
||||
// file; the next load that parses produces a writable config.
|
||||
log::warn!("not saving over a config file that failed to load; fix or remove it first");
|
||||
return;
|
||||
return Err(std::io::Error::other(
|
||||
"the existing configuration could not be read; repair it before saving",
|
||||
));
|
||||
}
|
||||
let Some(path) = Self::path() else {
|
||||
return;
|
||||
};
|
||||
let path = Self::path()
|
||||
.ok_or_else(|| std::io::Error::other("configuration directory is unavailable"))?;
|
||||
if let Some(parent) = path.parent() {
|
||||
let _ = std::fs::create_dir_all(parent);
|
||||
}
|
||||
match serde_json::to_string_pretty(self) {
|
||||
Ok(text) => {
|
||||
if let Err(e) = write_atomic(&path, text.as_bytes()) {
|
||||
log::warn!("failed to write config at {}: {e}", path.display());
|
||||
}
|
||||
}
|
||||
Err(e) => log::warn!("failed to serialize config: {e}"),
|
||||
std::fs::create_dir_all(parent)?;
|
||||
}
|
||||
let text = serde_json::to_string_pretty(self).map_err(std::io::Error::other)?;
|
||||
write_atomic(&path, text.as_bytes())
|
||||
}
|
||||
|
||||
fn path() -> Option<PathBuf> {
|
||||
|
||||
@@ -154,8 +154,7 @@ If you are an agent yourself, you are in that list too.
|
||||
|
||||
## Teaching an agent to do this
|
||||
|
||||
tty7 installs nothing into `~/.claude` for it — no switch in **Settings →
|
||||
Agents** writes a skill, and none ever will. What the agent needs to know ships
|
||||
tty7 installs nothing into `~/.claude` for it — no switch in **Settings → Integrations** writes a skill, and none ever will. What the agent needs to know ships
|
||||
in the repository instead, as a skill you install yourself:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -93,7 +93,7 @@ Live status — **working**, **needs your input**, **done** — comes from the a
|
||||
itself, over a channel tty7 installs into that agent's configuration. It powers
|
||||
the status dots, the notifications, the tray icon, and `tty7 wait`.
|
||||
|
||||
Installing takes one click per agent under **Settings → Agents**.
|
||||
Installing takes one click per agent under **Settings → Integrations**.
|
||||
[Status and notifications →](/agents/status)
|
||||
|
||||
## Where to go next
|
||||
|
||||
@@ -9,7 +9,7 @@ the agent say which one it is.
|
||||
|
||||
## Installing the hooks
|
||||
|
||||
**Settings → Agents** lists every agent that can report status, with an
|
||||
**Settings → Integrations** lists every agent that can report status, with an
|
||||
**Install** button beside each:
|
||||
|
||||
| Agent | |
|
||||
@@ -59,7 +59,7 @@ The same three states are what `tty7 agents` reports as `working` / `waiting` /
|
||||
|
||||
## Notifications
|
||||
|
||||
Two, both following your **Settings → Window & Tabs → Notifications** policy:
|
||||
Two, both following your **Settings → General → Notifications** policy:
|
||||
|
||||
- **"needs your permission…"** the moment an agent blocks on you
|
||||
- **"finished after 42s"** at the end of a turn
|
||||
|
||||
@@ -19,7 +19,7 @@ repository: a `SKILL.md` and two references — the full command table, and a
|
||||
delegation playbook the agent reads before handing work to another agent.
|
||||
|
||||
<Note>
|
||||
This is the only skill tty7 has — nothing in **Settings → Agents** installs
|
||||
This is the only skill tty7 has — nothing in **Settings → Integrations** installs
|
||||
one for you. Using the CLI to run *other* agents — a worker pane, `tty7 wait`,
|
||||
collecting the result — is covered separately.
|
||||
[Orchestration →](/agents/orchestration)
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Fonts"
|
||||
description: "The bundled default, fallback chains, ligatures, and why CJK needs a word."
|
||||
---
|
||||
|
||||
**Settings → Appearance → Typography** covers the everyday choices; the rest is
|
||||
**Settings → Appearance → Terminal text** covers the everyday choices; the rest is
|
||||
`config.json`.
|
||||
|
||||
| Setting | Default | |
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Keybindings"
|
||||
description: "Rebinding anything, chord sequences, and the tmux preset."
|
||||
---
|
||||
|
||||
**Settings → Keybindings** (<kbd>⌘ ,</kbd>) lists every shortcut in the app,
|
||||
**Settings → Keyboard & Mouse → Keyboard shortcuts** (<kbd>⌘ ,</kbd>) lists every shortcut in the app,
|
||||
grouped the same way the command palette is. The search box at the top of
|
||||
Settings reaches this page too: type what a feature is called — `split`,
|
||||
`commit`, `sftp` — and the page narrows to the shortcuts for it. Action names
|
||||
@@ -102,7 +102,7 @@ page.
|
||||
|
||||
## The tmux preset
|
||||
|
||||
**Settings → Keybindings → Preset → tmux** remaps pane and tab actions onto a
|
||||
**Settings → Keyboard & Mouse → Keyboard shortcuts → Preset → tmux** remaps pane and tab actions onto a
|
||||
prefix — <kbd>⌃ B</kbd> by default, changeable in the **Prefix** field beside
|
||||
it.
|
||||
|
||||
|
||||
@@ -14,33 +14,52 @@ section something is in.
|
||||
## The eight sections
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="General" icon="sliders">
|
||||
Interface language, startup and layout restore, tray icon, default terminal,
|
||||
command completion notifications, update preferences and proxy, and the
|
||||
tty7 server.
|
||||
</Card>
|
||||
<Card title="Appearance" icon="palette" href="/customization/themes">
|
||||
Theme, sync with system, typography, cursor, transparency, language.
|
||||
Theme and colors, interface and terminal fonts, cursor, background image,
|
||||
transparency, and inactive panes.
|
||||
</Card>
|
||||
<Card title="Terminal" icon="terminal">
|
||||
Shell and start directory, scrollback and scrolling, mouse, bell, per-pane
|
||||
history.
|
||||
Shell and starting directory, prompt editor, completion and command history,
|
||||
scrollback, scrolling, bell, and opening links and files.
|
||||
</Card>
|
||||
<Card title="Input" icon="keyboard">
|
||||
Prompt features, selection & clipboard, keyboard (Option as Meta), links.
|
||||
</Card>
|
||||
<Card title="SSH" icon="server" href="/remote/ssh">
|
||||
Hosts, defaults, security, and every per-profile field.
|
||||
</Card>
|
||||
<Card title="Agents" icon="robot" href="/agents/status">
|
||||
Hook installation per agent and per machine, and the CLI on PATH.
|
||||
<Card title="Keyboard & Mouse" icon="keyboard" href="/customization/keybindings">
|
||||
Keyboard shortcuts, Option as Meta, mouse behavior, selection, and clipboard.
|
||||
</Card>
|
||||
<Card title="Window & Tabs" icon="window-maximize">
|
||||
Startup window, tab bar position and grouping, notifications, tray icon.
|
||||
Tab position and placement, sidebar grouping, and diff previews.
|
||||
</Card>
|
||||
<Card title="Keybindings" icon="command" href="/customization/keybindings">
|
||||
Every shortcut, the tmux preset, the prefix.
|
||||
<Card title="SSH" icon="server" href="/remote/ssh">
|
||||
Hosts, connection defaults, security, authentication, proxies, and forwarding.
|
||||
</Card>
|
||||
<Card title="Integrations" icon="robot" href="/agents/status">
|
||||
AI agent hooks per machine and the tty7 command on PATH.
|
||||
</Card>
|
||||
<Card title="About" icon="circle-info" href="/reference/updates">
|
||||
Version, update channel, and the updater.
|
||||
App information, version, manual update checks, and available updates.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Search and edit
|
||||
|
||||
Search matches setting names, descriptions, English aliases, and configuration
|
||||
keys such as `mouse_zoom_modifier`. Ordinary results are editable directly;
|
||||
use the path above a result to open its category. SSH, theme editors, and
|
||||
keyboard shortcuts have dedicated views.
|
||||
|
||||
Use **Modified only** to find settings that differ from their defaults. A
|
||||
modified setting offers **Reset setting**; installation and maintenance actions
|
||||
do not have a generic reset.
|
||||
|
||||
Ordinary controls save automatically. Text fields commit valid values on Enter
|
||||
or when focus leaves the field. Custom theme edits are previewed until you save;
|
||||
cancel restores the original theme. SSH profiles also use explicit saving.
|
||||
Leaving an edited form offers save, discard, or continue editing.
|
||||
|
||||
## The settings file
|
||||
|
||||
Everything the Settings window writes goes to one file:
|
||||
@@ -75,7 +94,7 @@ The file is written atomically, and read forgivingly:
|
||||
|
||||
## Language
|
||||
|
||||
**Settings → Appearance → Language** switches the interface between English,
|
||||
**Settings → General → Language** switches the interface between English,
|
||||
简体中文, and 日本語. The choice is explicit — the system language is never
|
||||
inferred — and CLI output stays English regardless, so agent and script
|
||||
integrations keep a stable surface.
|
||||
|
||||
@@ -45,7 +45,7 @@ inheriting the active pane's directory either way.
|
||||
|
||||
## 3. macOS only: decide what Option does
|
||||
|
||||
**Settings → Input → Keyboard → Option (⌥) acts as Meta.**
|
||||
**Settings → Keyboard & Mouse → Keyboard → Option (⌥) acts as Meta.**
|
||||
|
||||
Off (the default), <kbd>⌥ B</kbd> types `∫`, which is what macOS has always
|
||||
done. On, it sends the escape chord shells expect, so <kbd>⌥ B</kbd> moves back
|
||||
@@ -54,7 +54,7 @@ leave it off if you type accented characters.
|
||||
|
||||
## 4. If you use coding agents, install the hooks
|
||||
|
||||
**Settings → Agents.** tty7 detects 22 coding CLIs by process name on its own —
|
||||
**Settings → Integrations.** tty7 detects 22 coding CLIs by process name on its own —
|
||||
you get brand avatars and tab labels for free. The *status dots*, the "needs
|
||||
your permission" notifications, and `tty7 wait` all need one more thing: a small
|
||||
hook the agent calls to report what it is doing.
|
||||
@@ -84,7 +84,7 @@ shells.
|
||||
|
||||
## 6. Tune the notifications
|
||||
|
||||
**Settings → Window & Tabs → Notifications.** By default tty7 posts a desktop
|
||||
**Settings → General → Notifications.** By default tty7 posts a desktop
|
||||
notification when a foreground command that ran longer than 10 seconds
|
||||
finishes — but only while the window is unfocused. Set **Notify on command
|
||||
finish** to *Never* or *Always*, and move the threshold if 10 seconds is the
|
||||
@@ -95,7 +95,7 @@ same policy.
|
||||
|
||||
## 7. Coming from tmux?
|
||||
|
||||
**Settings → Keybindings → Preset → tmux** remaps pane and tab actions onto a
|
||||
**Settings → Keyboard & Mouse → Keyboard shortcuts → Preset → tmux** remaps pane and tab actions onto a
|
||||
prefix, <kbd>⌃ B</kbd> by default. <kbd>⌃ B</kbd> <kbd>C</kbd> opens a tab,
|
||||
<kbd>⌃ B</kbd> <kbd>%</kbd> splits, <kbd>⌃ B</kbd> then an arrow moves focus.
|
||||
|
||||
|
||||
@@ -84,8 +84,7 @@ in some other terminal — open panes and read them back.
|
||||
uninstaller removes it again.
|
||||
|
||||
A `tty7` you installed yourself — a `cargo install` build, a package manager's
|
||||
copy — is never replaced. To turn the whole thing off, uncheck **Settings →
|
||||
Agents → Install the tty7 command on PATH**.
|
||||
copy — is never replaced. To turn the whole thing off, uncheck **Settings → Integrations → Install the tty7 command on PATH**.
|
||||
|
||||
<Tip>
|
||||
Inside a tty7 pane the CLI works regardless of PATH, because panes inherit the
|
||||
@@ -98,7 +97,7 @@ tty7 checks for updates every six hours and can update itself: **Settings →
|
||||
About → Check now**, then **Update and relaunch**. Releases are downloaded and
|
||||
verified in the background so applying one is just a restart.
|
||||
|
||||
Pick **Stable** or **Nightly** under **Settings → About → Update channel**. See
|
||||
Pick **Stable** or **Nightly** under **Settings → General → Updates → Update channel**. See
|
||||
[Updates and channels](/reference/updates) for what each feed publishes and how
|
||||
switching behaves.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Keyboard shortcuts"
|
||||
description: "Every default binding, plus the action names for rebinding."
|
||||
---
|
||||
|
||||
**Settings → Keybindings** (<kbd>⌘ ,</kbd>) is the live version of this page —
|
||||
**Settings → Keyboard & Mouse → Keyboard shortcuts** (<kbd>⌘ ,</kbd>) is the live version of this page —
|
||||
it shows what *your* copy is bound to. This is the shipped default.
|
||||
|
||||
## Tabs and workspaces
|
||||
|
||||
@@ -17,7 +17,7 @@ machine links exist. Most of what follows is a specific answer this gives you.
|
||||
|
||||
The CLI is put on PATH the first time the app launches. If it is missing:
|
||||
|
||||
- Check **Settings → Agents → Install the tty7 command on PATH** is on.
|
||||
- Check **Settings → Integrations → Install the tty7 command on PATH** is on.
|
||||
- On Unix it symlinks into whichever of `/opt/homebrew/bin`, `/usr/local/bin`,
|
||||
`~/.local/bin`, `~/bin`, `~/.cargo/bin` your PATH already covers — if none of
|
||||
those are on your PATH, add one.
|
||||
@@ -77,8 +77,8 @@ the local server already holds. Connect from the GUI first.
|
||||
Both are switches, and turning one off hands the key straight back to your
|
||||
shell:
|
||||
|
||||
- **Settings → Input → Prompt → Tab completion**
|
||||
- **Settings → Input → Prompt → History search**
|
||||
- **Settings → Terminal → Prompt & command history → Tab completion**
|
||||
- **Settings → Terminal → Prompt & command history → Command history search**
|
||||
|
||||
If they do nothing at all in a particular pane, the shell there probably has no
|
||||
[shell integration](/reference/shell-integration) — elvish, xonsh and friends
|
||||
@@ -157,7 +157,7 @@ on the far end) or for a local pane on **Windows**.
|
||||
|
||||
## <kbd>⌥ B</kbd> types `∫` instead of moving a word
|
||||
|
||||
That is macOS's default. Turn on **Settings → Input → Keyboard → Option (⌥) acts
|
||||
That is macOS's default. Turn on **Settings → Keyboard & Mouse → Keyboard → Option (⌥) acts
|
||||
as Meta**.
|
||||
|
||||
## CJK characters have a gap on the right
|
||||
@@ -187,7 +187,7 @@ If the file cannot be parsed, tty7 starts on defaults and keeps your original at
|
||||
## Selecting text inside vim / less selects the app's own thing
|
||||
|
||||
Hold <kbd>⇧</kbd> while dragging to keep the gesture local, or turn off
|
||||
**Settings → Terminal → Mouse → Report mouse to apps**.
|
||||
**Settings → Keyboard & Mouse → Mouse → Report mouse to apps**.
|
||||
|
||||
## `tty7 capture … | head -1` printed a Rust panic
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@ title: "Updates"
|
||||
description: "How tty7 updates itself, and what the two channels mean."
|
||||
---
|
||||
|
||||
**Settings → About** is where everything lives: the version you are on, the
|
||||
channel you follow, and the button that installs what is waiting.
|
||||
**Settings → About** shows your current version and lets you check for and
|
||||
install updates. **Settings → General → Updates** contains the update channel,
|
||||
automatic check and download preferences, and update proxy.
|
||||
|
||||
## How it works
|
||||
|
||||
@@ -33,7 +34,7 @@ Declining an update defers it rather than retiring it; it comes back later.
|
||||
|
||||
## Channels
|
||||
|
||||
**Settings → About → Update channel.**
|
||||
**Settings → General → Updates → Update channel.**
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|
||||
@@ -28,7 +28,7 @@ runs it. <kbd>Esc</kbd> closes without touching it.
|
||||
### Handing <kbd>⌃ R</kbd> back
|
||||
|
||||
If you already have an fzf, percol, atuin or McFly binding you like, turn off
|
||||
**Settings → Input → Prompt → History search** (`history_search: false`).
|
||||
**Settings → Terminal → Prompt & command history → Command history search** (`history_search: false`).
|
||||
<kbd>⌃ R</kbd> then goes to the shell, and whatever you bound there keeps
|
||||
working.
|
||||
|
||||
@@ -52,7 +52,7 @@ never seen still appears; it just arrives without a timestamp or an exit code.
|
||||
By default every pane shares your shell's history file, which is what a terminal
|
||||
has always done: a command typed in one pane is available in the next.
|
||||
|
||||
**Settings → Input → Prompt → Give each pane its own shell history**
|
||||
**Settings → Terminal → Prompt & command history → Separate command history per pane**
|
||||
(`per_pane_history: true`) changes that. Each pane gets a private history file:
|
||||
|
||||
- **seeded** from your real history when the pane opens, so it is not blank
|
||||
|
||||
@@ -24,7 +24,7 @@ running through it.
|
||||
|
||||
## The pointer
|
||||
|
||||
Under **Settings → Terminal → Mouse**:
|
||||
Under **Settings → Keyboard & Mouse → Mouse**:
|
||||
|
||||
| Setting | Default | What it does |
|
||||
|---|---|---|
|
||||
@@ -45,7 +45,7 @@ Under **Settings → Terminal → Mouse**:
|
||||
| <kbd>⌘ 0</kbd> | Back to the configured size |
|
||||
| <kbd>⌘</kbd> + wheel | Zoom by scrolling over a terminal |
|
||||
|
||||
The base size is **Settings → Appearance → Typography → Font size**, 15 px by
|
||||
The base size is **Settings → Appearance → Terminal text → Terminal font size**, 15 px by
|
||||
default. The rest of the interface has its own size — **Interface font size**,
|
||||
16 px, adjustable from 12 to 24 — so you can scale the chrome without touching
|
||||
the terminal grid, or the other way round.
|
||||
@@ -63,7 +63,7 @@ the terminal grid, or the other way round.
|
||||
|
||||
## Command-finished notifications
|
||||
|
||||
**Settings → Window & Tabs → Notifications** posts a desktop notification when a
|
||||
**Settings → General → Notifications** posts a desktop notification when a
|
||||
foreground command finishes:
|
||||
|
||||
- **Notify on command finish** — *Never*, *When unfocused* (default), or
|
||||
|
||||
@@ -42,8 +42,8 @@ build up first, and it carries across sessions and reboots.
|
||||
When tty7 has nothing useful to offer, the <kbd>⇥</kbd> falls through to your
|
||||
shell's own completion, so a carefully configured zsh setup is not lost.
|
||||
|
||||
To hand <kbd>⇥</kbd> back to the shell entirely, turn off **Settings → Input →
|
||||
Prompt → Tab completion** (`tab_completion` in `config.json`).
|
||||
To hand <kbd>⇥</kbd> back to the shell entirely, turn off **Settings → Terminal →
|
||||
Prompt & command history → Tab completion** (`tab_completion` in `config.json`).
|
||||
|
||||
## Syntax highlighting
|
||||
|
||||
@@ -63,7 +63,7 @@ The prompt behaves like a text field, because it is one:
|
||||
Everything readline does still works — this sits on top, it does not replace it.
|
||||
|
||||
<Tip>
|
||||
On macOS, turn on **Settings → Input → Keyboard → Option (⌥) acts as Meta** if
|
||||
On macOS, turn on **Settings → Keyboard & Mouse → Keyboard → Option (⌥) acts as Meta** if
|
||||
you want <kbd>⌥ B</kbd> / <kbd>⌥ F</kbd> to move by word instead of typing
|
||||
`∫` and `ƒ`.
|
||||
</Tip>
|
||||
@@ -126,12 +126,12 @@ to the shell:
|
||||
|
||||
| Setting | Key it releases |
|
||||
|---|---|
|
||||
| **Settings → Input → Prompt → Tab completion** | <kbd>⇥</kbd> → your shell's completion |
|
||||
| **Settings → Input → Prompt → History search** | <kbd>⌃ R</kbd> → your shell's reverse-i-search, or your fzf binding |
|
||||
| **Settings → Terminal → Prompt & command history → Tab completion** | <kbd>⇥</kbd> → your shell's completion |
|
||||
| **Settings → Terminal → Prompt & command history → Command history search** | <kbd>⌃ R</kbd> → your shell's reverse-i-search, or your fzf binding |
|
||||
|
||||
### Giving the whole prompt back to the shell
|
||||
|
||||
Turning off **Settings → Input → Prompt → Prompt editor**
|
||||
Turning off **Settings → Terminal → Prompt & command history → tty7 prompt editor**
|
||||
(`prompt_editor: false`) hands over not one key but the line itself. Every
|
||||
keystroke at the prompt — printable characters, arrows, IME commits, paste — goes
|
||||
straight to the PTY, and your shell's own line editor does the editing: zsh's
|
||||
|
||||
@@ -26,7 +26,7 @@ you are pointing at:
|
||||
| A bracket or quote | The matching pair, and everything between them |
|
||||
| CJK text | The word, segmented by dictionary rather than by character |
|
||||
|
||||
Turn it off with **Settings → Input → Selection & clipboard → Smart selection**.
|
||||
Turn it off with **Settings → Keyboard & Mouse → Selection & clipboard → Smart selection**.
|
||||
With it off, double-click falls back to plain word selection using the
|
||||
`word_separators` list from `config.json` — by default:
|
||||
|
||||
@@ -41,7 +41,7 @@ With it off, double-click falls back to plain word selection using the
|
||||
| Copy | <kbd>⌘ C</kbd> | <kbd>Ctrl ⇧ C</kbd> |
|
||||
| Paste | <kbd>⌘ V</kbd> | <kbd>Ctrl ⇧ V</kbd> · <kbd>⇧ Insert</kbd> |
|
||||
|
||||
Two settings shape what lands where, both under **Settings → Input → Selection
|
||||
Two settings shape what lands where, both under **Settings → Keyboard & Mouse → Selection
|
||||
& clipboard**:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
|
||||
+13
-2
@@ -21,8 +21,19 @@ impl Config {
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn save(&self) {
|
||||
assert_scratch_config_dir("Config::save");
|
||||
self.0.save();
|
||||
if let Err(error) = self.try_save() {
|
||||
log::warn!("failed to save config: {error}");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn try_save(&self) -> std::io::Result<()> {
|
||||
assert_scratch_config_dir("Config::try_save");
|
||||
// GUI tests have separate App globals but share the process's scratch
|
||||
// directory. Serialize their writes just as a real UI event loop does.
|
||||
static WRITE_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(());
|
||||
let _guard = WRITE_LOCK.lock().unwrap_or_else(|error| error.into_inner());
|
||||
self.0.try_save()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+482
-65
@@ -866,6 +866,7 @@ pub struct Tty7App {
|
||||
/// the live search matched, so exactly one row per page carries the anchor
|
||||
/// the page scrolls to.
|
||||
pub(crate) settings_hit_anchored: Cell<bool>,
|
||||
last_settings_location: (SettingsSection, gpui::Point<gpui::Pixels>),
|
||||
pub(crate) right_panel_width: Rc<Cell<f32>>,
|
||||
pub(crate) right_panel_dragging: Rc<Cell<bool>>,
|
||||
/// The docked document column's share of the terminal column, live. Held
|
||||
@@ -1501,6 +1502,7 @@ impl Tty7App {
|
||||
settings_row_width: Cell::new(f32::MAX),
|
||||
settings_viewport_w: Cell::new(f32::MAX),
|
||||
settings_hit_anchored: Cell::new(false),
|
||||
last_settings_location: (SettingsSection::General, gpui::point(px(0.), px(0.))),
|
||||
right_panel_width: Rc::new(Cell::new(right_panel_width)),
|
||||
right_panel_dragging: Rc::new(Cell::new(false)),
|
||||
document_ratio: Rc::new(Cell::new(document_ratio)),
|
||||
@@ -2174,7 +2176,7 @@ impl Tty7App {
|
||||
}
|
||||
let cfg = cx.global_mut::<Config>();
|
||||
cfg.font_size = size;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -2194,7 +2196,7 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
cfg.ui_font_size = size;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
// Unlike the settings that only redraw the window they were changed
|
||||
// in, this one re-lays-out every open window, and each reads the new
|
||||
// rem from the global on its own next frame.
|
||||
@@ -2227,7 +2229,7 @@ impl Tty7App {
|
||||
}
|
||||
let cfg = cx.global_mut::<Config>();
|
||||
cfg.line_height = mul;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -2240,6 +2242,13 @@ impl Tty7App {
|
||||
}
|
||||
|
||||
pub(crate) fn set_preset(&mut self, id: &str, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if self.theme_draft_dirty() {
|
||||
let id = id.to_string();
|
||||
self.with_settings_edits_resolved(window, cx, move |this, window, cx| {
|
||||
this.set_preset(&id, window, cx)
|
||||
});
|
||||
return;
|
||||
}
|
||||
// A confirmed pick ends any preview: there is nothing left to roll back.
|
||||
self.theme_preview_restore = None;
|
||||
self.write_preset(id, cx);
|
||||
@@ -2287,6 +2296,13 @@ impl Tty7App {
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
if self.theme_draft_dirty() {
|
||||
let id = id.to_string();
|
||||
self.with_settings_edits_resolved(window, cx, move |this, window, cx| {
|
||||
this.set_slot_preset(dark_slot, &id, window, cx)
|
||||
});
|
||||
return;
|
||||
}
|
||||
let cfg = cx.global_mut::<Config>();
|
||||
if dark_slot {
|
||||
cfg.theme_preset_dark = id.to_string();
|
||||
@@ -2302,6 +2318,12 @@ impl Tty7App {
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
if self.theme_draft_dirty() {
|
||||
self.with_settings_edits_resolved(window, cx, move |this, window, cx| {
|
||||
this.set_theme_follow_system(on, window, cx)
|
||||
});
|
||||
return;
|
||||
}
|
||||
if on {
|
||||
let manual = cx.global::<Config>().theme_preset.clone();
|
||||
let manual_dark = crate::ui::presets::by_id(cx, &manual).dark;
|
||||
@@ -2354,7 +2376,7 @@ impl Tty7App {
|
||||
apply_theme(Some(window), cx);
|
||||
set_menus(cx);
|
||||
if persist {
|
||||
cx.global::<Config>().save();
|
||||
self.persist_settings_config(cx);
|
||||
}
|
||||
self.rebuild_theme_editor(window, cx);
|
||||
self.sync_window_opacity_slider(window, cx);
|
||||
@@ -2456,6 +2478,54 @@ impl Tty7App {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn theme_draft_dirty(&self) -> bool {
|
||||
self.active_settings()
|
||||
.is_some_and(|s| s.theme_draft.is_some())
|
||||
}
|
||||
|
||||
pub(crate) fn save_theme_draft(&mut self, window: &mut Window, cx: &mut Context<Self>) -> bool {
|
||||
let Some((_, draft)) = self.active_settings().and_then(|s| s.theme_draft.clone()) else {
|
||||
return true;
|
||||
};
|
||||
if let Err(error) = crate::ui::presets::write_theme_file(&draft) {
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.theme_draft_error = Some(error.to_string());
|
||||
}
|
||||
crate::ui::host_ops::HostOps::notify_err(
|
||||
window,
|
||||
cx,
|
||||
t(L10nKey::ThemeSaveFailed),
|
||||
&error,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.theme_draft = None;
|
||||
s.theme_draft_error = None;
|
||||
}
|
||||
cx.notify();
|
||||
true
|
||||
}
|
||||
|
||||
pub(crate) fn cancel_theme_draft(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.theme_draft_error = None;
|
||||
}
|
||||
if let Some((original, _)) = self
|
||||
.active_settings_mut()
|
||||
.and_then(|s| s.theme_draft.take())
|
||||
{
|
||||
let mut themes = crate::ui::presets::all(cx);
|
||||
if let Some(slot) = themes.iter_mut().find(|t| t.id == original.id) {
|
||||
*slot = original;
|
||||
}
|
||||
cx.set_global(crate::ui::presets::Themes(themes));
|
||||
apply_theme(Some(window), cx);
|
||||
self.rebuild_theme_editor(window, cx);
|
||||
cx.notify();
|
||||
}
|
||||
}
|
||||
|
||||
fn mutate_active_theme(
|
||||
&mut self,
|
||||
mutate: impl FnOnce(&mut crate::ui::presets::Theme),
|
||||
@@ -2468,14 +2538,35 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
mutate(&mut theme);
|
||||
if let Err(e) = crate::ui::presets::write_theme_file(&theme) {
|
||||
// Every colour edit runs through here. Without this the picker
|
||||
// moves, the theme does not, and nothing says why.
|
||||
log::warn!("failed to write theme file: {e}");
|
||||
crate::ui::host_ops::HostOps::notify_err(window, cx, t(L10nKey::ThemeSaveFailed), &e);
|
||||
return;
|
||||
if let Some(state) = self.active_settings_mut() {
|
||||
let original = state
|
||||
.theme_draft
|
||||
.as_ref()
|
||||
.filter(|(original, _)| original.id == id)
|
||||
.map(|(original, _)| original.clone())
|
||||
.unwrap_or_else(|| crate::ui::presets::by_id(cx, &id));
|
||||
if crate::ui::presets::to_yaml(&original) == crate::ui::presets::to_yaml(&theme) {
|
||||
state.theme_draft = None;
|
||||
} else {
|
||||
state.theme_draft = Some((original, theme.clone()));
|
||||
}
|
||||
let mut themes = crate::ui::presets::all(cx);
|
||||
if let Some(slot) = themes.iter_mut().find(|t| t.id == id) {
|
||||
*slot = theme;
|
||||
}
|
||||
cx.set_global(crate::ui::presets::Themes(themes));
|
||||
} else {
|
||||
if let Err(error) = crate::ui::presets::write_theme_file(&theme) {
|
||||
crate::ui::host_ops::HostOps::notify_err(
|
||||
window,
|
||||
cx,
|
||||
t(L10nKey::ThemeSaveFailed),
|
||||
&error,
|
||||
);
|
||||
return;
|
||||
}
|
||||
crate::ui::presets::load_registry(cx);
|
||||
}
|
||||
crate::ui::presets::load_registry(cx);
|
||||
apply_theme(Some(window), cx);
|
||||
cx.notify();
|
||||
}
|
||||
@@ -2519,7 +2610,7 @@ impl Tty7App {
|
||||
) {
|
||||
cx.global_mut::<Config>().window_opacity = Some(v.clamp(0.2, 1.0));
|
||||
apply_theme(Some(window), cx);
|
||||
cx.global::<Config>().save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -2531,7 +2622,7 @@ impl Tty7App {
|
||||
) {
|
||||
cx.global_mut::<Config>().window_blur = Some(on);
|
||||
apply_theme(Some(window), cx);
|
||||
cx.global::<Config>().save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -2544,7 +2635,7 @@ impl Tty7App {
|
||||
) {
|
||||
cx.global_mut::<Config>().window_backdrop = backdrop;
|
||||
apply_theme(Some(window), cx);
|
||||
cx.global::<Config>().save();
|
||||
self.persist_settings_config(cx);
|
||||
// A material changes the default opacity (SYSTEM_MATERIAL_OPACITY
|
||||
// vs 1.0), so the slider must track the new effective value.
|
||||
self.sync_window_opacity_slider(window, cx);
|
||||
@@ -2562,7 +2653,7 @@ impl Tty7App {
|
||||
clear_window_override_values(config, cfg!(target_os = "windows"));
|
||||
}
|
||||
apply_theme(Some(window), cx);
|
||||
cx.global::<Config>().save();
|
||||
self.persist_settings_config(cx);
|
||||
self.sync_window_opacity_slider(window, cx);
|
||||
#[cfg(target_os = "windows")]
|
||||
self.sync_window_backdrop_select(window, cx);
|
||||
@@ -2760,7 +2851,7 @@ impl Tty7App {
|
||||
}
|
||||
let cfg = cx.global_mut::<Config>();
|
||||
cfg.font_features = features;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -2783,15 +2874,42 @@ impl Tty7App {
|
||||
self.apply_terminal_config_to_panes(&cfg, cx);
|
||||
}
|
||||
|
||||
pub(crate) fn persist_settings_config(&mut self, cx: &mut Context<Self>) {
|
||||
let config = cx.global::<Config>().clone();
|
||||
let error = config.try_save().err().map(|error| error.to_string());
|
||||
if let Some(message) = &error {
|
||||
log::warn!("failed to save settings: {message}");
|
||||
}
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
if error.is_none() {
|
||||
s.saved_config = config;
|
||||
}
|
||||
s.save_error = error;
|
||||
}
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
pub(crate) fn discard_unsaved_settings(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
let snapshot = self
|
||||
.active_settings()
|
||||
.filter(|s| s.save_error.is_some())
|
||||
.map(|s| s.saved_config.clone());
|
||||
if let Some(snapshot) = snapshot {
|
||||
cx.set_global(snapshot);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.save_error = None;
|
||||
}
|
||||
self.reload_from_config(window, cx);
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn update_config(
|
||||
&mut self,
|
||||
cx: &mut Context<Self>,
|
||||
mutate: impl FnOnce(&mut Config),
|
||||
) {
|
||||
let cfg = cx.global_mut::<Config>();
|
||||
mutate(cfg);
|
||||
cfg.save();
|
||||
cx.notify();
|
||||
mutate(cx.global_mut::<Config>());
|
||||
self.persist_settings_config(cx);
|
||||
}
|
||||
|
||||
pub(crate) fn set_link_url(&mut self, on: bool, cx: &mut Context<Self>) {
|
||||
@@ -5586,6 +5704,246 @@ impl Tty7App {
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn reset_settings_value(
|
||||
&mut self,
|
||||
title: L10nKey,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
let defaults = Config::default();
|
||||
match title {
|
||||
L10nKey::SettingsDimInactivePanes => {
|
||||
self.set_dim_inactive_panes(defaults.dim_inactive_panes, cx)
|
||||
}
|
||||
L10nKey::SettingsCursorBlink => self.set_cursor_blink(defaults.cursor_blink, cx),
|
||||
L10nKey::SettingsCursorShape => self.set_cursor_style(defaults.cursor_style, cx),
|
||||
L10nKey::SettingsScrollback => self.set_scrollback_limit(defaults.scrollback_limit, cx),
|
||||
L10nKey::SettingsNewTabPosition => {
|
||||
self.set_new_tab_position(defaults.new_tab_position, cx)
|
||||
}
|
||||
L10nKey::SettingsTabBarPosition => {
|
||||
self.set_tab_bar_position(defaults.tab_bar_position, cx)
|
||||
}
|
||||
L10nKey::SettingsSidebarGrouping => {
|
||||
self.set_sidebar_grouping(defaults.sidebar_grouping, cx)
|
||||
}
|
||||
L10nKey::SettingsDiffPreviewFromCounts => {
|
||||
self.set_sidebar_diff_preview(defaults.sidebar_diff_preview, cx)
|
||||
}
|
||||
L10nKey::SettingsNotifyOnCommandFinish => {
|
||||
self.set_notify_mode(defaults.notify_on_command_finish, cx)
|
||||
}
|
||||
L10nKey::SettingsNotifyThreshold => {
|
||||
self.set_notify_threshold(defaults.notify_threshold_secs, cx)
|
||||
}
|
||||
L10nKey::SettingsTerminalBell => self.set_bell_mode(defaults.bell, cx),
|
||||
L10nKey::SettingsRestoreLastLayout => {
|
||||
self.set_restore_session(defaults.restore_session, cx)
|
||||
}
|
||||
L10nKey::SettingsPerPaneHistory => {
|
||||
self.set_per_pane_history(defaults.per_pane_history, cx)
|
||||
}
|
||||
L10nKey::SettingsShowTrayIcon => self.set_show_tray_icon(defaults.show_tray_icon, cx),
|
||||
L10nKey::SettingsOptionAsMeta => {
|
||||
self.set_macos_option_as_alt(defaults.macos_option_as_alt, cx)
|
||||
}
|
||||
L10nKey::SettingsHideMouseWhileTyping => {
|
||||
self.set_mouse_hide_while_typing(defaults.mouse_hide_while_typing, cx)
|
||||
}
|
||||
L10nKey::SettingsFocusFollowsMouse => {
|
||||
self.set_focus_follows_mouse(defaults.focus_follows_mouse, cx)
|
||||
}
|
||||
L10nKey::SettingsReportMouseToApps => {
|
||||
self.set_mouse_reporting(defaults.mouse_reporting, cx)
|
||||
}
|
||||
L10nKey::SettingsScrollSpeed => {
|
||||
self.set_mouse_scroll_multiplier(defaults.mouse_scroll_multiplier, cx)
|
||||
}
|
||||
L10nKey::SettingsSmoothScroll => self.set_smooth_scroll(defaults.smooth_scroll, cx),
|
||||
L10nKey::SettingsMouseZoom => {
|
||||
self.set_mouse_zoom_modifier(defaults.mouse_zoom_modifier, cx)
|
||||
}
|
||||
L10nKey::SettingsTrimTrailingSpaces => {
|
||||
self.set_clipboard_trim(defaults.clipboard_trim_trailing_spaces, cx)
|
||||
}
|
||||
L10nKey::SettingsCopyOnSelect => self.set_copy_on_select(defaults.copy_on_select, cx),
|
||||
L10nKey::SettingsSmartSelection => self.set_smart_select(defaults.smart_select, cx),
|
||||
L10nKey::SettingsPromptEditor => self.set_prompt_editor(defaults.prompt_editor, cx),
|
||||
L10nKey::SettingsTabCompletion => self.set_tab_completion(defaults.tab_completion, cx),
|
||||
L10nKey::SettingsHistorySearch => self.set_history_search(defaults.history_search, cx),
|
||||
L10nKey::SettingsStartupWindow => self.set_startup_mode(defaults.startup_mode, cx),
|
||||
L10nKey::SettingsRememberWindowSize => {
|
||||
self.set_remember_window_size(defaults.remember_window_size, cx)
|
||||
}
|
||||
L10nKey::SettingsCheckUpdatesOnLaunch => {
|
||||
self.set_check_for_updates(defaults.check_for_updates, cx)
|
||||
}
|
||||
L10nKey::SettingsAutoDownload => {
|
||||
self.set_auto_download_updates(defaults.auto_download_updates, cx)
|
||||
}
|
||||
L10nKey::SettingsUpdateChannel => self.set_update_channel(defaults.update_channel, cx),
|
||||
L10nKey::DetectUrls => self.set_link_url(defaults.link_url, cx),
|
||||
L10nKey::ForwardSshLoopbackLinks => {
|
||||
self.set_ssh_loopback_forward(defaults.ssh_loopback_forward, cx)
|
||||
}
|
||||
L10nKey::SettingsVerifyHostKeys => {
|
||||
self.set_verify_host_keys(defaults.verify_host_keys, cx)
|
||||
}
|
||||
L10nKey::WarnBeforeClosing => {
|
||||
self.set_ssh_warn_on_close(defaults.ssh_warn_on_close, cx)
|
||||
}
|
||||
L10nKey::SettingsLanguage => self.set_gui_language(
|
||||
Self::normalize_gui_language(&defaults.gui_language),
|
||||
window,
|
||||
cx,
|
||||
),
|
||||
L10nKey::SettingsFontSize => self.reset_font_size(cx),
|
||||
L10nKey::SettingsUiFontSize => self.reset_ui_font_size(cx),
|
||||
L10nKey::SettingsLineHeight => self.reset_line_height(cx),
|
||||
L10nKey::SettingsFontFamily => {
|
||||
self.commit_font_family(defaults.font_family.clone(), cx)
|
||||
}
|
||||
L10nKey::SettingsBoldFont => self.commit_font_family_emphasis(
|
||||
true,
|
||||
crate::ui::settings::font_default_label().to_string(),
|
||||
cx,
|
||||
),
|
||||
L10nKey::SettingsItalicFont => self.commit_font_family_emphasis(
|
||||
false,
|
||||
crate::ui::settings::font_default_label().to_string(),
|
||||
cx,
|
||||
),
|
||||
L10nKey::SettingsUiFontFamily => self.commit_ui_font_family(
|
||||
crate::ui::settings::ui_font_default_label().to_string(),
|
||||
window,
|
||||
cx,
|
||||
),
|
||||
L10nKey::SettingsSyncWithSystem => {
|
||||
self.set_theme_follow_system(defaults.theme_follow_system, window, cx)
|
||||
}
|
||||
L10nKey::SettingsLegiblePalette => {
|
||||
self.set_theme_legible_palette(defaults.theme_legible_palette, window, cx)
|
||||
}
|
||||
L10nKey::SettingsOpacity => {
|
||||
self.update_config(cx, |cfg| cfg.window_opacity = None);
|
||||
apply_theme(Some(window), cx);
|
||||
}
|
||||
L10nKey::SettingsBlur => {
|
||||
self.update_config(cx, |cfg| cfg.window_blur = None);
|
||||
apply_theme(Some(window), cx);
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
L10nKey::SettingsBackdrop => {
|
||||
self.set_window_backdrop(defaults.window_backdrop, window, cx)
|
||||
}
|
||||
L10nKey::SettingsFontLigatures => self.set_font_ligatures(
|
||||
defaults
|
||||
.font_features
|
||||
.as_ref()
|
||||
.is_some_and(|f| f.is_calt_enabled() == Some(true)),
|
||||
cx,
|
||||
),
|
||||
L10nKey::OpenFilesWith => {
|
||||
self.update_config(cx, |cfg| cfg.link_file_open = defaults.link_file_open);
|
||||
}
|
||||
L10nKey::SettingsProgram => {
|
||||
self.update_config(cx, |cfg| cfg.shell = defaults.shell.clone())
|
||||
}
|
||||
L10nKey::SettingsArguments => self.update_config(cx, |cfg| {
|
||||
if let Some(shell) = &mut cfg.shell {
|
||||
shell.args.clear();
|
||||
}
|
||||
}),
|
||||
L10nKey::SettingsStartIn => self.update_config(cx, |cfg| {
|
||||
cfg.working_directory.strategy = defaults.working_directory.strategy
|
||||
}),
|
||||
L10nKey::SettingsCustomPath => self.update_config(cx, |cfg| {
|
||||
cfg.working_directory.path = defaults.working_directory.path.clone()
|
||||
}),
|
||||
L10nKey::SettingsAppHttpProxy => {
|
||||
self.update_config(cx, |cfg| cfg.http_proxy = defaults.http_proxy.clone())
|
||||
}
|
||||
L10nKey::SettingsOpenFilesCommand => self.update_config(cx, |cfg| {
|
||||
cfg.link_file_command = defaults.link_file_command.clone()
|
||||
}),
|
||||
_ => return,
|
||||
}
|
||||
self.refresh_settings_controls(title, window, cx);
|
||||
}
|
||||
|
||||
fn refresh_settings_controls(
|
||||
&mut self,
|
||||
title: L10nKey,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
let mut subs = Vec::new();
|
||||
match title {
|
||||
L10nKey::SettingsFontFamily
|
||||
| L10nKey::SettingsBoldFont
|
||||
| L10nKey::SettingsItalicFont
|
||||
| L10nKey::SettingsUiFontFamily => {
|
||||
let (font, bold, italic, ui) = self.build_font_selects(&mut subs, window, cx);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.font_select = font;
|
||||
s.font_bold_select = bold;
|
||||
s.font_italic_select = italic;
|
||||
s.ui_font_select = ui;
|
||||
}
|
||||
}
|
||||
L10nKey::SettingsLanguage => {
|
||||
let value = self.build_language_select(&mut subs, window, cx);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.language_select = value;
|
||||
}
|
||||
}
|
||||
L10nKey::SettingsProgram | L10nKey::SettingsArguments => {
|
||||
let (program, args, _) = self.build_shell_inputs(&mut subs, window, cx);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.shell_program_input = program;
|
||||
s.shell_args_input = args;
|
||||
}
|
||||
}
|
||||
L10nKey::SettingsCustomPath => {
|
||||
let value = cx.global::<Config>().working_directory.path.clone();
|
||||
if let Some(s) = self.active_settings() {
|
||||
s.wd_path_input
|
||||
.clone()
|
||||
.update(cx, |s, cx| s.set_value(value, window, cx));
|
||||
}
|
||||
}
|
||||
L10nKey::SettingsOpenFilesCommand => {
|
||||
let value = self.build_link_file_command_input(&mut subs, window, cx);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.link_file_command_input = value;
|
||||
}
|
||||
}
|
||||
L10nKey::SettingsAppHttpProxy => {
|
||||
let value = self.build_http_proxy_input(&mut subs, window, cx);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.http_proxy_input = value;
|
||||
}
|
||||
}
|
||||
L10nKey::SettingsScrollSpeed => {
|
||||
let value = self.build_scroll_slider(&mut subs, window, cx);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.scroll_slider = value;
|
||||
}
|
||||
}
|
||||
L10nKey::SettingsOpacity | L10nKey::SettingsBlur | L10nKey::SettingsBackdrop => {
|
||||
let value = self.build_window_opacity_slider(&mut subs, window, cx);
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s.window_opacity_slider = value;
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
if let Some(s) = self.active_settings_mut() {
|
||||
s._subs.extend(subs);
|
||||
}
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
fn toggle_settings(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if self.settings.is_some() {
|
||||
self.close_settings_checked(window, cx);
|
||||
@@ -5630,6 +5988,16 @@ impl Tty7App {
|
||||
}),
|
||||
);
|
||||
|
||||
let shortcut_search = cx
|
||||
.new(|cx| InputState::new(window, cx).placeholder(t(L10nKey::SettingsNavKeybindings)));
|
||||
subs.push(
|
||||
cx.subscribe_in(&shortcut_search, window, |_, _, ev, _, cx| {
|
||||
if matches!(ev, InputEvent::Change) {
|
||||
cx.notify();
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
let ssh_filter = cx.new(|cx| {
|
||||
InputState::new(window, cx).placeholder(t(crate::ui::i18n::L10nKey::FilterHosts))
|
||||
});
|
||||
@@ -5653,12 +6021,20 @@ impl Tty7App {
|
||||
);
|
||||
|
||||
let content_scroll = gpui::ScrollHandle::new();
|
||||
content_scroll.set_offset(self.last_settings_location.1);
|
||||
let search_anchor = gpui::ScrollAnchor::for_handle(content_scroll.clone());
|
||||
|
||||
self.settings = Some(SettingsState {
|
||||
focus_handle: focus_handle.clone(),
|
||||
section: SettingsSection::Appearance,
|
||||
section: self.last_settings_location.0,
|
||||
search: settings_search,
|
||||
shortcut_search,
|
||||
modified_only: false,
|
||||
search_active: false,
|
||||
search_return_offset: self.last_settings_location.1,
|
||||
search_selection: 0,
|
||||
search_rows: std::cell::RefCell::new(None),
|
||||
focused_setting: None,
|
||||
content_scroll,
|
||||
ssh_master_scroll: gpui::ScrollHandle::new(),
|
||||
ssh_detail_scroll: gpui::ScrollHandle::new(),
|
||||
@@ -5680,6 +6056,10 @@ impl Tty7App {
|
||||
scroll_slider,
|
||||
window_opacity_slider,
|
||||
theme_editor: None,
|
||||
theme_draft: None,
|
||||
theme_draft_error: None,
|
||||
save_error: None,
|
||||
saved_config: cx.global::<Config>().clone(),
|
||||
theme_panel_open: false,
|
||||
theme_panel_slot: crate::ui::settings::ThemeSlot::Manual,
|
||||
theme_search,
|
||||
@@ -5929,7 +6309,7 @@ impl Tty7App {
|
||||
cfg.gui_language = code.to_string();
|
||||
}
|
||||
set_locale(code);
|
||||
cx.global::<Config>().save();
|
||||
self.persist_settings_config(cx);
|
||||
set_menus(cx);
|
||||
// Explorer reads its menu wording from the registry, so it is the one
|
||||
// surface a language change does not reach on its own. No-op unless
|
||||
@@ -6141,7 +6521,7 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
cfg.http_proxy = value;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -6165,7 +6545,7 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
cfg.link_file_command = command;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -6183,13 +6563,18 @@ impl Tty7App {
|
||||
.step(0.01)
|
||||
.default_value(eff)
|
||||
});
|
||||
subs.push(
|
||||
cx.subscribe_in(&slider, window, |this, _s, ev: &SliderEvent, window, cx| {
|
||||
if let SliderEvent::Change(v) = ev {
|
||||
this.set_window_opacity(v.start(), window, cx);
|
||||
subs.push(cx.subscribe_in(
|
||||
&slider,
|
||||
window,
|
||||
|this, _s, ev: &SliderEvent, window, cx| match ev {
|
||||
SliderEvent::Change(v) => {
|
||||
cx.global_mut::<Config>().window_opacity = Some(v.start().clamp(0.2, 1.0));
|
||||
apply_theme(Some(window), cx);
|
||||
cx.notify();
|
||||
}
|
||||
}),
|
||||
);
|
||||
SliderEvent::Release(_) => this.persist_settings_config(cx),
|
||||
},
|
||||
));
|
||||
slider
|
||||
}
|
||||
|
||||
@@ -6210,17 +6595,27 @@ impl Tty7App {
|
||||
subs.push(cx.subscribe_in(
|
||||
&scroll_slider,
|
||||
window,
|
||||
|this, _s, ev: &SliderEvent, _w, cx| {
|
||||
if let SliderEvent::Change(v) = ev {
|
||||
this.set_mouse_scroll_multiplier(v.start(), cx);
|
||||
|this, _s, ev: &SliderEvent, _w, cx| match ev {
|
||||
SliderEvent::Change(v) => {
|
||||
cx.global_mut::<Config>().mouse_scroll_multiplier = v.start().clamp(0.1, 10.0);
|
||||
cx.notify();
|
||||
}
|
||||
SliderEvent::Release(_) => this.persist_settings_config(cx),
|
||||
},
|
||||
));
|
||||
scroll_slider
|
||||
}
|
||||
|
||||
pub(crate) fn close_settings(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if self.settings.take().is_some() {
|
||||
if let Some(s) = self.settings.take() {
|
||||
self.last_settings_location = (
|
||||
s.section,
|
||||
if s.search_active {
|
||||
s.search_return_offset
|
||||
} else {
|
||||
s.content_scroll.offset()
|
||||
},
|
||||
);
|
||||
self.focus_active(window, cx);
|
||||
cx.notify();
|
||||
}
|
||||
@@ -6235,7 +6630,21 @@ impl Tty7App {
|
||||
if self.settings.is_none() {
|
||||
self.toggle_settings(window, cx);
|
||||
}
|
||||
self.select_settings_section(section, cx);
|
||||
self.navigate_settings(section, None, window, cx);
|
||||
}
|
||||
|
||||
/// Resolve a pending form before performing both parts of an external
|
||||
/// navigation. Opening the page and loading its form must be one action.
|
||||
pub(crate) fn open_ssh_profile_form(
|
||||
&mut self,
|
||||
profile: crate::core::ssh_profile::SshProfile,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
self.with_settings_edits_resolved(window, cx, move |this, window, cx| {
|
||||
this.open_settings_section(SettingsSection::Ssh, window, cx);
|
||||
this.ssh_form_load(&profile, window, cx);
|
||||
});
|
||||
}
|
||||
|
||||
pub(crate) fn open_ssh_profile_in_settings(
|
||||
@@ -6244,16 +6653,21 @@ impl Tty7App {
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
self.open_settings_section(SettingsSection::Ssh, window, cx);
|
||||
if let Some(profile) = cx
|
||||
.global::<Config>()
|
||||
.ssh_profiles
|
||||
.iter()
|
||||
.find(|p| p.id == id)
|
||||
.cloned()
|
||||
{
|
||||
self.ssh_form_load(&profile, window, cx);
|
||||
}
|
||||
self.with_settings_edits_resolved(window, cx, move |this, window, cx| {
|
||||
// Read after resolving edits, so saving and reopening the same
|
||||
// profile cannot load a snapshot from before that save.
|
||||
if let Some(profile) = cx
|
||||
.global::<Config>()
|
||||
.ssh_profiles
|
||||
.iter()
|
||||
.find(|p| p.id == id)
|
||||
.cloned()
|
||||
{
|
||||
this.open_ssh_profile_form(profile, window, cx);
|
||||
} else {
|
||||
this.open_settings_section(SettingsSection::Ssh, window, cx);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
pub(crate) fn open_ssh_profile_new_from_target(
|
||||
@@ -6262,7 +6676,6 @@ impl Tty7App {
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
self.open_settings_section(SettingsSection::Ssh, window, cx);
|
||||
let mut profile = crate::core::ssh_profile::SshProfile::new(String::new());
|
||||
if let Some(qc) = crate::core::ssh_profile::parse_quick_connect(&target) {
|
||||
profile.port = qc.port_or_default();
|
||||
@@ -6274,7 +6687,7 @@ impl Tty7App {
|
||||
profile.name = profile.host.clone();
|
||||
}
|
||||
}
|
||||
self.ssh_form_load(&profile, window, cx);
|
||||
self.open_ssh_profile_form(profile, window, cx);
|
||||
}
|
||||
|
||||
fn commit_font_family(&mut self, family: String, cx: &mut Context<Self>) {
|
||||
@@ -6287,7 +6700,7 @@ impl Tty7App {
|
||||
}
|
||||
let cfg = cx.global_mut::<Config>();
|
||||
cfg.font_family = family;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -6316,7 +6729,7 @@ impl Tty7App {
|
||||
} else {
|
||||
cfg.font_family_italic = family;
|
||||
}
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -6327,7 +6740,7 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
cfg.ui_font_family = family;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
apply_theme(Some(window), cx);
|
||||
cx.refresh_windows();
|
||||
cx.notify();
|
||||
@@ -6519,7 +6932,7 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
cfg.shell = shell;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
}
|
||||
// Shell discovery runs off the UI thread and now includes the saved
|
||||
// configured shell, so refresh the menu without blocking Settings.
|
||||
@@ -6536,7 +6949,7 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
cfg.working_directory.strategy = strategy;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -6562,7 +6975,7 @@ impl Tty7App {
|
||||
return;
|
||||
}
|
||||
cfg.working_directory.path = path;
|
||||
cfg.save();
|
||||
self.persist_settings_config(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
@@ -7008,19 +7421,23 @@ impl Tty7App {
|
||||
}
|
||||
|
||||
pub(crate) fn autoselect_settings_search(&mut self, cx: &mut Context<Self>) {
|
||||
let Some(settings) = self.settings.as_ref() else {
|
||||
return;
|
||||
};
|
||||
let query = settings.search.read(cx).value().trim().to_lowercase();
|
||||
if query.is_empty() {
|
||||
return;
|
||||
}
|
||||
if crate::ui::settings::section_match_count(settings.section, &query) > 0 {
|
||||
return;
|
||||
}
|
||||
if let Some(best) = crate::ui::settings::best_matching_section(&query) {
|
||||
self.select_settings_section(best, cx);
|
||||
if let Some(s) = self.settings.as_mut() {
|
||||
let active = !s.search.read(cx).value().trim().is_empty() || s.modified_only;
|
||||
if active && !s.search_active {
|
||||
s.search_return_offset = s.content_scroll.offset();
|
||||
}
|
||||
if active {
|
||||
s.content_scroll.set_offset(gpui::point(px(0.), px(0.)));
|
||||
} else if s.search_active {
|
||||
s.content_scroll.set_offset(s.search_return_offset);
|
||||
}
|
||||
s.search_active = active;
|
||||
s.search_selection = 0;
|
||||
if active {
|
||||
s.focused_setting = None;
|
||||
}
|
||||
}
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
pub(crate) fn start_recording_key(
|
||||
|
||||
+61
-43
@@ -2,6 +2,24 @@ use super::L10nKey;
|
||||
|
||||
pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
match key {
|
||||
L10nKey::SettingsSaveError => "Changes could not be saved: {error}",
|
||||
L10nKey::SettingsRetrySave => "Retry saving",
|
||||
|
||||
L10nKey::SettingsNavGeneral => "General",
|
||||
L10nKey::SettingsEditShortcuts => "Edit shortcuts…",
|
||||
L10nKey::SettingsModifiedOnly => "Modified only",
|
||||
L10nKey::SettingsModified => "Modified",
|
||||
L10nKey::SettingsResetValue => "Reset to default",
|
||||
L10nKey::SettingsSearchResults => "Search results",
|
||||
L10nKey::SettingsOpenSetting => "Open setting",
|
||||
L10nKey::SettingsNoModified => "No modified settings match this filter.",
|
||||
L10nKey::SettingsTerminalFontGroup => "Terminal text",
|
||||
L10nKey::SettingsInterfaceFontGroup => "Interface text",
|
||||
L10nKey::SettingsUnsavedTitle => "Save changes before leaving?",
|
||||
L10nKey::SettingsUnsavedBody => "Save your changes, discard them, or continue editing.",
|
||||
L10nKey::SettingsSaveChanges => "Save changes",
|
||||
L10nKey::SettingsThemeDraft => "Theme changes are previewed until you save.",
|
||||
|
||||
L10nKey::SearchTabs => "Search tabs…",
|
||||
L10nKey::SearchFiles => "Search files…",
|
||||
L10nKey::SearchThemes => "Search themes…",
|
||||
@@ -57,9 +75,9 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::RememberKeychain => "Remember (keychain)",
|
||||
L10nKey::Cancel => "Cancel",
|
||||
L10nKey::Close => "Close",
|
||||
L10nKey::QuitStopServerTitle => "Quit and Stop Server?",
|
||||
L10nKey::QuitStopServerTitle => "Quit and stop tty7 server?",
|
||||
L10nKey::QuitStopServerBody => {
|
||||
"This quits tty7 and stops the background server; anything running in your shells is terminated. Your tabs and layout reopen with fresh shells next launch. (Closing the window only retires tty7 to the tray — the shells keep running.)"
|
||||
"This quits tty7 and stops tty7 server; anything running in your shells is terminated. Your tabs and layout reopen with fresh shells next launch. (Closing the window only retires tty7 to the tray — the shells keep running.)"
|
||||
}
|
||||
L10nKey::QuitAndStop => "Quit and Stop",
|
||||
L10nKey::CloseSshConnectionTitle => "Close this SSH connection?",
|
||||
@@ -71,11 +89,11 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::Keep => "Keep",
|
||||
L10nKey::SettingsNavAppearance => "Appearance",
|
||||
L10nKey::SettingsNavTerminal => "Terminal",
|
||||
L10nKey::SettingsNavInput => "Input",
|
||||
L10nKey::SettingsNavInput => "Keyboard & Mouse",
|
||||
L10nKey::SettingsNavSsh => "SSH",
|
||||
L10nKey::SettingsNavAgents => "Agents",
|
||||
L10nKey::SettingsNavAgents => "Integrations",
|
||||
L10nKey::SettingsNavWindowTabs => "Window & Tabs",
|
||||
L10nKey::SettingsNavKeybindings => "Keybindings",
|
||||
L10nKey::SettingsNavKeybindings => "Keyboard shortcuts",
|
||||
L10nKey::SettingsNavAbout => "About",
|
||||
L10nKey::SettingsHeader => "SETTINGS",
|
||||
L10nKey::Reset => "Reset",
|
||||
@@ -88,20 +106,20 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
"Pick a color theme. Each one sets its own light or dark look."
|
||||
}
|
||||
L10nKey::SettingsTypography => "Typography",
|
||||
L10nKey::SettingsFontSize => "Font size",
|
||||
L10nKey::SettingsFontSize => "Terminal font size",
|
||||
L10nKey::SettingsFontSizeDesc => "Terminal text size in pixels.",
|
||||
L10nKey::SettingsUiFontSize => "Interface font size",
|
||||
L10nKey::SettingsUiFontSizeDesc => {
|
||||
"Text size everywhere outside the terminal — tabs, panels and settings. \
|
||||
Raise it on a display that is not Retina."
|
||||
}
|
||||
L10nKey::SettingsUiFontFamily => "Interface font family",
|
||||
L10nKey::SettingsUiFontFamily => "Interface font",
|
||||
L10nKey::SettingsUiFontFamilyDesc => {
|
||||
"Face used for tabs, sidebars, dialogs and settings; Default uses the system UI font."
|
||||
}
|
||||
L10nKey::SettingsLineHeight => "Line height",
|
||||
L10nKey::SettingsLineHeightDesc => "Row spacing as a multiple of the font size.",
|
||||
L10nKey::SettingsFontFamily => "Font family",
|
||||
L10nKey::SettingsFontFamily => "Terminal font",
|
||||
L10nKey::SettingsFontFamilyDesc => "Pick from fonts installed on your system.",
|
||||
L10nKey::SettingsBoldFont => "Bold font",
|
||||
L10nKey::SettingsBoldFontDesc => {
|
||||
@@ -400,20 +418,20 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsOff => "Off",
|
||||
L10nKey::SettingsShell => "Shell",
|
||||
L10nKey::SettingsShellIntro => {
|
||||
"The program each new terminal launches. Leave Program empty to use the platform default ({default})."
|
||||
"The program each new terminal launches. Leave Shell program empty to use the platform default ({default})."
|
||||
}
|
||||
L10nKey::SettingsProgram => "Program",
|
||||
L10nKey::SettingsProgram => "Shell program",
|
||||
L10nKey::SettingsProgramDesc => {
|
||||
"Executable name on PATH or an absolute path (e.g. zsh, fish, pwsh)."
|
||||
}
|
||||
L10nKey::SettingsArguments => "Arguments",
|
||||
L10nKey::SettingsArguments => "Shell arguments",
|
||||
L10nKey::SettingsArgumentsDesc => {
|
||||
"Launch flags, split like a command line — quote anything containing spaces (e.g. -l, or -c \"echo hi\")."
|
||||
}
|
||||
L10nKey::SettingsArgumentsInvalid => {
|
||||
"The quotes do not balance — this value was not saved."
|
||||
}
|
||||
L10nKey::SettingsStartIn => "Start in",
|
||||
L10nKey::SettingsStartIn => "Starting directory",
|
||||
L10nKey::SettingsStartInDesc => {
|
||||
"What a fresh shell starts in: tty7's launch directory, your home folder, or a fixed path."
|
||||
}
|
||||
@@ -429,7 +447,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
"Applies to shells with nothing to inherit, like a window's first tab. New tabs and splits still inherit the active pane's directory; open shells keep running."
|
||||
}
|
||||
L10nKey::SettingsScrolling => "Scrolling",
|
||||
L10nKey::SettingsScrollback => "Scrollback",
|
||||
L10nKey::SettingsScrollback => "Scrollback buffer",
|
||||
L10nKey::SettingsScrollbackDesc => "Lines of history kept per pane. Applies to new panes.",
|
||||
L10nKey::SettingsScrollSpeed => "Scroll speed",
|
||||
L10nKey::SettingsScrollSpeedDesc => "Multiplier applied to mouse-wheel scrolling.",
|
||||
@@ -491,11 +509,11 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsBellModeVisual => "Visual",
|
||||
L10nKey::SettingsBellModeAudible => "Audible",
|
||||
L10nKey::SettingsBellModeBoth => "Both",
|
||||
L10nKey::SettingsPrompt => "Prompt",
|
||||
L10nKey::SettingsPrompt => "Prompt & command history",
|
||||
L10nKey::SettingsPromptIntro => {
|
||||
"tty7's own editor and menus at the shell prompt. Turn one off to hand that much back to the shell."
|
||||
}
|
||||
L10nKey::SettingsPromptEditor => "Prompt editor",
|
||||
L10nKey::SettingsPromptEditor => "tty7 prompt editor",
|
||||
L10nKey::SettingsPromptEditorDesc => {
|
||||
"tty7 edits the line you type at the shell prompt: selection, undo, and the menus below. Off hands the prompt back to the shell's own editor — ZLE, readline, fish."
|
||||
}
|
||||
@@ -506,7 +524,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
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::SettingsHistorySearch => "Command history search",
|
||||
L10nKey::SettingsHistorySearchDesc => {
|
||||
"⌃R at the prompt opens tty7's fuzzy history menu. Off sends ⌃R to the shell — its own reverse-i-search, or whatever you bound there (fzf, percol)."
|
||||
}
|
||||
@@ -532,7 +550,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsOptionAsMetaDesc => {
|
||||
"⌥+key sends the escape chord shells expect (⌥B = back one word) instead of typing a special character (∫)."
|
||||
}
|
||||
L10nKey::SettingsAgentsIntro => "Agents",
|
||||
L10nKey::SettingsAgentsIntro => "AI agents",
|
||||
L10nKey::SettingsAgentsIntroDesc => {
|
||||
"Hooks give panes running these agents live status (working / waiting / done) in the tab bar. Only inside tty7."
|
||||
}
|
||||
@@ -605,11 +623,11 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsNotifyOnCommandFinishDesc => {
|
||||
"Desktop alert after a long foreground command completes."
|
||||
}
|
||||
L10nKey::SettingsNotifyThreshold => "Notify threshold",
|
||||
L10nKey::SettingsNotifyThreshold => "Minimum command duration",
|
||||
L10nKey::SettingsNotifyThresholdDesc => {
|
||||
"How long a command must run to qualify as \"long\"."
|
||||
"Notify only when a command runs for at least this long."
|
||||
}
|
||||
L10nKey::SettingsWindow => "Window",
|
||||
L10nKey::SettingsWindow => "Startup & restore",
|
||||
L10nKey::NotifyModeNever => "Never",
|
||||
L10nKey::NotifyModeUnfocused => "When unfocused",
|
||||
L10nKey::NotifyModeAlways => "Always",
|
||||
@@ -693,16 +711,16 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
}
|
||||
L10nKey::SettingsUpdateChannelStable => "Stable",
|
||||
L10nKey::SettingsUpdateChannelNightly => "Nightly",
|
||||
L10nKey::SettingsDaemonStale => "The background server is still running {build}.",
|
||||
L10nKey::SettingsDaemonStale => "tty7 server is still running {build}.",
|
||||
L10nKey::SettingsDaemonStaleDesc => {
|
||||
"tty7 was updated in place: the app is new, your panes are still served by the old build. Restarting the server picks up the new one and ends everything running in your panes. No hurry — do it when they're idle."
|
||||
"tty7 was updated in place: the app is new, your panes are still served by the old build. Restarting tty7 server picks up the new one and ends everything running in your panes. No hurry — do it when they're idle."
|
||||
}
|
||||
L10nKey::UpdateDialogTitle => "Update available",
|
||||
L10nKey::UpdateDialogDetail => {
|
||||
"tty7 {version} is available — you're on {current}. Installing restarts the app; the background server keeps running, so your panes survive."
|
||||
"tty7 {version} is available — you're on {current}. Installing restarts the app; tty7 server keeps running, so your panes survive."
|
||||
}
|
||||
L10nKey::UpdateDialogDetailWindows => {
|
||||
"tty7 {version} is available — you're on {current}. Installing restarts the app and the background service: processes in your panes are ended, and your tabs and layout come back with fresh shells."
|
||||
"tty7 {version} is available — you're on {current}. Installing restarts the app and tty7 server: processes in your panes are ended, and your tabs and layout come back with fresh shells."
|
||||
}
|
||||
L10nKey::UpdateDialogDetailManual => {
|
||||
"tty7 {version} is available — you're on {current}. {hint}"
|
||||
@@ -747,14 +765,14 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsCheckUpdatesOnLaunch => "Check for updates on launch",
|
||||
L10nKey::SettingsCommandLine => "Command line",
|
||||
L10nKey::SettingsCommandLineDesc => {
|
||||
"Put the bundled tty7 command on your PATH, so scripts and agents can drive tty7 from any terminal — inside a pane it works either way. Turn off to keep your own build unshadowed. Applies at next launch."
|
||||
"Make the bundled tty7 command available to scripts and AI agents. Takes effect on the next launch; turning this off does not remove an existing installation."
|
||||
}
|
||||
L10nKey::SettingsInstallCliOnPath => "Install the tty7 command on PATH",
|
||||
L10nKey::SettingsServer => "Server",
|
||||
L10nKey::SettingsServer => "tty7 server",
|
||||
L10nKey::SettingsServerDesc => {
|
||||
"Restarts the background server that keeps your shells running. Every shell on this computer ends; your tabs and layout reopen with fresh ones."
|
||||
"Manages terminal sessions on this computer and keeps them running in the background."
|
||||
}
|
||||
L10nKey::SettingsRestartServer => "Restart server…",
|
||||
L10nKey::SettingsRestartServer => "Restart tty7 server…",
|
||||
L10nKey::SettingsAppHttpProxy => "Proxy for updates",
|
||||
L10nKey::SettingsAppHttpProxyDesc => {
|
||||
"Used only for tty7's update checks and downloads, not for programs in your panes. Empty follows the system proxy."
|
||||
@@ -840,7 +858,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SettingsSearchKeybindingsKeywords => {
|
||||
"shortcut hotkey keyboard binding chord tmux preset rebind prefix"
|
||||
}
|
||||
L10nKey::SettingsSearchKeybindingsTitle => "Keybindings",
|
||||
L10nKey::SettingsSearchKeybindingsTitle => "Keyboard shortcuts",
|
||||
L10nKey::SettingsSearchLineHeightKeywords => "typography leading spacing",
|
||||
L10nKey::SettingsSearchUiFontFamilyKeywords => {
|
||||
"interface font family ui typeface typography chrome sidebar tab"
|
||||
@@ -948,7 +966,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::SwitcherNoMatch => "No workspace or machine matches.",
|
||||
L10nKey::AddSshHost => "Add SSH Host…",
|
||||
L10nKey::ClickForNewWindow => "click for a new window",
|
||||
L10nKey::RestartServer => "Restart Server",
|
||||
L10nKey::RestartServer => "Restart tty7 server",
|
||||
L10nKey::OtherMachines => "Other Machines",
|
||||
L10nKey::Ok => "OK",
|
||||
L10nKey::SftpNoTransfers => "No transfers yet.",
|
||||
@@ -1432,7 +1450,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::IoBusy => "Something else has it open.",
|
||||
L10nKey::IoTimedOut => "The machine did not answer in time.",
|
||||
L10nKey::TreeWindowOpenedEmpty => {
|
||||
"The server never handed over this window's tabs, so it opened empty. Nothing was lost — they come back when it answers. If it doesn't, run \"Restart Server\" from the command palette."
|
||||
"The server never handed over this window's tabs, so it opened empty. Nothing was lost — they come back when it answers. If it doesn't, run \"Restart tty7 server\" from the command palette."
|
||||
}
|
||||
L10nKey::CmdGroupTabsPanes => "Tabs & Panes",
|
||||
L10nKey::CmdGroupWorkspaces => "Workspaces",
|
||||
@@ -1546,26 +1564,26 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::CmdDocumentation => "Documentation",
|
||||
L10nKey::CmdJoinDiscord => "Join the Discord",
|
||||
L10nKey::CmdReportIssue => "Report an Issue…",
|
||||
L10nKey::CmdRestartServer => "Restart Server…",
|
||||
L10nKey::CmdRestartServer => "Restart tty7 server…",
|
||||
L10nKey::CmdRestartServerSubtitle => "ends every running shell; layout is kept",
|
||||
L10nKey::CmdQuitTty7 => "Quit tty7",
|
||||
L10nKey::CmdQuitTty7Subtitle => "stops the server; every running shell ends",
|
||||
L10nKey::CmdQuickConnect => "Connect to \"{target}\"",
|
||||
L10nKey::CmdQuickConnectSaveProfile => "Save \"{target}\" as profile…",
|
||||
L10nKey::CmdRecent => "Recent",
|
||||
L10nKey::AppRestartServerTitle => "Restart Server?",
|
||||
L10nKey::AppRestartServerFailed => "Could not restart the background server: {error}",
|
||||
L10nKey::AppRestartServerTitle => "Restart tty7 server?",
|
||||
L10nKey::AppRestartServerFailed => "Could not restart tty7 server: {error}",
|
||||
L10nKey::AppRestartServerMismatchDetail => {
|
||||
"The server holding your shells speaks protocol {protocol} (build v{build}); this app speaks {ours}, so your tabs are out of reach.\n\nQuit: nothing changes — the server and your shells keep running.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
"tty7 server holding your shells speaks protocol {protocol} (build v{build}); this app speaks {ours}, so your tabs are out of reach.\n\nQuit: nothing changes — tty7 server and your shells keep running.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
}
|
||||
L10nKey::AppRestartServerDialectDetail => {
|
||||
"The server holding your shells speaks control dialect v{dialect} (build v{build}); this app speaks v{ours}, so every window opens empty.\n\nQuit: nothing changes — the server and your shells keep running.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
"tty7 server holding your shells speaks control dialect v{dialect} (build v{build}); this app speaks v{ours}, so every window opens empty.\n\nQuit: nothing changes — tty7 server and your shells keep running.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
}
|
||||
L10nKey::AppRestartServerDialectNewerDetail => {
|
||||
"The server holding your shells speaks control dialect v{dialect} (build v{build}); this app speaks v{ours}, so every window opens empty.\n\nQuit and install the newer build: the real fix — your shells survive it.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
"tty7 server holding your shells speaks control dialect v{dialect} (build v{build}); this app speaks v{ours}, so every window opens empty.\n\nQuit and install the newer build: the real fix — your shells survive it.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
}
|
||||
L10nKey::AppRestartServerOldDetail => {
|
||||
"The server holding your shells predates the version handshake, so this app can't tell what it speaks.\n\nQuit: nothing changes — the server and your shells keep running.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
"tty7 server holding your shells predates the version handshake, so this app can't tell what it speaks.\n\nQuit: nothing changes — tty7 server and your shells keep running.\nRestart: tabs come back with fresh shells; anything running now is killed."
|
||||
}
|
||||
L10nKey::AppRestart => "Restart",
|
||||
L10nKey::AppRestartServerNoServer => {
|
||||
@@ -1711,15 +1729,15 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::Replace => "Replace",
|
||||
L10nKey::SftpErrorInvalidOctalMode => "invalid octal mode",
|
||||
L10nKey::SettingsDaemonStaleDescInPlace => {
|
||||
"tty7 was updated in place: the app is new, your panes still run on the old build. The server can swap itself for the new one without stopping, so your shells carry straight over. Panes on tty7's built-in SSH client are the exception — those close and need reopening."
|
||||
"tty7 was updated in place: the app is new, your panes still run on the old build. tty7 server can swap itself for the new one without stopping, so your shells carry straight over. Panes on tty7's built-in SSH client are the exception — those close and need reopening."
|
||||
}
|
||||
L10nKey::AppRestartServerBodyInPlace => {
|
||||
"The server swaps itself for this build in place: your shells keep running, and the window reconnects a moment later. Panes on tty7's built-in SSH client are the exception — those close and need reopening."
|
||||
"tty7 server swaps itself for this build in place: your shells keep running, and the window reconnects a moment later. Panes on tty7's built-in SSH client are the exception — those close and need reopening."
|
||||
}
|
||||
L10nKey::PaneRestoredScreenBanner => {
|
||||
"restored screen — this shell is new, nothing above it is still running"
|
||||
}
|
||||
L10nKey::SettingsPerPaneHistory => "Give each pane its own shell history",
|
||||
L10nKey::SettingsPerPaneHistory => "Separate command history per pane",
|
||||
L10nKey::SettingsPerPaneHistoryDescription => {
|
||||
"Up walks through what you ran in this pane, not every pane interleaved. A new pane starts from your existing history and writes back what it adds when it closes. Applies to bash and zsh panes tty7 can set up; a shell started with your own arguments is left alone."
|
||||
}
|
||||
@@ -1805,7 +1823,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::AppMenuKeyboardShortcuts => "Keyboard Shortcuts",
|
||||
L10nKey::AppMenuJoinDiscord => "Join the Discord",
|
||||
L10nKey::AppMenuReportIssue => "Report an Issue…",
|
||||
L10nKey::AppMenuRestartServer => "Restart Server…",
|
||||
L10nKey::AppMenuRestartServer => "Restart tty7 server…",
|
||||
L10nKey::WindowUntitled => "Untitled",
|
||||
L10nKey::TrayShowTty7 => "Show tty7",
|
||||
L10nKey::TrayNotifications => "Notifications",
|
||||
@@ -1842,7 +1860,7 @@ pub fn translate_en(key: L10nKey) -> &'static str {
|
||||
L10nKey::AppMenuEnterFullscreen => "Enter Full Screen",
|
||||
L10nKey::HomeTimeOverWeekAgo => "over a week ago",
|
||||
L10nKey::Search => "Search",
|
||||
L10nKey::SettingsDaemonStaleRestart => "Restart Service",
|
||||
L10nKey::SettingsDaemonStaleRestart => "Restart tty7 server",
|
||||
L10nKey::SettingsNoneLower => "none",
|
||||
L10nKey::SettingsSearchCommandLineToolTitle => "Command line tool",
|
||||
L10nKey::TabContextMarkUnread => "Mark as Unread",
|
||||
|
||||
+72
-55
@@ -2,6 +2,23 @@ use super::L10nKey;
|
||||
|
||||
pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
Some(match key {
|
||||
L10nKey::SettingsNavGeneral => "一般",
|
||||
L10nKey::SettingsEditShortcuts => "ショートカットを編集…",
|
||||
L10nKey::SettingsModifiedOnly => "変更済みのみ",
|
||||
L10nKey::SettingsModified => "変更済み",
|
||||
L10nKey::SettingsResetValue => "既定値に戻す",
|
||||
L10nKey::SettingsSearchResults => "検索結果",
|
||||
L10nKey::SettingsOpenSetting => "設定を開く",
|
||||
L10nKey::SettingsNoModified => "この条件に一致する変更済みの設定はありません。",
|
||||
L10nKey::SettingsTerminalFontGroup => "ターミナルの文字",
|
||||
L10nKey::SettingsInterfaceFontGroup => "インターフェイスの文字",
|
||||
L10nKey::SettingsUnsavedTitle => "移動する前に変更を保存しますか?",
|
||||
L10nKey::SettingsUnsavedBody => "変更を保存、破棄、または編集を続けられます。",
|
||||
L10nKey::SettingsSaveChanges => "変更を保存",
|
||||
L10nKey::SettingsThemeDraft => "テーマの変更は保存するまでプレビューされます。",
|
||||
L10nKey::SettingsSaveError => "変更を保存できませんでした:{error}",
|
||||
L10nKey::SettingsRetrySave => "保存を再試行",
|
||||
|
||||
L10nKey::SearchTabs => "タブを検索…",
|
||||
L10nKey::SearchFiles => "ファイルを検索…",
|
||||
L10nKey::SearchThemes => "テーマを検索…",
|
||||
@@ -59,9 +76,9 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::RememberKeychain => "キーチェーンに保存",
|
||||
L10nKey::Cancel => "キャンセル",
|
||||
L10nKey::Close => "閉じる",
|
||||
L10nKey::QuitStopServerTitle => "tty7 を終了してサーバーを停止しますか?",
|
||||
L10nKey::QuitStopServerTitle => "tty7 を終了して tty7 server を停止しますか?",
|
||||
L10nKey::QuitStopServerBody => {
|
||||
"tty7 を終了してバックグラウンドサーバーを停止します。シェルで実行中のものはすべて終了します。タブとレイアウトは次回起動時に新しいシェルで開きます。(ウィンドウを閉じるだけならトレイに退避し、シェルは動き続けます)"
|
||||
"tty7 を終了して tty7 server を停止します。シェルで実行中のものはすべて終了します。タブとレイアウトは次回起動時に新しいシェルで開きます。(ウィンドウを閉じるだけならトレイに退避し、シェルは動き続けます)"
|
||||
}
|
||||
L10nKey::QuitAndStop => "終了して停止",
|
||||
L10nKey::CloseSshConnectionTitle => "この SSH 接続を閉じますか?",
|
||||
@@ -75,11 +92,11 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::Keep => "保持",
|
||||
L10nKey::SettingsNavAppearance => "外観",
|
||||
L10nKey::SettingsNavTerminal => "ターミナル",
|
||||
L10nKey::SettingsNavInput => "入力",
|
||||
L10nKey::SettingsNavInput => "キーボードとマウス",
|
||||
L10nKey::SettingsNavSsh => "SSH",
|
||||
L10nKey::SettingsNavAgents => "エージェント",
|
||||
L10nKey::SettingsNavAgents => "連携",
|
||||
L10nKey::SettingsNavWindowTabs => "ウィンドウとタブ",
|
||||
L10nKey::SettingsNavKeybindings => "キーバインド",
|
||||
L10nKey::SettingsNavKeybindings => "キーボードショートカット",
|
||||
L10nKey::SettingsNavAbout => "情報",
|
||||
L10nKey::SettingsHeader => "設定",
|
||||
L10nKey::Reset => "リセット",
|
||||
@@ -92,19 +109,19 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
"配色テーマを選びます。明るいテーマと暗いテーマがあります"
|
||||
}
|
||||
L10nKey::SettingsTypography => "タイポグラフィ",
|
||||
L10nKey::SettingsFontSize => "フォントサイズ",
|
||||
L10nKey::SettingsFontSize => "ターミナルの文字サイズ",
|
||||
L10nKey::SettingsFontSizeDesc => "ターミナルテキストのサイズ(ピクセル)",
|
||||
L10nKey::SettingsUiFontSize => "インターフェースのフォントサイズ",
|
||||
L10nKey::SettingsUiFontSize => "画面の文字サイズ",
|
||||
L10nKey::SettingsUiFontSizeDesc => {
|
||||
"ターミナル以外すべての文字サイズ(タブ・パネル・設定)。Retina でないディスプレイでは大きめに"
|
||||
}
|
||||
L10nKey::SettingsUiFontFamily => "インターフェースのフォントファミリー",
|
||||
L10nKey::SettingsUiFontFamily => "画面のフォント",
|
||||
L10nKey::SettingsUiFontFamilyDesc => {
|
||||
"タブ、サイドバー、ダイアログ、設定で使用するフォント。デフォルトではシステム UI フォントを使用します。"
|
||||
}
|
||||
L10nKey::SettingsLineHeight => "行の高さ",
|
||||
L10nKey::SettingsLineHeightDesc => "フォントサイズに対する行間の倍率",
|
||||
L10nKey::SettingsFontFamily => "フォントファミリー",
|
||||
L10nKey::SettingsFontFamily => "ターミナルのフォント",
|
||||
L10nKey::SettingsFontFamilyDesc => "システムにインストールされているフォントから選択",
|
||||
L10nKey::SettingsBoldFont => "太字フォント",
|
||||
L10nKey::SettingsBoldFontDesc => {
|
||||
@@ -407,20 +424,20 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsOff => "オフ",
|
||||
L10nKey::SettingsShell => "シェル",
|
||||
L10nKey::SettingsShellIntro => {
|
||||
"新しいターミナルで起動するプログラム。空欄ならプラットフォーム既定の {default} を使います"
|
||||
"新しいターミナルで起動するプログラム。「シェルプログラム」を空欄にすると、プラットフォーム既定の {default} を使います。"
|
||||
}
|
||||
L10nKey::SettingsProgram => "プログラム",
|
||||
L10nKey::SettingsProgram => "シェルプログラム",
|
||||
L10nKey::SettingsProgramDesc => {
|
||||
"PATH 上の実行可能ファイル名または絶対パス。例: zsh、fish、pwsh"
|
||||
}
|
||||
L10nKey::SettingsArguments => "引数",
|
||||
L10nKey::SettingsArguments => "シェル引数",
|
||||
L10nKey::SettingsArgumentsDesc => {
|
||||
"コマンドラインと同じ規則で分割される起動フラグ。空白を含むものはクォートしてください(例: -l、-c \"echo hi\")"
|
||||
}
|
||||
L10nKey::SettingsArgumentsInvalid => {
|
||||
"引用符が対応していないため、この値は保存されませんでした"
|
||||
}
|
||||
L10nKey::SettingsStartIn => "初期作業ディレクトリ",
|
||||
L10nKey::SettingsStartIn => "開始ディレクトリ",
|
||||
L10nKey::SettingsStartInDesc => {
|
||||
"新しいシェルの開始場所: tty7 の起動ディレクトリ、ホームフォルダ、または固定パス"
|
||||
}
|
||||
@@ -436,7 +453,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
"継承元のないシェル(ウィンドウの最初のタブなど)に適用されます。新しいタブと分割はアクティブなペインのディレクトリを引き継ぎ、開いているシェルは動き続けます"
|
||||
}
|
||||
L10nKey::SettingsScrolling => "スクロール",
|
||||
L10nKey::SettingsScrollback => "スクロールバック",
|
||||
L10nKey::SettingsScrollback => "スクロールバックバッファー",
|
||||
L10nKey::SettingsScrollbackDesc => {
|
||||
"各ペインに保存する履歴の行数。新しいペインに適用されます"
|
||||
}
|
||||
@@ -502,11 +519,11 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsBellModeVisual => "視覚的(画面点滅)",
|
||||
L10nKey::SettingsBellModeAudible => "音声(効果音)",
|
||||
L10nKey::SettingsBellModeBoth => "点滅 + 音声",
|
||||
L10nKey::SettingsPrompt => "プロンプト",
|
||||
L10nKey::SettingsPrompt => "プロンプトとコマンド履歴",
|
||||
L10nKey::SettingsPromptIntro => {
|
||||
"シェルプロンプトでの tty7 独自のエディターとメニュー。オフにするとその分がシェルに渡されます"
|
||||
}
|
||||
L10nKey::SettingsPromptEditor => "プロンプトエディター",
|
||||
L10nKey::SettingsPromptEditor => "tty7 のプロンプトエディター",
|
||||
L10nKey::SettingsPromptEditorDesc => {
|
||||
"シェルプロンプトで入力する行を tty7 が編集します — 選択、取り消し、下のメニュー。オフにするとシェル自身の行エディター(ZLE、readline、fish)に戻ります"
|
||||
}
|
||||
@@ -517,7 +534,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsTabCompletionDesc => {
|
||||
"プロンプトで Tab を押すと tty7 の補完メニューが開きます。オフの場合、Tab はシェル自身の補完に渡されます"
|
||||
}
|
||||
L10nKey::SettingsHistorySearch => "履歴検索",
|
||||
L10nKey::SettingsHistorySearch => "コマンド履歴検索",
|
||||
L10nKey::SettingsHistorySearchDesc => {
|
||||
"プロンプトで ⌃R を押すと tty7 のファジー履歴メニューが開きます。オフなら ⌃R はシェルへ — 逆方向検索や、そこでバインドしたもの(fzf、percol)"
|
||||
}
|
||||
@@ -541,7 +558,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsOptionAsMetaDesc => {
|
||||
"⌥+キーでシェルが期待するエスケープシーケンス(⌥B = 単語 1 つ戻る)を送信し、特殊文字(∫)を入力しない"
|
||||
}
|
||||
L10nKey::SettingsAgentsIntro => "エージェント",
|
||||
L10nKey::SettingsAgentsIntro => "AI エージェント",
|
||||
L10nKey::SettingsAgentsIntroDesc => {
|
||||
"フックにより、これらのエージェントを実行するペインの状態(作業中 / 待機中 / 完了)がタブバーに表示されます。tty7 内でのみ有効"
|
||||
}
|
||||
@@ -614,9 +631,11 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsNotifyOnCommandFinishDesc => {
|
||||
"長時間のフォアグラウンドコマンドが完了したらデスクトップ通知を表示"
|
||||
}
|
||||
L10nKey::SettingsNotifyThreshold => "通知閾値(秒)",
|
||||
L10nKey::SettingsNotifyThresholdDesc => "「長時間」とみなすのに必要なコマンドの実行時間",
|
||||
L10nKey::SettingsWindow => "ウィンドウ",
|
||||
L10nKey::SettingsNotifyThreshold => "コマンド実行時間の下限",
|
||||
L10nKey::SettingsNotifyThresholdDesc => {
|
||||
"この時間以上実行されたコマンドの完了を通知します。"
|
||||
}
|
||||
L10nKey::SettingsWindow => "起動と復元",
|
||||
L10nKey::NotifyModeNever => "通知しない",
|
||||
L10nKey::NotifyModeUnfocused => "非フォーカス時のみ",
|
||||
L10nKey::NotifyModeAlways => "常に通知",
|
||||
@@ -702,16 +721,16 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
}
|
||||
L10nKey::SettingsUpdateChannelStable => "安定版",
|
||||
L10nKey::SettingsUpdateChannelNightly => "ナイトリー",
|
||||
L10nKey::SettingsDaemonStale => "バックグラウンドサーバーは {build} のままです。",
|
||||
L10nKey::SettingsDaemonStale => "tty7 server は {build} のままです。",
|
||||
L10nKey::SettingsDaemonStaleDesc => {
|
||||
"tty7 はその場で更新されました。アプリは新しく、ペインはまだ以前のビルドのサーバーが処理しています。再起動すると新しいビルドに切り替わり、ペインで動いているプロセスはすべて終了します。急ぐ必要はなく、ペインが空いているときにどうぞ"
|
||||
"tty7 はその場で更新されました。アプリは新しく、ペインはまだ以前のビルドの tty7 server が処理しています。再起動すると新しいビルドに切り替わり、ペインで動いているプロセスはすべて終了します。急ぐ必要はなく、ペインが空いているときにどうぞ"
|
||||
}
|
||||
L10nKey::UpdateDialogTitle => "アップデートがあります",
|
||||
L10nKey::UpdateDialogDetail => {
|
||||
"tty7 {version} が利用できます(現在 {current})。インストールするとアプリが再起動します。バックグラウンドサーバーは動いたままなので、ペインの中身は残ります"
|
||||
"tty7 {version} が利用できます(現在 {current})。インストールするとアプリが再起動します。tty7 server は動いたままなので、ペインの中身は残ります"
|
||||
}
|
||||
L10nKey::UpdateDialogDetailWindows => {
|
||||
"tty7 {version} が利用できます(現在 {current})。インストールするとアプリとバックグラウンドサービスが再起動します。ペインのプロセスは終了し、タブとレイアウトは新しいシェルで復元されます"
|
||||
"tty7 {version} が利用できます(現在 {current})。インストールするとアプリと tty7 server が再起動します。ペインのプロセスは終了し、タブとレイアウトは新しいシェルで復元されます"
|
||||
}
|
||||
L10nKey::UpdateDialogDetailManual => {
|
||||
"tty7 {version} が利用できます(現在 {current})。{hint}"
|
||||
@@ -756,14 +775,14 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsCheckUpdatesOnLaunch => "起動時にアップデートを確認",
|
||||
L10nKey::SettingsCommandLine => "コマンドライン",
|
||||
L10nKey::SettingsCommandLineDesc => {
|
||||
"同梱の tty7 コマンドを PATH に入れ、スクリプトやエージェントが任意のターミナルから tty7 を操作できるようにします(ペイン内ではどちらでも動きます)。自分でビルドした tty7 を優先したい場合はオフに。次回起動時に有効"
|
||||
"付属の tty7 コマンドをスクリプトや AI エージェントから利用できます。次回起動時に反映されます。無効にしてもインストール済みのコマンドは削除されません。"
|
||||
}
|
||||
L10nKey::SettingsInstallCliOnPath => "`tty7` コマンドを PATH にインストール",
|
||||
L10nKey::SettingsServer => "デーモンサーバー",
|
||||
L10nKey::SettingsServer => "tty7 server",
|
||||
L10nKey::SettingsServerDesc => {
|
||||
"シェルを動かし続けているバックグラウンドサーバーを再起動します。このコンピュータ上のすべてのシェルが終了し、タブとレイアウトは新しいシェルで開き直します"
|
||||
"このコンピューターのターミナルセッションを管理し、バックグラウンドで実行し続けます。"
|
||||
}
|
||||
L10nKey::SettingsRestartServer => "サーバーを再起動…",
|
||||
L10nKey::SettingsRestartServer => "tty7 server を再起動…",
|
||||
L10nKey::SettingsAppHttpProxy => "アップデート用プロキシ",
|
||||
L10nKey::SettingsAppHttpProxyDesc => {
|
||||
"tty7 自身の更新チェックとダウンロードにのみ使用し、ペインで実行中のプログラムには影響しません。空欄ならシステムのプロキシに従います"
|
||||
@@ -877,7 +896,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsSearchKeybindingsKeywords => {
|
||||
"ショートカット ホットキー キーボード バインディング コード tmux プリセット 再バインド プレフィックス keybindings shortcut hotkey binding chord prefix"
|
||||
}
|
||||
L10nKey::SettingsSearchKeybindingsTitle => "キーバインド",
|
||||
L10nKey::SettingsSearchKeybindingsTitle => "キーボードショートカット",
|
||||
L10nKey::SettingsSearchLineHeightKeywords => {
|
||||
"タイポグラフィ リーディング 行間 line height typography leading spacing"
|
||||
}
|
||||
@@ -1013,7 +1032,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SwitcherNoMatch => "一致するワークスペースまたはマシンがありません",
|
||||
L10nKey::AddSshHost => "SSH ホストを追加…",
|
||||
L10nKey::ClickForNewWindow => "クリックで新しいウィンドウを開く",
|
||||
L10nKey::RestartServer => "サーバーを再起動",
|
||||
L10nKey::RestartServer => "tty7 server を再起動",
|
||||
L10nKey::OtherMachines => "その他のマシン",
|
||||
L10nKey::Ok => "OK",
|
||||
L10nKey::SftpNoTransfers => "転送はまだありません",
|
||||
@@ -1362,7 +1381,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
}
|
||||
L10nKey::RemoteThisComputer => "このコンピュータ",
|
||||
L10nKey::RemoteProfileGone => "削除されたプロファイル",
|
||||
L10nKey::RemoteRestartTitle => "「{machine}」上の tty7 サーバーを再起動しますか?",
|
||||
L10nKey::RemoteRestartTitle => "「{machine}」上の tty7 serverを再起動しますか?",
|
||||
L10nKey::RemoteRestartBody => {
|
||||
"{machine} 上のシェルは、表示されていないものも含めてすべて終了します。ワークスペースとレイアウトは保持され、新しいシェルで開きます"
|
||||
}
|
||||
@@ -1370,13 +1389,13 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
"tty7 は {machine} に対応するサーバーをインストールして起動します。\n\n{machine} で実行中のすべてのセッションが終了します。このウィンドウが接続していないセッションも含みます"
|
||||
}
|
||||
L10nKey::RemoteRestartFailedTitle => {
|
||||
"「{machine}」上の tty7 サーバーは再起動されませんでした"
|
||||
"「{machine}」上の tty7 serverは再起動されませんでした"
|
||||
}
|
||||
L10nKey::RemoteRestartFailedBody => {
|
||||
"{error}\n\nそこで実行中のセッションは古いビルドのままです。セッションがなくなっている場合は、再接続時にこのビルドのサーバーが起動します"
|
||||
}
|
||||
L10nKey::RemoteHostUnreachable => "{machine} に到達できませんでした: {error}",
|
||||
L10nKey::RemoteInstallTitle => "「{machine}」に tty7 サーバーをインストールしますか?",
|
||||
L10nKey::RemoteInstallTitle => "「{machine}」に tty7 serverをインストールしますか?",
|
||||
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}"
|
||||
}
|
||||
@@ -1389,7 +1408,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
"このマシンでの今後のアップグレードはサイレントにインストールされます"
|
||||
}
|
||||
L10nKey::RemoteInstallBytes => "バイト",
|
||||
L10nKey::RemoteMismatchTitle => "「{machine}」上の tty7 サーバーを更新しますか?",
|
||||
L10nKey::RemoteMismatchTitle => "「{machine}」上の tty7 serverを更新しますか?",
|
||||
L10nKey::RemoteMismatchDetail => {
|
||||
"{machine} はサーバー {running} で動いていますが、このクライアント({wanted})はそのプロトコルを話せません。対応するサーバーはインストール済みですが、セッションは実行中のサーバー上にあります。\n\n{replace_server}\u{2003}{wanted} に置き換え、そのサーバー上のセッションをすべて終了します。\n{cancel}\u{2003}{machine} はそのままです。このウィンドウは接続しません"
|
||||
}
|
||||
@@ -1398,10 +1417,10 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::RemoteMismatchUnknownBuild => "不明なビルド",
|
||||
L10nKey::RemoteMismatchUnknownBuildFromExe => "不明なビルド({exe} から)",
|
||||
L10nKey::RemoteServerOutdated => {
|
||||
"{machine} の tty7 サーバーが古く({build})、この tty7 からは通信できません。更新すると接続できます"
|
||||
"{machine} の tty7 serverが古く({build})、この tty7 からは通信できません。更新すると接続できます"
|
||||
}
|
||||
L10nKey::RemoteServerTooNew => {
|
||||
"{machine} の tty7 サーバー({build})は、この tty7 より新しいバージョンです。このコンピューターの tty7 を更新するか、向こうのサーバーを対応するものに置き換えてください"
|
||||
"{machine} の tty7 server({build})は、この tty7 より新しいバージョンです。このコンピューターの tty7 を更新するか、向こうのサーバーを対応するものに置き換えてください"
|
||||
}
|
||||
L10nKey::RemoteDaemonStartFailed => {
|
||||
"tty7 のローカルサーバーを起動できませんでした: {error}"
|
||||
@@ -1419,13 +1438,13 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
"ローカルの --stdio ワークスペースには SSH 接続がありません"
|
||||
}
|
||||
L10nKey::RemoteHostNotTty7 => {
|
||||
"{machine} は応答しましたが、tty7 サーバーとしては応答しませんでした: {error}"
|
||||
"{machine} は応答しましたが、tty7 serverとしては応答しませんでした: {error}"
|
||||
}
|
||||
L10nKey::RemoteWorkspaceListFailed => {
|
||||
"{machine} に接続しましたが、ワークスペースの一覧を取得できませんでした: {error}"
|
||||
}
|
||||
L10nKey::RemoteServerRestartFailed => {
|
||||
"{machine} 上の tty7 サーバーを再起動できませんでした: {error}"
|
||||
"{machine} 上の tty7 serverを再起動できませんでした: {error}"
|
||||
}
|
||||
L10nKey::RemoteNoRouteToHost => "tty7 は {machine} に到達する手段を失いました",
|
||||
L10nKey::RemoteMachineTreeUnexpectedReply => {
|
||||
@@ -1495,7 +1514,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::IoBusy => "他のプログラムが使用中です。",
|
||||
L10nKey::IoTimedOut => "時間内に応答がありませんでした。",
|
||||
L10nKey::TreeWindowOpenedEmpty => {
|
||||
"サーバーがこのウィンドウのタブを渡さなかったため、空のまま開きました。失われたものはなく、応答すれば戻ります。戻らない場合はコマンドパレットの「サーバーを再起動」を実行してください"
|
||||
"サーバーがこのウィンドウのタブを渡さなかったため、空のまま開きました。失われたものはなく、応答すれば戻ります。戻らない場合はコマンドパレットの「tty7 server を再起動」を実行してください"
|
||||
}
|
||||
L10nKey::CmdGroupTabsPanes => "タブとペイン",
|
||||
L10nKey::CmdGroupWorkspaces => "ワークスペース",
|
||||
@@ -1607,32 +1626,30 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::CmdDocumentation => "ドキュメント",
|
||||
L10nKey::CmdJoinDiscord => "Discord に参加",
|
||||
L10nKey::CmdReportIssue => "問題を報告…",
|
||||
L10nKey::CmdRestartServer => "サーバーを再起動…",
|
||||
L10nKey::CmdRestartServer => "tty7 server を再起動…",
|
||||
L10nKey::CmdRestartServerSubtitle => "実行中のすべてのシェルを終了し、レイアウトは保持",
|
||||
L10nKey::CmdQuitTty7 => "tty7 を終了",
|
||||
L10nKey::CmdQuitTty7Subtitle => "サーバーを停止し、実行中のすべてのシェルを終了",
|
||||
L10nKey::CmdQuickConnect => "「{target}」に接続",
|
||||
L10nKey::CmdQuickConnectSaveProfile => "「{target}」をプロファイルとして保存…",
|
||||
L10nKey::CmdRecent => "最近",
|
||||
L10nKey::AppRestartServerTitle => "サーバーを再起動しますか?",
|
||||
L10nKey::AppRestartServerFailed => {
|
||||
"バックグラウンドサーバーを再起動できませんでした: {error}"
|
||||
}
|
||||
L10nKey::AppRestartServerTitle => "tty7 server を再起動しますか?",
|
||||
L10nKey::AppRestartServerFailed => "tty7 server を再起動できませんでした: {error}",
|
||||
L10nKey::AppRestartServerMismatchDetail => {
|
||||
"サーバーはプロトコル {protocol}(ビルド v{build})、このアプリは {ours} のため、タブを取り出せません。\n\n終了:何も変わりません。サーバーもシェルも動き続けます。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
"tty7 server はプロトコル {protocol}(ビルド v{build})、このアプリは {ours} のため、タブを取り出せません。\n\n終了:何も変わりません。tty7 server もシェルも動き続けます。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
}
|
||||
L10nKey::AppRestartServerDialectDetail => {
|
||||
"サーバーは制御方言 v{dialect}(ビルド v{build})、このアプリは v{ours} のため、ウィンドウはどれも空で開きます。\n\n終了:何も変わりません。サーバーもシェルも動き続けます。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
"tty7 server は制御方言 v{dialect}(ビルド v{build})、このアプリは v{ours} のため、ウィンドウはどれも空で開きます。\n\n終了:何も変わりません。tty7 server もシェルも動き続けます。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
}
|
||||
L10nKey::AppRestartServerDialectNewerDetail => {
|
||||
"サーバーは制御方言 v{dialect}(ビルド v{build})、このアプリは v{ours} のため、ウィンドウはどれも空で開きます。\n\n終了して新しいビルドを入れる:根本的な解決で、シェルはそのまま残ります。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
"tty7 server は制御方言 v{dialect}(ビルド v{build})、このアプリは v{ours} のため、ウィンドウはどれも空で開きます。\n\n終了して新しいビルドを入れる:根本的な解決で、シェルはそのまま残ります。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
}
|
||||
L10nKey::AppRestartServerOldDetail => {
|
||||
"サーバーはバージョン照合より前のもので、何を話すか分かりません。\n\n終了:何も変わりません。サーバーもシェルも動き続けます。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
"tty7 server はバージョン照合より前のもので、何を話すか分かりません。\n\n終了:何も変わりません。tty7 server もシェルも動き続けます。\n再起動:タブは新しいシェルで戻り、いま実行中のものは終了します"
|
||||
}
|
||||
L10nKey::AppRestart => "再起動",
|
||||
L10nKey::AppRestartServerNoServer => {
|
||||
"{label} には再起動できるサーバーがありません。このコンピュータが --stdio で実行しているプログラムです。代わりにワークスペースを止めてください"
|
||||
"{label} には再起動できる tty7 server がありません。このコンピュータが --stdio で実行しているプログラムです。代わりにワークスペースを止めてください"
|
||||
}
|
||||
L10nKey::AppRestartServerBody => {
|
||||
"このコンピュータのシェルはすべて終了します。タブとレイアウトは保持され、新しいシェルで開きます"
|
||||
@@ -1788,15 +1805,15 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::Replace => "置き換える",
|
||||
L10nKey::SftpErrorInvalidOctalMode => "無効な 8 進数モードです",
|
||||
L10nKey::SettingsDaemonStaleDescInPlace => {
|
||||
"tty7 はその場で更新されました。アプリは新しく、ペインはまだ前のビルドで動いています。サーバーは停止せずに新しいビルドへ置き換えられるので、シェルはそのまま引き継がれます。tty7 内蔵の SSH クライアントを使うペインだけは例外で、その接続は閉じられ、開き直しが必要です"
|
||||
"tty7 はその場で更新されました。アプリは新しく、ペインはまだ前のビルドで動いています。tty7 server は停止せずに新しいビルドへ置き換えられるので、シェルはそのまま引き継がれます。tty7 内蔵の SSH クライアントを使うペインだけは例外で、その接続は閉じられ、開き直しが必要です"
|
||||
}
|
||||
L10nKey::AppRestartServerBodyInPlace => {
|
||||
"サーバーは停止せずに自分自身をこのビルドへ置き換えます。シェルは動いたままで、ウィンドウはすぐに再接続します。tty7 内蔵の SSH クライアントを使うペインだけは例外で、その接続は閉じられ、開き直しが必要です"
|
||||
"tty7 server は停止せずに自分自身をこのビルドへ置き換えます。シェルは動いたままで、ウィンドウはすぐに再接続します。tty7 内蔵の SSH クライアントを使うペインだけは例外で、その接続は閉じられ、開き直しが必要です"
|
||||
}
|
||||
L10nKey::PaneRestoredScreenBanner => {
|
||||
"復元された画面 — 以下は新しいシェルで、これより上のものは動いていません"
|
||||
}
|
||||
L10nKey::SettingsPerPaneHistory => "ペインごとに独自のシェル履歴を持たせる",
|
||||
L10nKey::SettingsPerPaneHistory => "ペインごとにコマンド履歴を分離",
|
||||
L10nKey::SettingsPerPaneHistoryDescription => {
|
||||
"上キーでたどるのは、全ペインが混ざったものではなくこのペインで実行したコマンドです。新しいペインは既存の履歴から始まり、追加分は閉じるときに書き戻されます。対象は tty7 が設定できる bash と zsh のペインで、独自の引数で起動したシェルはそのままです"
|
||||
}
|
||||
@@ -1882,7 +1899,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::AppMenuKeyboardShortcuts => "キーボードショートカット",
|
||||
L10nKey::AppMenuJoinDiscord => "Discord に参加",
|
||||
L10nKey::AppMenuReportIssue => "問題を報告…",
|
||||
L10nKey::AppMenuRestartServer => "サーバーを再起動…",
|
||||
L10nKey::AppMenuRestartServer => "tty7 server を再起動…",
|
||||
L10nKey::WindowUntitled => "無題",
|
||||
L10nKey::TrayShowTty7 => "tty7 を表示",
|
||||
L10nKey::TrayNotifications => "通知",
|
||||
@@ -1919,7 +1936,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::AppMenuEnterFullscreen => "全画面表示",
|
||||
L10nKey::HomeTimeOverWeekAgo => "1 週間以上前",
|
||||
L10nKey::Search => "検索",
|
||||
L10nKey::SettingsDaemonStaleRestart => "サービスを再起動",
|
||||
L10nKey::SettingsDaemonStaleRestart => "tty7 server を再起動",
|
||||
L10nKey::SettingsNoneLower => "なし",
|
||||
L10nKey::SettingsSearchCommandLineToolTitle => "コマンドラインツール",
|
||||
L10nKey::TabContextMarkUnread => "未読としてマーク",
|
||||
|
||||
+19
-6
@@ -62,13 +62,30 @@ macro_rules! l10n_keys {
|
||||
pub enum L10nKey { $($key),* }
|
||||
|
||||
impl L10nKey {
|
||||
#[cfg(test)]
|
||||
pub(crate) const ALL: &'static [L10nKey] = &[$(L10nKey::$key),*];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
l10n_keys! {
|
||||
SettingsSaveError,
|
||||
SettingsRetrySave,
|
||||
|
||||
SettingsNavGeneral,
|
||||
SettingsEditShortcuts,
|
||||
SettingsModifiedOnly,
|
||||
SettingsModified,
|
||||
SettingsResetValue,
|
||||
SettingsSearchResults,
|
||||
SettingsOpenSetting,
|
||||
SettingsNoModified,
|
||||
SettingsTerminalFontGroup,
|
||||
SettingsInterfaceFontGroup,
|
||||
SettingsUnsavedTitle,
|
||||
SettingsUnsavedBody,
|
||||
SettingsSaveChanges,
|
||||
SettingsThemeDraft,
|
||||
|
||||
SearchTabs,
|
||||
SearchFiles,
|
||||
SearchThemes,
|
||||
@@ -1567,6 +1584,7 @@ mod tests {
|
||||
L10nKey::HostOpsError,
|
||||
L10nKey::SftpTransferProgress,
|
||||
// Product names.
|
||||
L10nKey::SettingsServer,
|
||||
L10nKey::SettingsAgentClaudeCode,
|
||||
L10nKey::SettingsAgentCodex,
|
||||
L10nKey::SettingsAgentTraeCode,
|
||||
@@ -1597,16 +1615,11 @@ mod tests {
|
||||
// and no locale renames either.
|
||||
L10nKey::PanelShell,
|
||||
L10nKey::PanelSsh,
|
||||
// The zh copy calls the background process "server" throughout —
|
||||
// this heading is that word on its own.
|
||||
L10nKey::SettingsServer,
|
||||
// "Shell" and "Agent" are the words the Chinese- and
|
||||
// Japanese-speaking developer audience uses for these; a
|
||||
// translation here would be less clear, not more.
|
||||
L10nKey::SettingsShell,
|
||||
L10nKey::CmdGroupAgents,
|
||||
L10nKey::SettingsNavAgents,
|
||||
L10nKey::SettingsAgentsIntro,
|
||||
];
|
||||
|
||||
for &key in KEPT_IN_ENGLISH {
|
||||
|
||||
+73
-58
@@ -2,6 +2,23 @@ use super::L10nKey;
|
||||
|
||||
pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
Some(match key {
|
||||
L10nKey::SettingsNavGeneral => "常规",
|
||||
L10nKey::SettingsEditShortcuts => "编辑快捷键…",
|
||||
L10nKey::SettingsModifiedOnly => "仅显示已修改",
|
||||
L10nKey::SettingsModified => "已修改",
|
||||
L10nKey::SettingsResetValue => "恢复默认值",
|
||||
L10nKey::SettingsSearchResults => "搜索结果",
|
||||
L10nKey::SettingsOpenSetting => "打开设置",
|
||||
L10nKey::SettingsNoModified => "没有符合筛选条件的已修改设置。",
|
||||
L10nKey::SettingsTerminalFontGroup => "终端文字",
|
||||
L10nKey::SettingsInterfaceFontGroup => "界面文字",
|
||||
L10nKey::SettingsUnsavedTitle => "离开前保存更改?",
|
||||
L10nKey::SettingsUnsavedBody => "可以保存更改、放弃更改,或继续编辑。",
|
||||
L10nKey::SettingsSaveChanges => "保存更改",
|
||||
L10nKey::SettingsThemeDraft => "正在预览主题更改。保存以保留,取消以还原。",
|
||||
L10nKey::SettingsSaveError => "无法保存更改:{error}",
|
||||
L10nKey::SettingsRetrySave => "重新保存",
|
||||
|
||||
L10nKey::SearchTabs => "搜索标签页…",
|
||||
L10nKey::SearchFiles => "搜索文件…",
|
||||
L10nKey::SearchThemes => "搜索主题…",
|
||||
@@ -53,9 +70,9 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::RememberKeychain => "记住(钥匙串)",
|
||||
L10nKey::Cancel => "取消",
|
||||
L10nKey::Close => "关闭",
|
||||
L10nKey::QuitStopServerTitle => "退出并停止 server?",
|
||||
L10nKey::QuitStopServerTitle => "退出并停止 tty7 server?",
|
||||
L10nKey::QuitStopServerBody => {
|
||||
"这会退出 tty7 并停止后台 server,shell 里正在跑的东西都会被终止。标签页和布局会保留,下次启动时以全新的 shell 打开。(只关窗口的话应用收进托盘,shell 继续跑。)"
|
||||
"这会退出 tty7 并停止 tty7 server,shell 里正在跑的东西都会被终止。标签页和布局会保留,下次启动时以全新的 shell 打开。(只关窗口的话应用收进托盘,shell 继续跑。)"
|
||||
}
|
||||
L10nKey::QuitAndStop => "退出并停止",
|
||||
L10nKey::CloseSshConnectionTitle => "关闭这个 SSH 连接?",
|
||||
@@ -67,11 +84,11 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::Keep => "保留",
|
||||
L10nKey::SettingsNavAppearance => "外观",
|
||||
L10nKey::SettingsNavTerminal => "终端",
|
||||
L10nKey::SettingsNavInput => "输入",
|
||||
L10nKey::SettingsNavInput => "键盘与鼠标",
|
||||
L10nKey::SettingsNavSsh => "SSH",
|
||||
L10nKey::SettingsNavAgents => "Agents",
|
||||
L10nKey::SettingsNavAgents => "集成",
|
||||
L10nKey::SettingsNavWindowTabs => "窗口与标签页",
|
||||
L10nKey::SettingsNavKeybindings => "按键绑定",
|
||||
L10nKey::SettingsNavKeybindings => "快捷键",
|
||||
L10nKey::SettingsNavAbout => "关于",
|
||||
L10nKey::SettingsHeader => "设置",
|
||||
L10nKey::Reset => "重置",
|
||||
@@ -82,19 +99,19 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsThemeIntroTitle => "主题",
|
||||
L10nKey::SettingsThemeIntroDesc => "选择配色主题。每个主题都有各自的浅色或深色外观。",
|
||||
L10nKey::SettingsTypography => "字体排版",
|
||||
L10nKey::SettingsFontSize => "字号",
|
||||
L10nKey::SettingsFontSize => "终端字号",
|
||||
L10nKey::SettingsFontSizeDesc => "终端文字大小(像素)。",
|
||||
L10nKey::SettingsUiFontSize => "界面字号",
|
||||
L10nKey::SettingsUiFontSizeDesc => {
|
||||
"终端以外所有地方的文字大小——标签页、面板、设置。非 Retina 显示器上可以调大。"
|
||||
}
|
||||
L10nKey::SettingsUiFontFamily => "界面字体族",
|
||||
L10nKey::SettingsUiFontFamily => "界面字体",
|
||||
L10nKey::SettingsUiFontFamilyDesc => {
|
||||
"用于标签页、侧栏、弹窗和设置的字体;默认使用系统 UI 字体。"
|
||||
}
|
||||
L10nKey::SettingsLineHeight => "行高",
|
||||
L10nKey::SettingsLineHeightDesc => "行间距为字号的倍数。",
|
||||
L10nKey::SettingsFontFamily => "字体族",
|
||||
L10nKey::SettingsFontFamily => "终端字体",
|
||||
L10nKey::SettingsFontFamilyDesc => "从系统已安装的字体中选择。",
|
||||
L10nKey::SettingsBoldFont => "粗体字体",
|
||||
L10nKey::SettingsBoldFontDesc => "粗体文字使用的字体;默认由主字体合成。",
|
||||
@@ -230,8 +247,8 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
"在关闭带有活动 SSH 会话的标签页或窗格前请求确认。"
|
||||
}
|
||||
L10nKey::SettingsNewHost => "新主机",
|
||||
L10nKey::SettingsDiscardChangesTitle => "丢弃未保存的改动?",
|
||||
L10nKey::SettingsDiscardChangesBody => "你正在编辑的连接有还没保存的改动。",
|
||||
L10nKey::SettingsDiscardChangesTitle => "放弃未保存的更改?",
|
||||
L10nKey::SettingsDiscardChangesBody => "当前连接有未保存的更改。",
|
||||
L10nKey::SettingsKeepEditing => "继续编辑",
|
||||
L10nKey::SettingsName => "名称",
|
||||
L10nKey::SettingsHost => "主机",
|
||||
@@ -355,16 +372,16 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsOff => "关",
|
||||
L10nKey::SettingsShell => "Shell",
|
||||
L10nKey::SettingsShellIntro => {
|
||||
"每个新终端启动的程序。将“程序”留空可使用平台默认值({default})。"
|
||||
"每个新终端启动的程序。将“Shell 程序”留空可使用平台默认值({default})。"
|
||||
}
|
||||
L10nKey::SettingsProgram => "程序",
|
||||
L10nKey::SettingsProgram => "Shell 程序",
|
||||
L10nKey::SettingsProgramDesc => "PATH 中的可执行文件名或绝对路径,例如 zsh、fish、pwsh。",
|
||||
L10nKey::SettingsArguments => "参数",
|
||||
L10nKey::SettingsArguments => "Shell 参数",
|
||||
L10nKey::SettingsArgumentsDesc => {
|
||||
"启动参数,按命令行规则切分——含空格的参数请用引号包住(例如 -l,或 -c \"echo hi\")。"
|
||||
}
|
||||
L10nKey::SettingsArgumentsInvalid => "引号不配对,该值未保存。",
|
||||
L10nKey::SettingsStartIn => "起始目录",
|
||||
L10nKey::SettingsStartIn => "启动目录",
|
||||
L10nKey::SettingsStartInDesc => "新 shell 的启动目录:tty7 的启动目录、主目录或固定路径。",
|
||||
L10nKey::SettingsCustomPath => "自定义路径",
|
||||
L10nKey::SettingsCustomPathDesc => "新 shell 启动的目录。",
|
||||
@@ -376,8 +393,8 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
"仅适用于没有目录可继承的 shell,例如窗口的第一个标签页。新标签页和分屏仍继承活动窗格的目录,已打开的 shell 继续运行。"
|
||||
}
|
||||
L10nKey::SettingsScrolling => "滚动",
|
||||
L10nKey::SettingsScrollback => "回滚行数",
|
||||
L10nKey::SettingsScrollbackDesc => "每个窗格保留的历史行数。仅适用于新窗格。",
|
||||
L10nKey::SettingsScrollback => "终端输出历史行数",
|
||||
L10nKey::SettingsScrollbackDesc => "每个窗格保留的终端输出行数。仅适用于新窗格。",
|
||||
L10nKey::SettingsScrollSpeed => "滚动速度",
|
||||
L10nKey::SettingsScrollSpeedDesc => "应用于鼠标滚轮滚动的倍率。",
|
||||
L10nKey::SettingsSmoothScroll => "平滑滚动",
|
||||
@@ -429,11 +446,11 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsBellModeVisual => "闪烁",
|
||||
L10nKey::SettingsBellModeAudible => "声音",
|
||||
L10nKey::SettingsBellModeBoth => "闪烁 + 声音",
|
||||
L10nKey::SettingsPrompt => "提示符",
|
||||
L10nKey::SettingsPrompt => "提示符与命令历史",
|
||||
L10nKey::SettingsPromptIntro => {
|
||||
"shell 提示符处的 tty7 自带编辑器与菜单。关闭某项即可把这部分交还给 shell。"
|
||||
}
|
||||
L10nKey::SettingsPromptEditor => "提示符编辑器",
|
||||
L10nKey::SettingsPromptEditor => "tty7 提示符编辑器",
|
||||
L10nKey::SettingsPromptEditorDesc => {
|
||||
"由 tty7 编辑你在 shell 提示符上敲的这一行:选择、撤销,以及下面这些菜单。关闭后交还给 shell 自己的行编辑器——ZLE、readline、fish。"
|
||||
}
|
||||
@@ -444,7 +461,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsTabCompletionDesc => {
|
||||
"在提示符按 Tab 打开 tty7 的补全菜单。关闭后 Tab 交由 shell 自身的补全处理。"
|
||||
}
|
||||
L10nKey::SettingsHistorySearch => "历史搜索",
|
||||
L10nKey::SettingsHistorySearch => "命令历史搜索",
|
||||
L10nKey::SettingsHistorySearchDesc => {
|
||||
"在提示符按 ⌃R 打开 tty7 的模糊历史菜单。关闭后 ⌃R 交给 shell——它自带的反向搜索,或你绑定的其它功能(fzf、percol)。"
|
||||
}
|
||||
@@ -468,11 +485,11 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsOptionAsMetaDesc => {
|
||||
"⌥+按键 发送 shell 期望的转义组合键(⌥B = 后退一个词),而不是输入特殊字符(∫)。"
|
||||
}
|
||||
L10nKey::SettingsAgentsIntro => "Agents",
|
||||
L10nKey::SettingsAgentsIntro => "AI agent",
|
||||
L10nKey::SettingsAgentsIntroDesc => {
|
||||
"hook 让跑这些 agent 的窗格在标签栏实时显示状态(进行中 / 等待中 / 已完成)。仅在 tty7 内生效。"
|
||||
"安装 hook,让运行 AI agent 的窗格在标签栏显示实时状态(进行中 / 等待中 / 已完成)。仅在 tty7 内生效。"
|
||||
}
|
||||
L10nKey::SettingsReadingAgentConfig => "正在读取这台机器的 agent 配置…",
|
||||
L10nKey::SettingsReadingAgentConfig => "正在读取这台机器的 AI agent 配置…",
|
||||
L10nKey::SettingsStatusNotInstalled => "未安装",
|
||||
L10nKey::SettingsStatusInstalled => "已安装",
|
||||
L10nKey::SettingsStatusOutdated => "已过时",
|
||||
@@ -533,9 +550,9 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsNotifications => "通知",
|
||||
L10nKey::SettingsNotifyOnCommandFinish => "命令完成时通知",
|
||||
L10nKey::SettingsNotifyOnCommandFinishDesc => "较长的前台命令完成后发出桌面提醒。",
|
||||
L10nKey::SettingsNotifyThreshold => "通知阈值",
|
||||
L10nKey::SettingsNotifyThresholdDesc => "命令需运行多久才能算作“较长”。",
|
||||
L10nKey::SettingsWindow => "窗口",
|
||||
L10nKey::SettingsNotifyThreshold => "最短命令运行时间",
|
||||
L10nKey::SettingsNotifyThresholdDesc => "仅在命令运行达到此时长后发送完成通知。",
|
||||
L10nKey::SettingsWindow => "启动与恢复",
|
||||
L10nKey::NotifyModeNever => "从不",
|
||||
L10nKey::NotifyModeUnfocused => "窗口未聚焦时",
|
||||
L10nKey::NotifyModeAlways => "总是",
|
||||
@@ -571,7 +588,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::KeybindForkSessionLeft => "向左 Fork 会话",
|
||||
L10nKey::KeybindForkSessionDown => "向下 Fork 会话",
|
||||
L10nKey::KeybindForkSessionUp => "向上 Fork 会话",
|
||||
L10nKey::SettingsAboutDesc1 => "终端工作台:常驻会话、远程工作、agent。",
|
||||
L10nKey::SettingsAboutDesc1 => "终端工作台:持久会话、远程开发、AI agent。",
|
||||
L10nKey::SettingsDefaultTerminal => "默认终端",
|
||||
L10nKey::SettingsDefaultTerminalDesc => {
|
||||
"将 tty7 设为 Unix 可执行文件、SSH 链接和 man 页面链接的 macOS 默认终端。tty7 仍可打开文件夹和脚本,但不会替换 Finder 的文件夹处理程序。自行指定终端的应用可能不会遵循此设置。"
|
||||
@@ -607,20 +624,20 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
}
|
||||
L10nKey::SettingsUpdateChannel => "更新通道",
|
||||
L10nKey::SettingsUpdateChannelDesc => {
|
||||
"Stable 跟随正式发布的版本,Nightly 跟随每晚从最新代码构建的版本——更新更快,但没有经过发布测试。"
|
||||
"稳定版(Stable)跟随正式发布的版本;每夜构建(Nightly)跟随每晚从最新代码构建的版本,更新更快,但未经发布测试。"
|
||||
}
|
||||
L10nKey::SettingsUpdateChannelStable => "稳定版",
|
||||
L10nKey::SettingsUpdateChannelNightly => "每夜构建",
|
||||
L10nKey::SettingsDaemonStale => "后台 server 仍运行在 {build}。",
|
||||
L10nKey::SettingsDaemonStale => "tty7 server 仍运行在 {build}。",
|
||||
L10nKey::SettingsDaemonStaleDesc => {
|
||||
"tty7 是原地升级的:界面已是新版,pane 还由旧版 server 托管。重启 server 换成新版,代价是 pane 里正在跑的进程全部结束。不急,挑 pane 空闲时再重启。"
|
||||
"tty7 是原地升级的:界面已是新版,窗格还由旧版 tty7 server 托管。重启 tty7 server 换成新版,代价是窗格里正在跑的进程全部结束。不急,挑窗格空闲时再重启。"
|
||||
}
|
||||
L10nKey::UpdateDialogTitle => "有可用更新",
|
||||
L10nKey::UpdateDialogDetail => {
|
||||
"tty7 {version} 已发布,你现在是 {current}。安装会重启应用;后台 server 不动,pane 里的东西都还在。"
|
||||
"tty7 {version} 已发布,你现在是 {current}。安装会重启应用;tty7 server 不动,窗格里的东西都还在。"
|
||||
}
|
||||
L10nKey::UpdateDialogDetailWindows => {
|
||||
"tty7 {version} 已发布,你现在是 {current}。安装会重启应用和后台 server:pane 里的进程会被结束,标签页和布局以全新的 shell 恢复。"
|
||||
"tty7 {version} 已发布,你现在是 {current}。安装会重启应用和 tty7 server:窗格里的进程会被结束,标签页和布局以全新的 shell 恢复。"
|
||||
}
|
||||
L10nKey::UpdateDialogDetailManual => "tty7 {version} 已发布,你现在是 {current}。{hint}",
|
||||
L10nKey::UpdateDialogCannotSelfUpdate => "这份安装无法自行更新。",
|
||||
@@ -659,17 +676,15 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsCheckUpdatesOnLaunch => "启动时检查更新",
|
||||
L10nKey::SettingsCommandLine => "命令行",
|
||||
L10nKey::SettingsCommandLineDesc => {
|
||||
"把自带的 tty7 命令加入 PATH,让脚本和 agent 能从任意终端驱动 tty7——在 tty7 窗格内两种情况都可用。自己构建的 tty7 不想被遮蔽就关掉。下次启动生效。"
|
||||
"让脚本和 AI agent 使用随应用提供的 tty7 命令。下次启动生效;关闭后不会移除已安装的命令。"
|
||||
}
|
||||
L10nKey::SettingsInstallCliOnPath => "将 `tty7` 命令安装到 PATH",
|
||||
L10nKey::SettingsServer => "Server",
|
||||
L10nKey::SettingsServerDesc => {
|
||||
"重启在后台维持 shell 运行的 server。这台计算机上所有 shell 都会结束;标签页和布局会以全新的 shell 重新打开。"
|
||||
}
|
||||
L10nKey::SettingsRestartServer => "重启 server…",
|
||||
L10nKey::SettingsInstallCliOnPath => "将 tty7 命令安装到 PATH",
|
||||
L10nKey::SettingsServer => "tty7 server",
|
||||
L10nKey::SettingsServerDesc => "管理这台计算机上的终端会话,让会话在后台持续运行。",
|
||||
L10nKey::SettingsRestartServer => "重启 tty7 server…",
|
||||
L10nKey::SettingsAppHttpProxy => "更新代理",
|
||||
L10nKey::SettingsAppHttpProxyDesc => {
|
||||
"仅用于 tty7 自身的更新检查和下载,不影响面板中运行的程序。留空则跟随系统代理。"
|
||||
"仅用于 tty7 自身的更新检查和下载,不影响窗格中运行的程序。留空则跟随系统代理。"
|
||||
}
|
||||
L10nKey::SettingsAppHttpProxyInvalid => "不是有效的代理地址,该值未保存。",
|
||||
L10nKey::SettingsAgentClaudeCode => "Claude Code",
|
||||
@@ -776,7 +791,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SettingsSearchKeybindingsKeywords => {
|
||||
"按键绑定 快捷键 热键 键盘 绑定 前缀 tmux keybindings shortcut hotkey binding prefix"
|
||||
}
|
||||
L10nKey::SettingsSearchKeybindingsTitle => "按键绑定",
|
||||
L10nKey::SettingsSearchKeybindingsTitle => "快捷键",
|
||||
L10nKey::SettingsSearchLineHeightKeywords => {
|
||||
"行高 行间距 行距 typography line height spacing leading"
|
||||
}
|
||||
@@ -908,7 +923,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::SwitcherNoMatch => "没有匹配的工作区或机器。",
|
||||
L10nKey::AddSshHost => "添加 SSH 主机…",
|
||||
L10nKey::ClickForNewWindow => "点击打开新窗口",
|
||||
L10nKey::RestartServer => "重启 server",
|
||||
L10nKey::RestartServer => "重启 tty7 server",
|
||||
L10nKey::OtherMachines => "其他机器",
|
||||
L10nKey::Ok => "确定",
|
||||
L10nKey::SftpNoTransfers => "还没有传输任务。",
|
||||
@@ -1344,7 +1359,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::IoBusy => "有别的程序正占着它。",
|
||||
L10nKey::IoTimedOut => "对方没有在规定时间内响应。",
|
||||
L10nKey::TreeWindowOpenedEmpty => {
|
||||
"server 没有交出这个窗口的标签页,所以窗口是空的。什么都没丢,它一响应就会回来。如果一直不回来,在命令面板里执行「重启 server」。"
|
||||
"tty7 server 没有交出这个窗口的标签页,所以窗口是空的。什么都没丢,它一响应就会回来。如果一直不回来,在命令面板里执行「重启 tty7 server」。"
|
||||
}
|
||||
L10nKey::CmdGroupTabsPanes => "标签页与窗格",
|
||||
L10nKey::CmdGroupWorkspaces => "工作区",
|
||||
@@ -1450,36 +1465,36 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::CmdAgentSendGitDiffForReview => "Agent:发送 git diff 以供审查",
|
||||
L10nKey::CmdAgentSendGitDiffSubtitle => "git diff → 运行中的编码 agent",
|
||||
L10nKey::CmdSettings => "设置…",
|
||||
L10nKey::CmdKeyboardShortcuts => "键盘快捷键",
|
||||
L10nKey::CmdKeyboardShortcuts => "快捷键",
|
||||
L10nKey::CmdAboutTty7 => "关于 tty7",
|
||||
L10nKey::CmdCheckForUpdates => "检查更新…",
|
||||
L10nKey::CmdDocumentation => "文档",
|
||||
L10nKey::CmdJoinDiscord => "加入 Discord",
|
||||
L10nKey::CmdReportIssue => "报告问题…",
|
||||
L10nKey::CmdRestartServer => "重启 server…",
|
||||
L10nKey::CmdRestartServer => "重启 tty7 server…",
|
||||
L10nKey::CmdRestartServerSubtitle => "结束所有运行中的 shell;保留布局",
|
||||
L10nKey::CmdQuitTty7 => "退出 tty7",
|
||||
L10nKey::CmdQuitTty7Subtitle => "停止服务;结束所有运行中的 shell",
|
||||
L10nKey::CmdQuickConnect => "连接到“{target}”",
|
||||
L10nKey::CmdQuickConnectSaveProfile => "将“{target}”保存为主机配置…",
|
||||
L10nKey::CmdRecent => "最近使用",
|
||||
L10nKey::AppRestartServerTitle => "重启 server?",
|
||||
L10nKey::AppRestartServerFailed => "无法重启后台 server:{error}",
|
||||
L10nKey::AppRestartServerTitle => "重启 tty7 server?",
|
||||
L10nKey::AppRestartServerFailed => "无法重启 tty7 server:{error}",
|
||||
L10nKey::AppRestartServerMismatchDetail => {
|
||||
"server 用协议 {protocol}(构建 v{build}),此应用用 {ours},标签页取不出来。\n\n退出:什么都不变,server 和 shell 继续运行。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
"tty7 server 用协议 {protocol}(构建 v{build}),此应用用 {ours},标签页取不出来。\n\n退出:什么都不变,tty7 server 和 shell 继续运行。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
}
|
||||
L10nKey::AppRestartServerDialectDetail => {
|
||||
"server 用 control 方言 v{dialect}(构建 v{build}),此应用用 v{ours},每个窗口都开成空的。\n\n退出:什么都不变,server 和 shell 继续运行。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
"tty7 server 用 control 方言 v{dialect}(构建 v{build}),此应用用 v{ours},每个窗口都开成空的。\n\n退出:什么都不变,tty7 server 和 shell 继续运行。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
}
|
||||
L10nKey::AppRestartServerDialectNewerDetail => {
|
||||
"server 用 control 方言 v{dialect}(构建 v{build}),此应用用 v{ours},每个窗口都开成空的。\n\n退出并装上更新的构建:真正的解法,shell 全都还在。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
"tty7 server 用 control 方言 v{dialect}(构建 v{build}),此应用用 v{ours},每个窗口都开成空的。\n\n退出并装上更新的构建:真正的解法,shell 全都还在。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
}
|
||||
L10nKey::AppRestartServerOldDetail => {
|
||||
"server 早于版本握手,此应用无从得知它说的是什么。\n\n退出:什么都不变,server 和 shell 继续运行。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
"tty7 server 早于版本握手,此应用无从得知它说的是什么。\n\n退出:什么都不变,tty7 server 和 shell 继续运行。\n重启:标签页带全新 shell 回来,现在跑着的东西会被杀掉。"
|
||||
}
|
||||
L10nKey::AppRestart => "重启",
|
||||
L10nKey::AppRestartServerNoServer => {
|
||||
"{label} 没有自己的 server 可重启——它是本机通过 --stdio 运行的程序。请改为停止其工作区。"
|
||||
"{label} 没有自己的 tty7 server 可重启——它是本机通过 --stdio 运行的程序。请改为停止其工作区。"
|
||||
}
|
||||
L10nKey::AppRestartServerBody => {
|
||||
"这会结束本机上所有 shell。标签页和布局会保留,并以全新的 shell 重新打开。"
|
||||
@@ -1615,17 +1630,17 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::Replace => "覆盖",
|
||||
L10nKey::SftpErrorInvalidOctalMode => "无效的八进制模式",
|
||||
L10nKey::SettingsDaemonStaleDescInPlace => {
|
||||
"tty7 是原地更新的:应用是新的,面板还跑在旧版上。server 可以不停机就换成新版,shell 直接延续下来。用 tty7 内置 SSH 客户端的面板除外——那些连接会断开,需要重新打开。"
|
||||
"tty7 是原地更新的:应用是新的,窗格还跑在旧版上。tty7 server 可以不停机就换成新版,shell 直接延续下来。用 tty7 内置 SSH 客户端的窗格除外——那些连接会断开,需要重新打开。"
|
||||
}
|
||||
L10nKey::AppRestartServerBodyInPlace => {
|
||||
"后台 server 会原地把自己换成当前这个版本:shell 继续运行,窗口稍后自动连回去。用 tty7 内置 SSH 客户端的面板除外——那些连接会断开,需要重新打开。"
|
||||
"tty7 server 会原地把自己换成当前这个版本:shell 继续运行,窗口稍后自动连回去。用 tty7 内置 SSH 客户端的窗格除外——那些连接会断开,需要重新打开。"
|
||||
}
|
||||
L10nKey::PaneRestoredScreenBanner => {
|
||||
"已恢复的画面 —— 下面是新的 shell,上面的内容都已不在运行"
|
||||
}
|
||||
L10nKey::SettingsPerPaneHistory => "每个面板用自己的 shell 历史",
|
||||
L10nKey::SettingsPerPaneHistory => "各窗格使用独立命令历史",
|
||||
L10nKey::SettingsPerPaneHistoryDescription => {
|
||||
"上方向键翻的是这个面板里跑过的命令,而不是所有面板混在一起。新面板从已有历史开始,关闭时把新增的写回去。只对 tty7 能接管的 bash 和 zsh 面板生效;用你自己参数启动的 shell 不受影响。"
|
||||
"上方向键翻的是这个窗格里跑过的命令,而不是所有窗格混在一起。新窗格从已有历史开始,关闭时把新增的写回去。只对 tty7 能接管的 bash 和 zsh 窗格生效;用你自己参数启动的 shell 不受影响。"
|
||||
}
|
||||
L10nKey::IntegrationNoticeBlocked => {
|
||||
"“{wrapper}”截获了此窗格的 shell 上报,内联补全和 Ctrl+R 菜单不可用。shell 自带的历史搜索仍可使用。"
|
||||
@@ -1704,10 +1719,10 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::AppMenuRevealInFolder => "打开所在文件夹",
|
||||
L10nKey::AppMenuCopyLinkPath => "复制路径",
|
||||
L10nKey::AppMenuDocumentation => "tty7 文档",
|
||||
L10nKey::AppMenuKeyboardShortcuts => "键盘快捷键",
|
||||
L10nKey::AppMenuKeyboardShortcuts => "快捷键",
|
||||
L10nKey::AppMenuJoinDiscord => "加入 Discord",
|
||||
L10nKey::AppMenuReportIssue => "报告问题…",
|
||||
L10nKey::AppMenuRestartServer => "重启 server…",
|
||||
L10nKey::AppMenuRestartServer => "重启 tty7 server…",
|
||||
L10nKey::WindowUntitled => "未命名",
|
||||
L10nKey::TrayShowTty7 => "显示 tty7",
|
||||
L10nKey::TrayNotifications => "通知",
|
||||
@@ -1744,7 +1759,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
|
||||
L10nKey::AppMenuEnterFullscreen => "进入全屏",
|
||||
L10nKey::HomeTimeOverWeekAgo => "一周多前",
|
||||
L10nKey::Search => "搜索",
|
||||
L10nKey::SettingsDaemonStaleRestart => "重启 server",
|
||||
L10nKey::SettingsDaemonStaleRestart => "重启 tty7 server",
|
||||
L10nKey::SettingsNoneLower => "无",
|
||||
L10nKey::SettingsSearchCommandLineToolTitle => "命令行工具",
|
||||
L10nKey::TabContextMarkUnread => "标记为未读",
|
||||
|
||||
+2004
-603
File diff suppressed because it is too large
Load Diff
+14
-19
@@ -150,8 +150,7 @@ impl Tty7App {
|
||||
window: &mut gpui::Window,
|
||||
cx: &mut gpui::Context<Self>,
|
||||
) {
|
||||
self.open_settings_section(crate::ui::settings::SettingsSection::Ssh, window, cx);
|
||||
self.add_new_profile(window, cx);
|
||||
self.open_ssh_profile_form(SshProfile::new(String::new()), window, cx);
|
||||
}
|
||||
|
||||
/// The connection in the focused pane, when it was dialled by hand rather
|
||||
@@ -199,17 +198,18 @@ impl Tty7App {
|
||||
) {
|
||||
let profile = profile_from_live_spec(spec);
|
||||
let jumped = spec.jump.is_some();
|
||||
self.open_settings_section(crate::ui::settings::SettingsSection::Ssh, window, cx);
|
||||
self.ssh_form_load(&profile, window, cx);
|
||||
if jumped {
|
||||
use gpui_component::WindowExt as _;
|
||||
// Silently dropping the hop would leave a host that saves fine and
|
||||
// then cannot be reached.
|
||||
window.push_notification(
|
||||
crate::ui::i18n::t(crate::ui::i18n::L10nKey::SshSaveDroppedJumpHost),
|
||||
cx,
|
||||
);
|
||||
}
|
||||
self.with_settings_edits_resolved(window, cx, move |this, window, cx| {
|
||||
this.open_ssh_profile_form(profile, window, cx);
|
||||
if jumped {
|
||||
use gpui_component::WindowExt as _;
|
||||
// Silently dropping the hop would leave a host that saves fine and
|
||||
// then cannot be reached.
|
||||
window.push_notification(
|
||||
crate::ui::i18n::t(crate::ui::i18n::L10nKey::SshSaveDroppedJumpHost),
|
||||
cx,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// The host form for a machine you are looking at somewhere else: its own
|
||||
@@ -234,12 +234,7 @@ impl Tty7App {
|
||||
profile.id = Uuid::new_v4();
|
||||
profile.name = alias.clone();
|
||||
profile.group = None;
|
||||
self.open_settings_section(
|
||||
crate::ui::settings::SettingsSection::Ssh,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
self.ssh_form_load(&profile, window, cx);
|
||||
self.open_ssh_profile_form(profile, window, cx);
|
||||
}
|
||||
None => self.open_ssh_profile_new_from_target(alias.clone(), window, cx),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user