File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
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 ) ;
@@ -41,7 +41,11 @@ async function calculateTranslationRate() {
41
41
// Add badges
42
42
const locale = file . replace ( '.axaml' , '' ) . replace ( '_' , '__' ) ;
43
43
const badgeColor = translationRate === 100 ? 'brightgreen' : translationRate >= 75 ? 'yellow' : 'red' ;
44
- badges . push ( `[ } %25-${ badgeColor } )](TRANSLATION.md)` ) ;
44
+ if ( translationRate === 100 ) {
45
+ badges . push ( `[](TRANSLATION.md)` ) ;
46
+ } else {
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