Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
19 changes: 19 additions & 0 deletions crates/herdr-gpui/locales/en-US/code-view.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Code tabs: a source file shown read-only, with its definitions listed as
# an outline. File text and definition names are never translated.

# The outline's heading; $count is how many definitions it lists.
code-view-outline-count = Outline · { $count }
code-view-outline = Outline
code-view-hide-outline = Hide Outline
code-view-open-in-editor = Open in Editor
code-view-reading = Reading file…
code-view-no-workspace = Open a workspace first
code-view-too-many-tabs = Too many tabs are open
# What each definition in the outline is.
code-view-kind-function = function
code-view-kind-method = method
code-view-kind-type = type
code-view-kind-module = module
code-view-kind-constant = constant
code-view-kind-implementation = impl
code-view-kind-macro = macro
3 changes: 3 additions & 0 deletions crates/herdr-gpui/locales/en-US/editor.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Opening a file in the user's terminal editor. $error is why it failed.

editor-not-opened = The editor did not open: { $error }
40 changes: 40 additions & 0 deletions crates/herdr-gpui/locales/en-US/log-window.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# The log window: the app's own log and, when automations run, each host's
# automation daemon log. Log records themselves are never translated.

log-window-title = Logs
log-window-search-placeholder = Search, namespace:herdr_gpui target:terminal_painter
# The minimum level menu's button; $level is a log level such as INFO, kept as is.
log-window-minimum = Minimum: { $level } v
log-window-minimum-menu = Minimum level
log-window-pause = Pause
log-window-resume = Resume tail
log-window-copy = Copy
log-window-working = Working...
log-window-export = Export...
log-window-entries = Log entries
log-window-empty = No matching logs.
# The status line. $path is where the app's log file is saved.
log-window-saved = Saved to { $path }. Review before sharing.
log-window-not-saved = Not saved: no state directory. Review before sharing.
log-window-choose-destination = Choose an export destination...
log-window-preparing-clipboard = Preparing clipboard...
log-window-export-cancelled = Export cancelled.
log-window-no-save-dialog = Unable to open save dialog.
log-window-copied = Filtered logs copied. Review before sharing.
log-window-exported = Filtered logs exported. Review before sharing.
log-window-export-failed = Export failed: { $error }
log-window-unreadable = Unable to read logs: { $error }
# Which log is shown: the app's own, or a host's automation daemon's.
log-window-source = Source
log-window-source-app = App
log-window-source-automations = Automations on { $host }
log-window-reading = Reading…
# $source is log-window-source-automations.
log-window-automations-off = { $source } · not read while automations are turned off
log-window-log-tail = { $source } · the end of a longer log
log-window-log-whole = { $source } · the whole log
log-window-host-unreadable = Unable to read { $host }: { $error }
# The status bar: rows shown, records dropped, whether the tail is followed,
# and $status, one of the status messages above.
log-window-summary-live = { $shown } shown | { $dropped } dropped | LIVE | { $status }
log-window-summary-paused = { $shown } shown | { $dropped } dropped | PAUSED | { $status }
33 changes: 33 additions & 0 deletions crates/herdr-gpui/locales/en-US/palette-go-to.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# The command palette's Go To rows: what kind of place each row is, an
# agent's status, the agent filter, and the preview of the selected row.
# Workspace, tab, pane, and agent names are data.

# The badge at the end of a row, naming what the row goes to.
palette-go-to-workspace = Workspace
palette-go-to-tab = Tab
palette-go-to-terminal = Terminal
palette-go-to-note = Note
# An agent's status, as its row's badge and the preview show it.
palette-go-to-blocked = blocked
palette-go-to-done = done
palette-go-to-working = working
palette-go-to-idle = idle
# Searched for, never shown: what every agent row is.
palette-go-to-agent = agent
# The agent filter's choices (Alt with a letter picks one).
palette-go-to-filter-all = All agents
palette-go-to-filter-blocked = Blocked
palette-go-to-filter-working = Working
palette-go-to-filter-idle = Idle
palette-go-to-filter-done = Done
# The preview's facts about a row whose screen is not on hand.
palette-go-to-fact-status = Status
palette-go-to-fact-directory = Directory
palette-go-to-fact-workspace = Workspace
palette-go-to-fact-tab = Tab
palette-go-to-fact-branch = Branch
palette-go-to-fact-path = Path
palette-go-to-fact-tabs = Tabs
# Over a pane's last frame; $age is how long ago, such as "3 min ago".
palette-go-to-last-seen = Last seen { $age }
palette-go-to-connection-changed = The selected connection changed. Reopen the palette.
10 changes: 10 additions & 0 deletions crates/herdr-gpui/locales/en-US/palette-projects.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The command palette's project rows: local checkouts under the configured
# project roots, and the row that makes a new one. Paths and URLs are data.

