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() {
25
25
const files = ( await fs . readdir ( localesDir ) ) . filter ( file => file !== 'en_US.axaml' && file . endsWith ( '.axaml' ) ) ;
26
26
27
27
// Add en_US badge first
28
- badges . push ( `[](TRANSLATION.md)` ) ;
28
+ badges . push ( `[](TRANSLATION.md)` ) ;
29
29
30
30
for ( const file of files ) {
31
31
const filePath = path . join ( localesDir , file ) ;
@@ -40,8 +40,12 @@ async function calculateTranslationRate() {
40
40
41
41
// Add badges
42
42
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
+ }
45
49
}
46
50
47
51
console . log ( translationRates . join ( '\n\n' ) ) ;
You can’t perform that action at this time.
0 commit comments