Skip to content

Commit aa0763a

Browse files
bm-wd13
authored andcommitted
Fix GitCodeLensProvider.resolveGitAuthors… "others" pluralization.
1 parent 88b60a7 commit aa0763a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/codelens/codeLensProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,11 @@ export class GitCodeLensProvider implements CodeLensProvider {
537537

538538
const count = blame.authors.size;
539539
const author = first(blame.authors.values())?.name ?? 'Unknown';
540+
const andOthers = count > 1
541+
? ` and ${pluralize('one other', count - 1, { only: true, plural: 'others' })}`
542+
: '';
540543

541-
let title = `${pluralize('author', count, { zero: '?' })} (${author}${count > 1 ? ' and others' : ''})`;
544+
let title = `${pluralize('author', count, { zero: '?' })} (${author}${andOthers})`;
542545
if (configuration.get('debug')) {
543546
title += ` [${lens.languageId}: ${SymbolKind[lens.symbol.kind]}(${lens.range.start.character}-${
544547
lens.range.end.character

0 commit comments

Comments
 (0)