@@ -78,22 +78,18 @@ export async function translateFederationArtefacts(
7878
7979 const translationOutPath = path . join ( outputPath , 'browser' , '{{LOCALE}}' ) ;
8080
81- const federationFiles = [
82- ...federationResult . shared . map ( ( s ) => s . outFileName ) ,
83- ...federationResult . exposes . map ( ( e ) => e . outFileName ) ,
84- ] ;
85-
86- // Here, we use a glob with an exhaustive list i/o `"*.js"`
87- // to improve performance
88- const sourcePattern = '{' + federationFiles . join ( ',' ) + '}' ;
81+ // Use *.js to translate ALL JS files, including lazy-loaded chunks
82+ // that may contain $localize markers from exposed modules
83+ const sourcePattern = '*.js' ;
8984
9085 const sourceLocalePath = path . join ( outputPath , 'browser' , sourceLocale ) ;
9186
9287 const localizeTranslate = path . resolve (
9388 'node_modules/.bin/localize-translate' ,
9489 ) ;
9590
96- const cmd = `${ localizeTranslate } -r ${ sourceLocalePath } -s "${ sourcePattern } " -t ${ translationFiles } -o ${ translationOutPath } --target-locales ${ targetLocales } -l ${ sourceLocale } ` ;
91+ // Quote paths to handle spaces (Windows compatibility)
92+ const cmd = `"${ localizeTranslate } " -r "${ sourceLocalePath } " -s "${ sourcePattern } " -t ${ translationFiles } -o "${ translationOutPath } " --target-locales ${ targetLocales } -l ${ sourceLocale } ` ;
9793
9894 ensureDistFolders ( locales , outputPath ) ;
9995 copyRemoteEntry ( locales , outputPath , sourceLocalePath ) ;
0 commit comments