File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,21 @@ async function setupCleanupHandlers() {
173173 } ) ;
174174}
175175
176- async function needsTranslation ( enFilePath : string , lang : string ) : boolean {
176+ async function needsTranslation (
177+ enFilePath : string ,
178+ lang : string
179+ ) : Promise < boolean > {
177180 const cnFilePath = enFilePath . replace (
178181 path . sep + "en" + path . sep ,
179- path . sep + ".." + path . sep + "i18n" + path . sep + "translation_output" + path . sep + lang + path . sep
182+ path . sep +
183+ ".." +
184+ path . sep +
185+ "i18n" +
186+ path . sep +
187+ "translation_output" +
188+ path . sep +
189+ lang +
190+ path . sep
180191 ) ;
181192 try {
182193 const cnStats = await fs . promises . stat ( cnFilePath ) ;
@@ -285,7 +296,9 @@ export default async function fancyName(path: string, language: string) {
285296 batch . map ( async file => {
286297 if ( absent ) {
287298 if ( ! ( await needsTranslation ( file , lang ) ) ) {
288- console . log ( `Skipped translation for ${ file } to language ${ lang } (yarn trans abs)` ) ;
299+ console . log (
300+ `Skipped translation for ${ file } to language ${ lang } (yarn trans abs)`
301+ ) ;
289302 return { file, success : true } ;
290303 }
291304 }
You can’t perform that action at this time.
0 commit comments