File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -370,6 +370,7 @@ async function main() {
370
370
recursiveTranslateXml ( "" , "parseXml" ) ;
371
371
} else if ( parseType == "json" ) {
372
372
const languages = await getDirectories ( path . join ( __dirname , "../xml" ) ) ;
373
+ languages . sort ( function ( x , y ) { return x === "en" ? - 1 : y === "en" ? 1 : 0 ; } ) ; // put "en" at front
373
374
console . dir ( languages ) ;
374
375
375
376
for ( const lang of languages ) {
@@ -388,7 +389,11 @@ async function main() {
388
389
await recursiveXmlToHtmlInOrder ( "setupSnippet" ) ;
389
390
console . log ( "setup snippets and references done\n" ) ;
390
391
await recursiveXmlToHtmlInOrder ( "parseXml" ) ;
391
- writeRewritedSearchData ( ) ;
392
+ // only write search data for English XMLs
393
+ // todo: support for other langs
394
+ if ( lang === "en" ) {
395
+ writeRewritedSearchData ( ) ;
396
+ }
392
397
// this is meant to be temp; also, will remove the original "generateSearchData" after the updation at the frontend is completed.
393
398
//testIndexSearch();
394
399
}
You can’t perform that action at this time.
0 commit comments