Skip to content

refactor(i18n): show code search and worktree scripts through Fluent - #962

Merged
penso merged 16 commits into
mainfrom
i18n/left-search
Nov 1, 2026
Merged

penso merged 16 commits into
mainfrom
i18n/left-search

Conversation

@penso

@penso penso commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #957 (base i18n/left-status), which is stacked on #953. Merge those first; this PR's base then becomes main.

Summary

Part of Phase 2 of docs/i18n.md, following #880, #926/#928, #925/#940 (ago), and #941/#943. This PR covers code search, worktree scripts, and repository items.

Migrated (// i18n: migrated)

  • code_search (code-search.ftl):
    • Text: the titles, the Symbols/Files tabs, placeholders, the result count (a selector for "+" and for a truncated checkout), the empty states, and the key hints.
    • A symbol's kind: written from the index's typed Kind, not Kind::label's English, which herdr-gpui search keeps.
    • Badges: the "changed", "new", and "binary" badges.
    • Placeholders use set_placeholder_with, so they follow a language change.
    • The tabs' debug selectors use a fixed key, the same in every language.
  • Code search's changed-file line ("New 5 min ago") now reads ago. This ports feat(i18n): show Security, code search, and orchestrator times through ago #940's code search part. feat(i18n): show Security, code search, and orchestrator times through ago #940 was merged into its stacked base (fix/i18n-errors-after-905), and that base never reached main, so main still had the hand-built "5m ago". Security's and the orchestrator's parts of feat(i18n): show Security, code search, and orchestrator times through ago #940 belong to other scopes and are still missing; this PR leaves docs/i18n.md unchanged.
  • worktree_scripts (worktree-scripts.ftl): the trust page, its buttons, and the missing-script and did-not-start errors. Each uses a selector on the script's kind.
  • repo_items (repo-items.ftl): the remote checkout's SSH failure. Git step names (which the Git error mapping matches), GraphQL, scripts, and the task context an agent reads are tagged data.

Errors: code search and worktree script errors use localize() instead of to_string().

English changes: a changed file's line reads "5 min ago" and "yesterday" instead of "5m ago" and "1d ago", as #940 intended.

Screenshots

Native macOS captures from a debug build of the stack's tip, running against an isolated sandbox herdr server. The surfaces were opened with herdr-gpui run/open/fan-out and the language set in the sandbox config; no synthetic input was used. The checkout has one changed and one new file.

en-XA en-XB
Go to File en-XA Go to File en-XB

QA

  • just format
  • just ci on 94337b2c5 (macOS arm64): passed, 16,368 tests, 0 failed
  • en-XA leak test: Go to File and Go to Symbol over a scratch checkout (code_search/tests/en_xa.rs)
  • Changed-file line: English cases and en-XA marking (code_search/tests/changed.rs, from feat(i18n): show Security, code search, and orchestrator times through ago #940)
  • Native: Go to File on a checkout with a changed and a new file, under en-XA and en-XB (screenshots above)
  • Native: Go to Symbol under en-XA
  • Native: a worktree with .herdr/worktree.toml asks to run its setup script; the trust page reads translated
  • English: code search and the trust page read as before, apart from the relative times above

just lint-linux and just lint-windows were not run: no platform cfg gate changed.

penso added 3 commits October 31, 2026 20:42
Part of Phase 2 of docs/i18n.md. Migrates the connection-side modules:
state, daemon, endpoint, sessions, settings_panel, and the taskbar badge's
spoken count, and marks the modules whose literals never reach a window
(setup_relay, host_build, herdr_settings, app_icon, sound, terminal_notes)
as migrated with their scripts, log text, and agent prompts tagged data.

Errors these modules turned into a String with to_string() now use
localize(). Endpoint::status stays English for herdr-gpui commands, and
the device picker reads the new status_label.
…h Fluent

Part of Phase 2 of docs/i18n.md. Migrates system_load, network_quality,
listening_ports, code_server, and remote_browser: the status bar's labels,
tooltips, and spoken text, the port tunnels' hints and notices, the VS Code
server's license terms, and remote page requests' notices.

Plurals (cores, cards, probes) are selectors, sizes and uptimes are
messages, and errors use localize(); a failed reading keeps its causes
through the new i18n::errors::with_causes. Host scripts, parse keys, and
log Display text are tagged data.
Part of Phase 2 of docs/i18n.md. Migrates code_search (titles, tabs,
placeholders, counts, hints, symbol kinds, and badges), worktree_scripts
(the trust page and its errors), and repo_items (the remote checkout's
failure).

Code search's changed-file line reads ago, as #940 meant to do: that PR
was merged into its stacked base and never reached main. Symbol kinds
come from the index's typed Kind, not its English label. Errors use
localize(); Git step names, scripts, and the task context an agent reads
are tagged data.
@penso

penso commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

just ci ran locally and passed on the stack's tip ed983f278 (macOS arm64), which contains this head. just lint-windows passed on the previous tip 0f9799ae1; the change since then is test-only.

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Moves code search, worktree script prompts, and remote checkout failure text into Fluent.

  • Code search shows picker text and changed-file times through Fluent.
  • Worktree-script prompts and errors now use Fluent messages.
  • Remote checkout SSH errors use a Fluent message.

Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

penso added 6 commits October 31, 2026 22:40
…guage

Windows' taskbar speaks the badge's count, but the badge was published
again only when the count changed, so a language switch left its
description in the old language. It now records the locale it was
described in and publishes again when the shown locale changes.

The local socket warning went through local_feedback_multiline, whose
cleanup for daemon text strips direction marks, so en-XB and right-to-left
languages lost them. The app's own Fluent title and body are now set with
with_message after it; the chmod line only carries a path body() already
refused when unsafe.
@penso

penso commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@penso

penso commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

penso added 5 commits November 1, 2026 11:01
Every open i18n pull request edited that list, so each merge made the
others conflict. One pull request updates it after they all merge.
# Conflicts:
#	crates/herdr-gpui/src/worktree_scripts.rs
#	docs/i18n.md
@penso

penso commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

Base automatically changed from i18n/left-status to main November 1, 2026 21:20
@penso

penso commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@netlify

netlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for herdr-ui canceled.

Name Link
🔨 Latest commit 1187258
🔍 Latest deploy log https://app.netlify.com/projects/herdr-ui/deploys/6ae7b1c5c64789b09957a4b7

@penso
penso merged commit 0b16f3d into main Nov 1, 2026
22 checks passed
@penso
penso deleted the i18n/left-search branch November 1, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant