Skip to content

fix(desktop): localize the group-activity feed's row verbs - #114256

Open
EloquentBrush0x wants to merge 1 commit into
NousResearch:mainfrom
EloquentBrush0x:fix/group-activity-labels-i18n
Open

EloquentBrush0x wants to merge 1 commit into
NousResearch:mainfrom
EloquentBrush0x:fix/group-activity-labels-i18n

Conversation

@EloquentBrush0x

Copy link
Copy Markdown

Summary

PR #113430 localized the bot-roster menu and group-row chrome, but its own comment disclosed one remaining gap: group-activity.ts::GROUP_ACTIVITY_LABELS was still a hardcoded English Record<GroupActivityKind, string>, so the room's Activity feed rows ("Alice sent a message", "Bob is working…", etc.) never followed the active locale.

Changes

  • Added 12 new group.* keys to the BotsMessages interface and all four locale bundles (en/ja/zh/zh-hant):
    • 9 speaker-taking verbs (activityQueued, activityWorking, activityReplied, activityPassed, activityTimedOut, activityFailed, activityDelivered, activityHeld, activityStopped) as (who: string) => string functions — matching the established memberThinking/b.bot.unpinnedToast(...)-style precedent (a function embeds the name so a locale can place the particle/word order right after it, e.g. Japanese ${who}が…), not raw string concatenation.
    • 3 standalone strings (activityCancelled, activitySettled, activityCapped) for the room-level lines that never take a speaker.
  • Rewrote groupActivityLabel() to read these via botsText() instead of the local hardcoded map.
  • Also routed the "You" display side through the already-existing g.you translated string (the event.member === 'You' sentinel comparison itself is unrelated backend data and stays as-is).

Test plan

  • Extended i18n.test.ts's existing generic locale-coverage tests with a new case: every speaker-taking verb keeps the sentinel argument in its output, and every locale's activity strings differ from English's.
  • Mutation-verify: reverted the two production files, confirmed the new test fails (TypeError: fn is not a function, since the pre-fix bundle has no activityQueued etc.); restored the fix, all tests pass again.
  • group-activity.test.ts's existing 'labels read like a person wrote them...' test (asserting exact English strings like 'You sent a message') still passes unchanged — confirms the English output is byte-identical to before.
  • tsc --noEmit and eslint clean on all three touched files.

Note: group-activity.test.ts > epoch scoping > queues follow-ups without cancelling the active turn or losing its reply delta fails both with and without this change (confirmed by stashing all changes and rerunning against a clean baseline) — a pre-existing, timing-sensitive flake unrelated to this PR.

🤖 Generated with Claude Code

PR NousResearch#113430 localized the bot-roster menu and group-row chrome but its
own comment disclosed one remaining gap: group-activity.ts::
GROUP_ACTIVITY_LABELS was still a hardcoded English Record<GroupActivityKind,
string>, so the Activity feed's "X sent a message" / "X is working…" /
etc. rows never followed the active locale.

Added activityQueued/Working/Replied/Passed/TimedOut/Failed/Delivered/
Held/Stopped (functions taking the speaker, matching the memberThinking
precedent for locales that need the particle right after the name) plus
the 3 standalone activityCancelled/Settled/Capped strings to all four
locale bundles (en/ja/zh/zh-hant), and rewrote groupActivityLabel() to
read them via botsText() instead of the local hardcoded map. Also routed
the "You" display side through the already-existing g.you (the member
sentinel comparison itself stays the literal 'You').

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) comp/plugins Plugin system and bundled plugins area/i18n Localization, locales, translations labels Sep 17, 2026
@alt-glitch

Copy link
Copy Markdown

This was generated by AI during triage.

Related follow-up to merged #113430: that change localized roster and group-row chrome, while this PR covers the remaining hard-coded group-activity feed verbs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/i18n Localization, locales, translations comp/desktop Electron desktop app (apps/desktop/*) comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants