fix(desktop): localize the group-activity feed's row verbs - #114256
Open
EloquentBrush0x wants to merge 1 commit into
Open
EloquentBrush0x wants to merge 1 commit into
EloquentBrush0x wants to merge 1 commit into
Conversation
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>
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_LABELSwas still a hardcoded EnglishRecord<GroupActivityKind, string>, so the room's Activity feed rows ("Alice sent a message", "Bob is working…", etc.) never followed the active locale.Changes
group.*keys to theBotsMessagesinterface and all four locale bundles (en/ja/zh/zh-hant):activityQueued,activityWorking,activityReplied,activityPassed,activityTimedOut,activityFailed,activityDelivered,activityHeld,activityStopped) as(who: string) => stringfunctions — matching the establishedmemberThinking/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.activityCancelled,activitySettled,activityCapped) for the room-level lines that never take a speaker.groupActivityLabel()to read these viabotsText()instead of the local hardcoded map.g.youtranslated string (theevent.member === 'You'sentinel comparison itself is unrelated backend data and stays as-is).Test plan
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.TypeError: fn is not a function, since the pre-fix bundle has noactivityQueuedetc.); 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 --noEmitandeslintclean on all three touched files.Note:
group-activity.test.ts > epoch scoping > queues follow-ups without cancelling the active turn or losing its reply deltafails 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