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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions crates/herdr-gpui/locales/en-US/error-automations.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@
# host. $host is a host's name; $path is an automation script's path on it.

error-automations-approved = { $path } is already approved on { $host }
# $path is the herdr-automate program file this app ships.
error-automations-binary = Could not read the herdr-automate build at { $path }
error-automations-checksum = The copy on the host did not match this app's build; nothing was installed
error-automations-json = herdr-automate printed output this app cannot read
error-automations-missing = herdr-automate is not installed on this host
# $platform is a system and processor, such as linux-x86_64.
error-automations-no-build = This app has no herdr-automate build for { $platform }
error-automations-no-script = { $host } has no automation script { $path }
error-automations-not-read = { $host } has not been read yet; try again in a moment
error-automations-off = Automations are turned off in Herdr UI: Settings, Sidebar, Show automations
# $output is what `uname -sm` printed.
error-automations-platform = Cannot tell this host's platform from `uname -sm`: { $output }
# $found and $expected are report protocol version numbers.
error-automations-protocol = herdr-automate on this host speaks report protocol { $found }; this app reads { $expected }. Update this app.
# $error is herdr-automate's own message, kept as it is.
Expand Down
14 changes: 14 additions & 0 deletions crates/herdr-gpui/locales/en-US/error-client-terminal-attach.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# A direct terminal attach to Herdr, which streams one terminal's screen.

error-client-terminal-attach-busy = too many terminal scrolls are waiting
error-client-terminal-attach-ended = the terminal attach has ended
error-client-terminal-attach-io = terminal attach I/O failed
error-client-terminal-attach-protocol = terminal attach framing failed
error-client-terminal-attach-refused = Herdr refused the terminal attach
# $reason is Herdr's own words.
error-client-terminal-attach-refused-reason = Herdr refused the terminal attach: { $reason }
# $version is the attach protocol version this app speaks.
error-client-terminal-attach-rejected = Herdr refused the terminal hello (protocol { $version })
error-client-terminal-attach-scroll = a terminal scroll must move at least one line
error-client-terminal-attach-size = terminal size must be nonzero
error-client-terminal-attach-unexpected = Herdr answered the terminal hello with an unexpected message
8 changes: 8 additions & 0 deletions crates/herdr-gpui/locales/en-US/error-host-build.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copying one of this app's programs (herdr-automate, herdr-remote-control)
# to a host. $program is the program's name.

# $path is the program file this app ships.
error-host-build-binary = Could not read the { $program } build at { $path }
error-host-build-checksum = The copy on the host did not match this app's build; nothing was installed
# $output is what `uname -sm` printed.
error-host-build-platform = Cannot tell this host's platform from `uname -sm`: { $output }
7 changes: 7 additions & 0 deletions crates/herdr-gpui/locales/en-US/error-nearby.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The Bluetooth helper that pairs a nearby phone and reports its presence.

error-nearby-malformed = a nearby frame is not JSON this relay reads
# $pipe is the helper's standard stream: stdin or stdout.
error-nearby-pipe = the nearby helper has no { $pipe } pipe
error-nearby-spawn = could not start the nearby helper
error-nearby-too-large = a nearby frame is over { $limit } bytes
9 changes: 9 additions & 0 deletions crates/herdr-gpui/locales/en-US/error-remote-control.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ error-remote-control-connect = could not reach the remote control daemon
# $message is the daemon's own words.
error-remote-control-daemon = the remote control daemon refused: { $message }
error-remote-control-no-answer = the remote control daemon closed the connection without answering

# Pairing another host with the phone: enrolling that host's remote control
# daemon over SSH. $path is a config file on that host.
error-remote-control-enroll-apns-size = the APNs files sent are too large
error-remote-control-enroll-config = { $path } is not valid TOML
error-remote-control-enroll-no-home = this host has no home directory
error-remote-control-enroll-not-started = the remote control daemon on this host did not start
error-remote-control-enroll-outdated = the remote control daemon on this host is older than Herdr UI; update it
error-remote-control-enroll-unexpected = the remote control daemon gave an answer of the wrong kind
15 changes: 15 additions & 0 deletions crates/herdr-gpui/locales/en-US/notifications.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Agent notices: the toast over the terminal and the system notification.
# Their titles and bodies come from the daemon; these are the app's own.

# The title of a notice the daemon sent without one.
notifications-untitled = Notification

# QA > Notifications previews a toast or a system notification of each kind.
notifications-preview-attention = Needs attention
notifications-preview-attention-body = QA preview: an agent is waiting for your input.
notifications-preview-finished = Finished
notifications-preview-finished-body = QA preview: an agent has completed its task.
notifications-preview-update = Update installed
notifications-preview-update-body = QA preview only. No update was installed.
notifications-preview-custom = Custom notification
notifications-preview-custom-body = QA preview: a custom notification message.
6 changes: 6 additions & 0 deletions crates/herdr-gpui/locales/en-US/tab-layout.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ tab-layout-underline = Underline
tab-layout-cards = Cards
tab-layout-curved = Curved
tab-layout-compact = Compact

# The tooltip standing in for a tab's title when the tab face hides it;
# $label is the tab's name.
tab-layout-muted-hint = { $label } (notifications muted)
# The close button on a tab, for screen readers.
tab-layout-close = Close tab
47 changes: 47 additions & 0 deletions crates/herdr-gpui/locales/en-US/window-notices.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# The main window's brief notices: flashes over the terminal, the status
# line's errors, the config diagnostic cards, and the agent skill offer.

# A request to the daemon that could not be sent. $operation names it, as
# window-notices-navigate does or as the daemon's method name, and $error
# says why.
window-notices-request-failed = { $operation }: { $error }
# Moving focus to a workspace, tab, or pane.
window-notices-navigate = Navigate
window-notices-annotate-pages-unsupported = Annotating pages needs macOS or Windows
window-notices-scrollback-needs-newer = Opening scrollback needs a newer Herdr daemon
window-notices-clear-needs-newer = Clear Pane needs a newer Herdr daemon.
window-notices-move-tabs-needs-newer = Moving tabs needs a newer Herdr daemon.

# The agent skill: installed where one agent looks ($path), or where
# several do ($count places).
window-notices-skill-installed-at = Installed the browser skill at { $path }
window-notices-skill-installed-places =
{ $count ->
[one] Installed the browser skill in { $count } place
*[other] Installed the browser skill in { $count } places
}
# The one-time offer to install the agent skills.
window-notices-skill-offer-title = Let agents show you pages?
window-notices-skill-offer-body = Agents in your panes can open pages and HTML drafts in browser tabs here, read the notes you pin on them, write automations for you to approve, and write mods that extend this app. Skills teach them how.
window-notices-skill-offer-detail = Install writes herdr-gpui-browser/SKILL.md, herdr-automations/SKILL.md, and herdr-mods/SKILL.md into ~/.claude/skills and ~/.agents/skills, whichever exist, and keeps them up to date. A skill of any of those names you wrote yourself is left alone. Remove them any time in Settings.
window-notices-skill-offer-install = Install
window-notices-skill-offer-decline = Not now

# Entering zen mode says how to leave it: by the command's name when it
# has no shortcut, else by its $key.
window-notices-zen-command = Zen mode: run Toggle Zen Mode to leave
window-notices-zen-key = Zen mode: { $key } to leave
# Shown once when a drag went to a program that takes the mouse.
window-notices-shift-select = Hold Shift and drag to select text

# The config diagnostic cards: the label of the app's own cards (the
# daemon's card is labeled with the device's name), the copied command
# chip, and the fold button's name for screen readers.
window-notices-diagnostic-app = Herdr UI
window-notices-diagnostic-copied = Copied the command
window-notices-diagnostic-full = Full message

# A checkpoint restore finished in the background: $branch is the
# checkout's branch, $error why it failed.
window-notices-checkpoint-restored = Restored a checkpoint of { $branch }
window-notices-checkpoint-not-restored = Checkpoint not restored: { $error }
2 changes: 2 additions & 0 deletions crates/herdr-gpui/src/i18n/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ mod dispatch;
mod editor;
mod file_drop;
mod github;
mod host_build;
mod keymap;
#[cfg(windows)]
mod launch_at_login;
mod listening_ports;
mod mods;
mod nearby;
mod notification_mutes;
mod orchestrator;
mod overview;
Expand Down
11 changes: 1 addition & 10 deletions crates/herdr-gpui/src/i18n/errors/automations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ impl Localize for Error {
path = path.as_str(),
host = host.as_str()
),
Self::Binary { path, .. } => {
fl!(
"error-automations-binary",
path = path.display().to_string()
)
}
Self::Checksum => fl!("error-automations-checksum"),
Self::Build(error) => error.localize(),
Self::Json(_) => fl!("error-automations-json"),
Self::Missing => fl!("error-automations-missing"),
Self::NoBuild { platform } => {
Expand All @@ -31,9 +25,6 @@ impl Localize for Error {
),
Self::NotRead { host } => fl!("error-automations-not-read", host = host.as_str()),
Self::Off => fl!("error-automations-off"),
Self::Platform(output) => {
fl!("error-automations-platform", output = output.as_str())
}
Self::Protocol { found, expected } => fl!(
"error-automations-protocol",
found = *found,
Expand Down
2 changes: 2 additions & 0 deletions crates/herdr-gpui/src/i18n/errors/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
mod clipboard;
mod sessions;
mod ssh;
mod terminal_attach;
mod wsl;

/// A missing home or config root, in the root error's words.
Expand Down Expand Up @@ -168,6 +169,7 @@ impl Localize for Error {
fl!("error-client-surface-encoding-not-negotiated")
}
Self::SurfaceIdentity => fl!("error-client-surface-identity"),
Self::TerminalAttach(error) => error.localize(),
Self::UnsolicitedResponse => fl!("error-client-unsolicited-response"),
Self::UnsupportedMethod => fl!("error-client-unsupported-method"),
Self::UnsupportedSurfaceInterest => fl!("error-client-unsupported-surface-interest"),
Expand Down
30 changes: 30 additions & 0 deletions crates/herdr-gpui/src/i18n/errors/client/terminal_attach.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//! `herdr_client::terminal_attach::Error`: one terminal's direct attach,
//! from `error-client-terminal-attach.ftl`.

use super::Localize;
use crate::i18n::fl;
use herdr_client::terminal_attach::Error;

impl Localize for Error {
fn localize(&self) -> String {
match self {
// keep-sorted start
Self::Busy => fl!("error-client-terminal-attach-busy"),
Self::Ended => fl!("error-client-terminal-attach-ended"),
Self::Io(_) => fl!("error-client-terminal-attach-io"),
Self::Protocol(_) => fl!("error-client-terminal-attach-protocol"),
Self::Refused(None) => fl!("error-client-terminal-attach-refused"),
Self::Refused(Some(reason)) => fl!(
"error-client-terminal-attach-refused-reason",
reason = reason.as_str()
),
Self::Rejected { version, .. } => {
fl!("error-client-terminal-attach-rejected", version = *version)
}
Self::Scroll => fl!("error-client-terminal-attach-scroll"),
Self::Size => fl!("error-client-terminal-attach-size"),
Self::Unexpected => fl!("error-client-terminal-attach-unexpected"),
// keep-sorted end
}
}
}
20 changes: 20 additions & 0 deletions crates/herdr-gpui/src/i18n/errors/host_build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//! Copying one of this app's programs to a host: `error-host-build.ftl`.

use super::Localize;
use crate::{host_build::Error, i18n::fl};

impl Localize for Error {
fn localize(&self) -> String {
match self {
// keep-sorted start
Self::Binary { program, path, .. } => fl!(
"error-host-build-binary",
program = *program,
path = path.display().to_string()
),
Self::Checksum => fl!("error-host-build-checksum"),
Self::Platform(output) => fl!("error-host-build-platform", output = output.as_str()),
// keep-sorted end
}
}
}
17 changes: 17 additions & 0 deletions crates/herdr-gpui/src/i18n/errors/nearby.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//! The nearby pairing helper: `error-nearby.ftl`.

use super::Localize;
use crate::{i18n::fl, remote::nearby::Error};

impl Localize for Error {
fn localize(&self) -> String {
match self {
// keep-sorted start
Self::Malformed(_) => fl!("error-nearby-malformed"),
Self::Pipe(pipe) => fl!("error-nearby-pipe", pipe = *pipe),
Self::Spawn(_) => fl!("error-nearby-spawn"),
Self::TooLarge { limit } => fl!("error-nearby-too-large", limit = *limit),
// keep-sorted end
}
}
}
24 changes: 23 additions & 1 deletion crates/herdr-gpui/src/i18n/errors/remote_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

use super::Localize;
use crate::i18n::fl;
use herdr_remote_control::{app, control};
use herdr_remote_control::{
app::{self, enroll},
control,
};

impl Localize for app::Error {
fn localize(&self) -> String {
Expand All @@ -15,6 +18,7 @@ impl Localize for app::Error {
fl!("error-remote-control-certificate-path", key = *which)
}
Self::Control(error) => error.localize(),
Self::Enroll(error) => error.localize(),
Self::IdleDays => fl!("error-remote-control-idle-days"),
Self::Io {
operation, path, ..
Expand Down Expand Up @@ -68,3 +72,21 @@ impl Localize for control::Error {
}
}
}

impl Localize for enroll::Error {
fn localize(&self) -> String {
match self {
// keep-sorted start
Self::ApnsSize => fl!("error-remote-control-enroll-apns-size"),
Self::Config { path, .. } => fl!(
"error-remote-control-enroll-config",
path = path.display().to_string()
),
Self::NoHome => fl!("error-remote-control-enroll-no-home"),
Self::NotStarted(_) => fl!("error-remote-control-enroll-not-started"),
Self::Outdated => fl!("error-remote-control-enroll-outdated"),
Self::Unexpected => fl!("error-remote-control-enroll-unexpected"),
// keep-sorted end
}
}
}
1 change: 1 addition & 0 deletions crates/herdr-gpui/src/i18n/errors/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl Localize for Error {
Self::MissingHome => fl!("error-missing-home"),
Self::MissingStateRoot => fl!("error-missing-state-root"),
Self::Mods(error) => error.localize(),
Self::Nearby(error) => error.localize(),
Self::NoSnapshot => fl!("error-no-snapshot"),
Self::NoTab => fl!("error-no-tab"),
Self::NotAGitRepository { path: dir } => {
Expand Down
2 changes: 2 additions & 0 deletions crates/herdr-gpui/src/i18n/errors/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ mod dispatch;
mod editor;
mod file_drop;
mod github;
mod host_build;
mod keymap;
#[cfg(windows)]
mod launch_at_login;
mod listening_ports;
mod mods;
mod nearby;
mod notification_mutes;
mod orchestrator;
mod overview;
Expand Down
8 changes: 1 addition & 7 deletions crates/herdr-gpui/src/i18n/errors/tests/automations.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::*;
use crate::automations::Error;
use std::{io, path::PathBuf};

#[test]
fn every_automations_variant_has_a_message() {
Expand All @@ -11,11 +10,7 @@ fn every_automations_variant_has_a_message() {
path: path(),
host: host(),
},
Error::Binary {
path: PathBuf::from("/Applications/Herdr.app/herdr-automate"),
source: io::Error::other("gone"),
},
Error::Checksum,
Error::Build(crate::host_build::Error::Checksum),
Error::Json(serde_json::from_str::<u8>("x").unwrap_err()),
Error::Missing,
Error::NoBuild {
Expand All @@ -27,7 +22,6 @@ fn every_automations_variant_has_a_message() {
},
Error::NotRead { host: host() },
Error::Off,
Error::Platform("Plan9 mips".into()),
Error::Protocol {
found: 3,
expected: 2,
Expand Down
22 changes: 21 additions & 1 deletion crates/herdr-gpui/src/i18n/errors/tests/client.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;
use herdr_client::{
Error, SshFailure, clipboard, protocol::endpoint::ENDPOINT_PROTOCOL_GENERATION,
scrollback::EndpointErrorCode, sessions, ssh, wsl,
scrollback::EndpointErrorCode, sessions, ssh, terminal_attach, wsl,
};
use std::{io, path::PathBuf, process::ExitStatus};

Expand Down Expand Up @@ -131,6 +131,7 @@ fn every_client_variant_has_a_message() {
Error::SnapshotIdentity,
Error::SocketClosed,
Error::Ssh(ssh::Error::Timeout),
Error::TerminalAttach(terminal_attach::Error::Ended),
Error::Storage {
operation: herdr_client::StorageOperation::Write,
path: PathBuf::from("/tmp/catalog.json"),
Expand Down Expand Up @@ -250,3 +251,22 @@ fn every_wsl_variant_has_a_message() {
wsl::Error::Unsupported,
]);
}

#[test]
fn every_terminal_attach_variant_has_a_message() {
assert_localized(&[
terminal_attach::Error::Busy,
terminal_attach::Error::Ended,
terminal_attach::Error::Io(io()),
terminal_attach::Error::Protocol(herdr_client::protocol::Error::EmptyFrame),
terminal_attach::Error::Refused(None),
terminal_attach::Error::Refused(Some("terminal is attached elsewhere".into())),
terminal_attach::Error::Rejected {
version: 2,
reason: "unsupported".into(),
},
terminal_attach::Error::Scroll,
terminal_attach::Error::Size,
terminal_attach::Error::Unexpected,
]);
}
Loading
Loading