Skip to content

refactor: show the Security section and its pages in Fluent messages - #927

Merged
penso merged 3 commits into
i18n/panels-overview-usagefrom
i18n/panels-security
Oct 31, 2026
Merged

penso merged 3 commits into
i18n/panels-overview-usagefrom
i18n/panels-security

Conversation

@penso

@penso penso commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Part of Phase 2 of docs/i18n.md, following #880's patterns. Stacked on #924 (it uses i18n::leak_tests::uncut from there); GitHub retargets it to main once #924 merges.

The activity bar's Security section takes its text from security.ftl, and security.rs is marked // i18n: migrated. That covers its header, its notes, the reported and per-repository cards, the filter and pills, the list beside an open item, and every tab of an alert's page (Overview, Advisory, Dependency path) and a report's page (Report, Advisory draft, Conversation).

  • Plurals and times: "1 private vulnerability report in triage" / "50+ … reports", open counts, and relative times are Fluent selectors and messages. Dates ("Oct 14, 2026 · 5 h ago") choose the month in the message.
  • Severity: keeps its English label() for agent prompts and gains text() for the window.
  • Page tabs: keep a stable id() for element IDs and selectors, so security-tab-Advisory becomes security-tab-advisory.
  • Stays English: the fix and investigate prompts written for an agent, upgrade commands, and GraphQL queries are marked // i18n: data. docs/i18n.md now lists agent prompts among what is never translated.
  • Shared look: the orchestrator's Look takes owned labels for icon buttons, toggles, and compact buttons. Existing &'static str callers still compile.
  • Errors stay $error placeables.
  • Leak test: security/tests/en_xa.rs opens the section with every kind of note (quiet, alerts off, unreadable, failed), then each tab of an alert's and a report's page with full GitHub data. Detail lines join facts with " · ", so a line that is not one message is checked fact by fact.

English text is unchanged.

Screenshots

Native macOS captures, debug build, against an isolated sandbox daemon. The sandbox has no GitHub sign-in, so the section shows its sign-in note; the cards and pages are covered by the leak test.

en-XA (accented, longer) en-XB (right to left)
Security en-XA Security en-XB

QA

  • just format
  • just ci on 7679e1f1 (macOS arm64): passed, 14,940 Rust tests, 0 failed; check-i18n: 1283 messages in 37 files valid and used
  • en-XA leak test: the section's cards and notes, and every tab of an alert's and a report's page
  • Native en-XA and en-XB check of the signed-out Security section (screenshots above)
  • Native check signed in to GitHub with alerts or reports: cards, the list beside an open item, and each page tab under en-XA and en-XB
  • Start agent on an alert: the fan-out dialog's prompt is English under en-XA
  • English: the Security section reads as before

just lint-linux/lint-windows were not run: no cfg gates changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN

Part of Phase 2 of docs/i18n.md: the activity bar's Security section,
its list and filter, and an alert's or a report's page take their text
from security.ftl, and security.rs is marked migrated.

- Hand-built plurals (reports in triage, open alerts) are Fluent
  selectors; relative times and dates ("Oct 14, 2026 · 5 h ago") are
  messages, with the month chosen in the message.
- Severity keeps its English label for agent prompts and gains `text()`
  for the window; page tabs keep a stable `id()` for element IDs and
  selectors, so `security-tab-Advisory` becomes `security-tab-advisory`.
- The fix and investigate prompts written for an agent stay English, as
  do upgrade commands and GraphQL queries (`// i18n: data`); docs/i18n.md
  adds agent prompts to what is never translated.
- The orchestrator's Look takes owned labels for icon buttons, toggles,
  and compact buttons.
- An en-XA leak test opens the section with every kind of note, then
  each tab of an alert's and a report's page.

English text is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN
@penso

penso commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

just ci ran locally and passed on ebd4b7a (macOS arm64, with main and #924 merged in): 15,506 Rust tests, 0 failed. No extra recipes: no cfg gates changed.

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Moves the Security section and its alert and report pages to Fluent messages.

  • Security cards and notes get their wording from Fluent messages.
  • Alert and report pages get translated tabs and detail text.

Reviews (2) · Last reviewed commit: "refactor: keep the Security filter's pla..." · Reviewed by Greptile

penso and others added 2 commits October 30, 2026 17:07
… i18n/panels-security

# Conflicts:
#	docs/i18n.md
The filter field is built once per window, so its placeholder kept the
language it was built in. It now formats again when the language
changes (`set_placeholder_with`), as Settings' searches do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN
@penso

penso commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review — the filter placeholder finding is addressed in ebd4b7a (set_placeholder_with).

@penso
penso merged commit a331a37 into i18n/panels-overview-usage Oct 31, 2026
19 checks passed
@penso
penso deleted the i18n/panels-security branch October 31, 2026 03:48
penso added a commit that referenced this pull request Oct 31, 2026
…essages (#924)

* refactor: show Overview, Devices overview, and plan usage in Fluent messages

Part of Phase 2 of docs/i18n.md: the activity bar's Overview, the Devices
overview tab, and plan usage (status bar segments, the panel they open,
and the Usage section) take their text from overview.ftl,
devices-overview.ftl, and usage.ftl, and their modules are marked
migrated.

- Hand-built plurals (agent and device counts, report counts) are Fluent
  selectors; times ("4m", "Mon 09:00", "2h 53m") are messages, with the
  weekday chosen in the message.
- usage/text.rs renders herdr-usage's typed values (limit kinds,
  countdowns, pace, balances) through messages; what a service names
  itself stays as reported, and docs/i18n.md lists the text herdr-usage
  still writes.
- The Overview summary stresses each count inside one message rather than
  splicing the number beside a fragment.
- Snooze presets and the device table's columns name message IDs, checked
  by tests.
- Each surface has an en-XA leak test. i18n::leak_tests gains `uncut`,
  which drops the cuts GPUI shapes while measuring a truncated element.

English text is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN

* refactor: let the Overview host meters' labels grow with their language

The CPU and MEM labels on a host card had a fixed 30 px width, so a
longer translation ran under its bar (seen under en-XA). The width is now
a minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN

* refactor: keep the device searches' placeholders in the shown language

Review follow-ups for the Overview, Devices overview, and usage
migration:

- The Devices overview's search and the sidebar's device tree search
  format their placeholders again when the language changes
  (`set_placeholder_with`), as Settings' searches do.
- claude-swap's notes on other accounts ("token expired", "disabled")
  come from usage.ftl, chosen by the account's status, which
  herdr-usage now exports as `ClaudeAccountStatus`; a test checks every
  status reads as the crate's English did.
- The leak tests cover OpenAI's daily spend, claude-swap's other
  accounts, and the Overview's Closed shelf with Reopen and Forget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN

* refactor: show the Security section and its pages in Fluent messages (#927)

* refactor: show the Security section and its pages in Fluent messages

Part of Phase 2 of docs/i18n.md: the activity bar's Security section,
its list and filter, and an alert's or a report's page take their text
from security.ftl, and security.rs is marked migrated.

- Hand-built plurals (reports in triage, open alerts) are Fluent
  selectors; relative times and dates ("Oct 14, 2026 · 5 h ago") are
  messages, with the month chosen in the message.
- Severity keeps its English label for agent prompts and gains `text()`
  for the window; page tabs keep a stable `id()` for element IDs and
  selectors, so `security-tab-Advisory` becomes `security-tab-advisory`.
- The fix and investigate prompts written for an agent stay English, as
  do upgrade commands and GraphQL queries (`// i18n: data`); docs/i18n.md
  adds agent prompts to what is never translated.
- The orchestrator's Look takes owned labels for icon buttons, toggles,
  and compact buttons.
- An en-XA leak test opens the section with every kind of note, then
  each tab of an alert's and a report's page.

English text is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN

* refactor: keep the Security filter's placeholder in the shown language

The filter field is built once per window, so its placeholder kept the
language it was built in. It now formats again when the language
changes (`set_placeholder_with`), as Settings' searches do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFavh5KCVyLoRNDUMJmjfN

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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