File tree 1 file changed +5
-17
lines changed
1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -160,23 +160,11 @@ async function run () {
160
160
const specs = cmd . spec ? cmd . spec . split ( ',' ) : [ 'total' ]
161
161
162
162
const poDir = path . join ( cmd . podir || i18nDir , domainName )
163
- let countOutput = ''
164
- if ( locales . length === 1 ) {
165
- const poPath = path . join ( poDir , locales [ 0 ] + '.po' )
166
- countOutput = countPoEntries ( poPath , specs )
167
- } else if ( locales . length > 1 ) {
168
- const counts = locales . map ( locale => {
169
- const poPath = path . join ( poDir , locale + '.po' )
170
- return locale + ':' + countPoEntries ( poPath , specs )
171
- } )
172
- countOutput = counts . join ( ',' )
173
- }
174
-
175
- if ( domainNames . length > 1 ) {
176
- process . stdout . write ( `${ domainName } ,${ countOutput } \n` )
177
- } else {
178
- process . stdout . write ( `${ countOutput } \n` )
179
- }
163
+ const counts = locales . map ( locale => {
164
+ const poPath = path . join ( poDir , locale + '.po' )
165
+ return locale + ':' + countPoEntries ( poPath , specs )
166
+ } )
167
+ process . stdout . write ( `${ domainName } ,${ counts . join ( ',' ) } \n` )
180
168
break
181
169
}
182
170
You can’t perform that action at this time.
0 commit comments