# A local project's detail, before its path.
palette-projects-local = Local { $path }
# $name is what was typed, $path where it goes, $url the repository cloned.
palette-projects-create-folder = Create folder "{ $name }"
palette-projects-new-in = New project in { $path }
palette-projects-clone = Clone "{ $name }"
palette-projects-clone-into = git clone { $url } into { $path }
77 changes: 77 additions & 0 deletions crates/herdr-gpui/locales/en-US/teleport.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Teleport: moving a worktree, its tabs, and its agents to another host.
# Host, repository, branch, tab, and program names are data, as are
# commands the destination runs.

teleport-title = Teleport
# Under the title: $worktree is the worktree moved, $host where it is now.
teleport-subtitle = { $worktree } from { $host }
teleport-no-hosts = No other host is saved. Add one from Devices, then try again.
teleport-host-connected = Connected
teleport-host-ssh = Not connected; reached over SSH
# $host is the destination being checked.
teleport-checking = Checking { $host } and the running programs...
# The review's first line: where the work goes and how. $host is the
# destination, $repository the repository open there, $path a checkout.
teleport-to-origin = To { $host } · { $repository }. Same origin remote.
teleport-to-remote = To { $host } · { $repository }. Shares a remote.
teleport-to-name = To { $host } · { $repository }. Same name only; remotes differ.
teleport-to-reclaim = To { $host } · { $repository }. Brings the work back to the checkout it left.
teleport-to-existing = To { $host } · { $path }. Opens the checkout already there.
teleport-to-clone = To { $host } · { $path }. Clones the repository there first.
teleport-to-copy = To { $host } · { $path }. Copies the repository there first.
teleport-state = Branch { $branch } · { $unpushed ->
[one] { $unpushed } unpushed commit
*[other] { $unpushed } unpushed commits
} · { $changed ->
[one] { $changed } changed file
*[other] { $changed } changed files
}, { $untracked } untracked
teleport-github-token = { $host } cannot reach GitHub by itself, so your GitHub CLI token is installed for this repository there, for git pull and push.
teleport-github-unavailable = { $host } cannot reach GitHub, and the GitHub CLI here is not signed in, so pull and push will not work there.
teleport-name-only = Matched by name only: this repository's remotes differ there.
# A tab of the move, numbered from 1, with the label the user gave it.
teleport-tab = Tab { $number }
teleport-tab-labeled = Tab { $number }: { $label }
# What a pane runs on the destination. $program is a program's name,
# $agent the agent that continues, $command the command line.
teleport-pane-shell = Shell
teleport-pane-resume = { $agent }: resume session
teleport-pane-handoff-again = { $program }: handoff note, then start again
teleport-pane-handoff-to = { $program }: handoff note, continued by { $agent }
teleport-pane-start = Start { $command }
teleport-pane-run = Run { $command }
teleport-pane-missing = { $program }: not installed there, skipped
teleport-left-behind = Ignored files such as .env stay behind. The workspace here then closes; its checkout stays and can be reopened with Open worktree.
teleport-moving-to = Moving to { $host }...
# The move's steps, as the progress line names them.
teleport-step-starting = Starting
teleport-step-discover = finding matching repositories
teleport-step-review = reviewing the move
teleport-step-clone = copying the repository to the destination
teleport-step-open = opening the repository on the destination
teleport-step-handoff = asking agents for handoff notes
teleport-step-capture = capturing commits and changes
teleport-step-transfer = copying changes to the destination
teleport-step-fetch = fetching the branch on the destination
teleport-step-create-worktree = creating the destination worktree
teleport-step-restore = restoring uncommitted changes
teleport-step-tabs = recreating tabs
teleport-step-retire = stopping programs in the source workspace
teleport-step-credentials = installing GitHub credentials on the destination
teleport-step-sessions = moving agent sessions
teleport-step-launch = starting programs
teleport-keeps-moving = Closing this dialog does not stop the move.
teleport-source-closes-later = The source workspace closes only once the destination is ready.
teleport-review = Review
teleport-moving = Moving...
teleport-close = Close
teleport-hide = Hide
teleport-cancel = Cancel
# Flashes when the move ends with the dialog closed.
teleport-failed = Teleport failed: { $error }
teleport-done = Teleported to { $host }
# $first is the first warning, from the move itself.
teleport-done-warnings = { $count ->
[one] Teleported to { $host } with one warning: { $first }
*[other] Teleported to { $host } with { $count } warnings: { $first }
}
16 changes: 16 additions & 0 deletions crates/herdr-gpui/locales/en-US/theme-picker.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The color scheme picker the menu opens. Theme names are data.

