File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ async function calculateTranslationRate() {
2525 const files = ( await fs . readdir ( localesDir ) ) . filter ( file => file !== 'en_US.axaml' && file . endsWith ( '.axaml' ) ) ;
2626
2727 // Add en_US badge first
28- badges . push ( `[](TRANSLATION.md)` ) ;
28+ badges . push ( `[](TRANSLATION.md)` ) ;
2929
3030 for ( const file of files ) {
3131 const filePath = path . join ( localesDir , file ) ;
@@ -40,8 +40,12 @@ async function calculateTranslationRate() {
4040
4141 // Add badges
4242 const locale = file . replace ( '.axaml' , '' ) . replace ( '_' , '__' ) ;
43- const badgeColor = translationRate === 100 ? 'brightgreen' : translationRate >= 75 ? 'yellow' : 'red' ;
44- badges . push ( `[ } %25-${ badgeColor } )](TRANSLATION.md)` ) ;
43+ if ( translationRate === 100 ) {
44+ badges . push ( `[](TRANSLATION.md)` ) ;
45+ } else {
46+ const badgeColor = translationRate >= 75 ? 'yellow' : 'red' ;
47+ badges . push ( `[ } %25-${ badgeColor } )](TRANSLATION.md)` ) ;
48+ }
4549 }
4650
4751 console . log ( translationRates . join ( '\n\n' ) ) ;
You can’t perform that action at this time.
0 commit comments