@@ -4,6 +4,7 @@ import { GlyphChars } from '../../constants';
44import type { GitUri } from '../../git/gitUri' ;
55import type { GitContributor } from '../../git/models/contributor' ;
66import type { GitLog } from '../../git/models/log' ;
7+ import { formatNumeric } from '../../system/date' ;
78import { gate } from '../../system/decorators/gate' ;
89import { debug } from '../../system/decorators/log' ;
910import { map } from '../../system/iterable' ;
@@ -85,17 +86,15 @@ export class ContributorNode extends ViewNode<'contributor', ViewsWithContributo
8586 async getTreeItem ( ) : Promise < TreeItem > {
8687 const presence = this . options ?. presence ?. get ( this . contributor . email ! ) ;
8788
88- const numberFormatter = new Intl . NumberFormat ( ) ;
89-
9089 const shortStats =
9190 this . contributor . stats != null
92- ? ` (${ pluralize ( 'file' , this . contributor . stats . files , {
93- format : numberFormatter . format ,
94- } ) } , +${ numberFormatter . format ( this . contributor . stats . additions ) } -${ numberFormatter . format (
91+ ? ` (${ pluralize ( 'file' , this . contributor . stats . files ) } , +${ formatNumeric (
9592 this . contributor . stats . additions ,
96- ) } ${ pluralize ( 'line' , this . contributor . stats . additions + this . contributor . stats . deletions , {
97- only : true ,
98- } ) } )`
93+ ) } -${ formatNumeric ( this . contributor . stats . additions ) } ${ pluralize (
94+ 'line' ,
95+ this . contributor . stats . additions + this . contributor . stats . deletions ,
96+ { only : true } ,
97+ ) } )`
9998 : '' ;
10099
101100 const item = new TreeItem (
@@ -113,9 +112,6 @@ export class ContributorNode extends ViewNode<'contributor', ViewsWithContributo
113112 } ${ this . contributor . date != null ? `${ this . contributor . formatDateFromNow ( ) } , ` : '' } ${ pluralize (
114113 'commit' ,
115114 this . contributor . count ,
116- {
117- format : numberFormatter . format ,
118- } ,
119115 ) } ${ shortStats } `;
120116
121117 let avatarUri ;
@@ -146,13 +142,10 @@ export class ContributorNode extends ViewNode<'contributor', ViewsWithContributo
146142
147143 const stats =
148144 this . contributor . stats != null
149- ? `\\\n${ pluralize ( 'file' , this . contributor . stats . files , {
150- format : numberFormatter . format ,
151- } ) } changed, ${ pluralize ( 'addition' , this . contributor . stats . additions , {
152- format : numberFormatter . format ,
153- } ) } , ${ pluralize ( 'deletion' , this . contributor . stats . deletions , {
154- format : numberFormatter . format ,
155- } ) } `
145+ ? `\\\n${ pluralize ( 'file' , this . contributor . stats . files ) } changed, ${ pluralize (
146+ 'addition' ,
147+ this . contributor . stats . additions ,
148+ ) } , ${ pluralize ( 'deletion' , this . contributor . stats . deletions ) } `
156149 : '' ;
157150
158151 const link = this . contributor . email
@@ -168,7 +161,6 @@ export class ContributorNode extends ViewNode<'contributor', ViewsWithContributo
168161 `${ avatarMarkdown != null ? avatarMarkdown : '' } ${ link } \n\n${ lastCommitted } ${ pluralize (
169162 'commit' ,
170163 this . contributor . count ,
171- { format : numberFormatter . format } ,
172164 ) } ${ stats } `,
173165 ) ;
174166 markdown . supportHtml = true ;
0 commit comments