theme-picker-title = Color Scheme
theme-picker-close = Close
theme-picker-search = Search themes...
# How many themes match the search, of all there are.
theme-picker-count = { $total ->
[one] { $shown } of { $total } theme
*[other] { $shown } of { $total } themes
}
theme-picker-empty = No matching themes. Try a shorter search.
# Beside the theme the window shows now.
theme-picker-current = Current
theme-picker-saving = Saving theme... Please wait.
theme-picker-loading = Loading theme... Esc to cancel.
theme-picker-hint = Hover or Up / Down to preview. Enter or click a theme to save.
45 changes: 45 additions & 0 deletions crates/herdr-gpui/locales/en-US/update-panel.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# App Updates: checking GitHub for a new release, downloading, installing,
# and showing its release notes. Versions and the notes are data.

update-panel-title = App Updates
update-panel-subtitle = Updates from GitHub
update-panel-close = Close
update-panel-current-version = Current version
update-panel-latest-version = Latest version
update-panel-not-known = Not yet known
update-panel-whats-new = What's new
# $reason says why, in the updater's own words.
update-panel-disabled = In-app updates unavailable: { $reason }
update-panel-idle = Check GitHub for a new app release.
update-panel-checking = Checking for updates...
update-panel-current = You are running the latest available release.
update-panel-available = A new app release is available.
update-panel-verifying = Download complete. Verifying the update...
update-panel-downloading = Downloading the update
update-panel-downloading-version = Downloading { $version }
update-panel-ready-windows = Download and publisher signature verified. Install when you are ready: Herdr UI quits, its installer runs, and it reopens; your daemon and terminal sessions stay running.
update-panel-ready = Download verified. Install when you are ready; system packages may ask for administrator authentication.
update-panel-installing = Preparing installation and restart. Herdr will quit when the update is ready.
update-panel-homebrew = A new app release is available. Homebrew will install it, refreshing its package metadata if needed.
update-panel-restart-needed = Installed { $version }. Restart to finish; your daemon and terminal sessions stay running.
update-panel-restarting = Starting the updated app...
update-panel-cancelling = Cancelling update... Waiting for current I/O to finish or time out.
update-panel-failed = Update failed: { $error }
# Under the progress bar. $amount is decimal megabytes with one place.
update-panel-megabytes = { $amount } MB
update-panel-downloaded = { $received } downloaded
update-panel-progress = { $received } of { $total }
update-panel-percent = { $percent }%
update-panel-verified-note = Downloads are verified before installation. Your daemon and terminal sessions stay running.
# Shown only in QA's synthetic update preview.
update-panel-preview = QA preview
update-panel-preview-note = Synthetic update state only. No network or installation is performed. Close or Escape dismisses this preview.
update-panel-manual-releases = Manual Releases
update-panel-release-notes = Release Notes
update-panel-retry = Retry
update-panel-check = Check for Updates
update-panel-download = Download
update-panel-install = Install Update
update-panel-upgrade = Update with Homebrew
update-panel-restart = Restart
update-panel-cancel = Cancel
19 changes: 17 additions & 2 deletions crates/herdr-gpui/src/code_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
//! executor, colours last, so its text shows before a large file is
//! coloured. Drawing only reads what those produced.

// i18n: migrated
mod render;

use crate::{
HerdrWindow,
browser::{Location, Store, TabId},
code_index::{self, Kind, Language},
editor::EditorTarget,
i18n::fl,
review::highlight::{self, Span},
window::Flash,
};
Expand Down Expand Up @@ -220,7 +222,7 @@ impl HerdrWindow {
cx: &mut Context<Self>,
) {
let Some((scope, workspace)) = self.browser_key() else {
self.show_flash(Flash::warning("Open a workspace first"), cx);
self.show_flash(Flash::warning(fl!("code-view-no-workspace")), cx);
return;
};
let Some(path) = target.path.to_str().map(str::to_owned) else {
Expand Down Expand Up @@ -248,7 +250,7 @@ impl HerdrWindow {
})
});
let Some(id) = opened else {
self.show_flash(Flash::warning("Too many tabs are open"), cx);
self.show_flash(Flash::warning(fl!("code-view-too-many-tabs")), cx);
return;
};
self.ensure_code_view(id, cx);
Expand Down Expand Up @@ -462,5 +464,18 @@ impl HerdrWindow {
}
}

/// What a definition is, as the outline names it.
fn kind_label(kind: Kind) -> String {
match kind {
Kind::Function => fl!("code-view-kind-function"),
Kind::Method => fl!("code-view-kind-method"),
Kind::Type => fl!("code-view-kind-type"),
Kind::Module => fl!("code-view-kind-module"),
Kind::Constant => fl!("code-view-kind-constant"),
Kind::Implementation => fl!("code-view-kind-implementation"),
Kind::Macro => fl!("code-view-kind-macro"),
}
}

#[cfg(test)]
mod tests;
18 changes: 9 additions & 9 deletions crates/herdr-gpui/src/code_view/render.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! A code tab paints the read file and its outline; reading lives elsewhere.

use super::{CodeView, State, Text};
use crate::fonts::StyledFont;
use super::{CodeView, State, Text, kind_label};
use crate::{
HerdrWindow,
browser::{Slot, Tab, TabId},
};
use crate::{fonts::StyledFont, i18n::fl};
use gpui::{prelude::*, *};
use std::{cell::Cell, rc::Rc};

Expand Down Expand Up @@ -97,7 +97,7 @@ impl HerdrWindow {
.px(px(10.))
.py(px(6.))
.text_color(rgb(theme.muted))
.child(format!("Outline \u{00b7} {}", text.outline.len())),
.child(fl!("code-view-outline-count", count = text.outline.len())),
)
.child(
uniform_list(
Expand Down Expand Up @@ -133,7 +133,7 @@ impl HerdrWindow {
div()
.flex_none()
.text_color(rgb(this.theme.muted))
.child(entry.kind.label()),
.child(kind_label(entry.kind)),
)
.on_click(cx.listener(move |this, _, _, cx| {
if let Some(view) = this.code_views.get_mut(&id) {
Expand All @@ -158,7 +158,7 @@ impl HerdrWindow {
.as_ref()
.map(crate::browser::Location::display)
.unwrap_or_default();
let button = |label: &'static str, selector: &'static str| {
let button = |label: String, selector: &'static str| {
div()
.id(selector)
.debug_selector(move || selector.into())
Expand Down Expand Up @@ -190,9 +190,9 @@ impl HerdrWindow {
.child(
button(
if view.outline {
"Hide Outline"
fl!("code-view-hide-outline")
} else {
"Outline"
fl!("code-view-outline")
},
"code-outline-toggle",
)
Expand All @@ -204,7 +204,7 @@ impl HerdrWindow {
})),
)
.child(
button("Open in Editor", "code-open-editor").on_click(
button(fl!("code-view-open-in-editor"), "code-open-editor").on_click(
cx.listener(move |this, _, _, cx| this.open_code_view_in_editor(id, cx)),
),
)
Expand All @@ -219,7 +219,7 @@ impl HerdrWindow {
State::Loading => div()
.p_3()
.text_color(rgb(theme.muted))
.child("Reading file\u{2026}")
.child(fl!("code-view-reading"))
.into_any_element(),
State::Failed(error) => div()
.debug_selector(|| "code-error".into())
Expand Down
1 change: 1 addition & 0 deletions crates/herdr-gpui/src/code_view/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,5 @@ fn reopening_a_code_tab_reads_its_file_again(cx: &mut TestAppContext) {
});
}

mod en_xa;
mod top_row;
Loading
Loading