fix: use i18n strings for chatbox todo snapshot card
This commit is contained in:
@@ -190,7 +190,7 @@ describe('AssistantMessage', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(screen.getByLabelText('Agent task checklist snapshot')).toBeInTheDocument();
|
expect(screen.getByLabelText('Agent task checklist')).toBeInTheDocument();
|
||||||
expect(screen.getByText('Task Checklist')).toBeInTheDocument();
|
expect(screen.getByText('Task Checklist')).toBeInTheDocument();
|
||||||
expect(screen.getByText('1/2 completed')).toBeInTheDocument();
|
expect(screen.getByText('1/2 completed')).toBeInTheDocument();
|
||||||
expect(screen.getByText('Working on: Writing harmony')).toBeInTheDocument();
|
expect(screen.getByText('Working on: Writing harmony')).toBeInTheDocument();
|
||||||
|
|||||||
@@ -222,16 +222,16 @@ const AssistantMessage: React.FC<AssistantMessageProps> = ({
|
|||||||
const activeTodo = todoSnapshot.find(todo => todo.status === 'in_progress') ?? null;
|
const activeTodo = todoSnapshot.find(todo => todo.status === 'in_progress') ?? null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="chatbox-todo-card" aria-label="Agent task checklist snapshot">
|
<section className="chatbox-todo-card" aria-label={t('chatbox.todo.ariaLabel')}>
|
||||||
<div className="chatbox-todo-card-header">
|
<div className="chatbox-todo-card-header">
|
||||||
<h4>Task Checklist</h4>
|
<h4>{t('chatbox.todo.title')}</h4>
|
||||||
<span className="chatbox-todo-count">
|
<span className="chatbox-todo-count">
|
||||||
{counts.completed}/{counts.total} completed
|
{t('chatbox.todo.count', { completed: counts.completed, total: counts.total })}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{activeTodo && (
|
{activeTodo && (
|
||||||
<div className="chatbox-todo-active">
|
<div className="chatbox-todo-active">
|
||||||
Working on: {activeTodo.activeText || activeTodo.text}
|
{t('chatbox.todo.active', { task: activeTodo.activeText || activeTodo.text })}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<ul className="chatbox-todo-list">
|
<ul className="chatbox-todo-list">
|
||||||
|
|||||||
Reference in New Issue
Block a user