Skip to content

Commit

Permalink
fix: add tooltip for chat collapsed code blocks (#234460)
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceerhl authored Nov 23, 2024
1 parent 7ddb65b commit 7bbad41
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ class CollapsedCodeBlock extends Disposable {
}
labelAdded.textContent = `+${addedLines}`;
labelRemoved.textContent = `-${removedLines}`;
const insertionsFragment = addedLines === 1 ? localize('chat.codeblock.insertions.one', "{0} insertion") : localize('chat.codeblock.insertions', "{0} insertions", addedLines);
const deletionsFragment = removedLines === 1 ? localize('chat.codeblock.deletions.one', "{0} deletion") : localize('chat.codeblock.deletions', "{0} deletions", removedLines);
this.element.ariaLabel = this.element.title = localize('summary', 'Edited {0}, {1}, {2}', iconText, insertionsFragment, deletionsFragment);
}
}
}));
Expand Down

0 comments on commit 7bbad41

Please sign in to comment.