mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 00:03:52 +00:00
fix(agent-map): localize seen completion label
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import { agentMapStatusLabel } from './agent-map-node-presentation'
|
||||
|
||||
vi.mock('@/i18n/i18n', () => ({
|
||||
translate: (key: string, fallback: string) => `${key}:${fallback}`
|
||||
}))
|
||||
|
||||
describe('agentMapStatusLabel', () => {
|
||||
it('localizes the map-only acknowledged completion state', () => {
|
||||
expect(agentMapStatusLabel('done-seen')).toBe('dashboardPopout.map.status.doneSeen:Done, seen')
|
||||
})
|
||||
|
||||
it('keeps shared agent states on their existing labels', () => {
|
||||
expect(agentMapStatusLabel('working')).toBe('Working')
|
||||
expect(agentMapStatusLabel('done')).toBe('Done')
|
||||
})
|
||||
})
|
||||
@@ -11,7 +11,9 @@ import type { AgentMapNodeStatus } from './agent-map-node-metadata'
|
||||
* renderer, so the map's extra state gets its label here rather than widening
|
||||
* `AgentDotState`. */
|
||||
export function agentMapStatusLabel(status: AgentMapNodeStatus): string {
|
||||
return status === 'done-seen' ? 'Done, seen' : agentStateLabel(status)
|
||||
return status === 'done-seen'
|
||||
? translate('dashboardPopout.map.status.doneSeen', 'Done, seen')
|
||||
: agentStateLabel(status)
|
||||
}
|
||||
|
||||
export function formatDuration(minutes: number): string {
|
||||
|
||||
@@ -15370,7 +15370,10 @@
|
||||
"agentCount": "{{count}} agents",
|
||||
"agentCount_one": "{{count}} agent",
|
||||
"agentCount_other": "{{count}} agents",
|
||||
"noWorkspaceAgents": "No agents in this workspace."
|
||||
"noWorkspaceAgents": "No agents in this workspace.",
|
||||
"status": {
|
||||
"doneSeen": "Done, seen"
|
||||
}
|
||||
},
|
||||
"placeholder": {
|
||||
"title": "Agent dashboard",
|
||||
|
||||
Reference in New Issue
Block a user