@@ -38,11 +38,11 @@ interface ComponentMeta {
3838}
3939
4040interface DemoMeta {
41- title : { 'en-US' : string ; 'zh-Hant ' : string } ;
41+ title : { 'en-US' : string ; 'zh-CN ' : string } ;
4242 __content : string ;
4343}
4444
45- const LANGS = [ 'en-US' , 'zh-Hant ' ] as const ;
45+ const LANGS = [ 'en-US' , 'zh-CN ' ] as const ;
4646
4747class GenerateSite {
4848 private hashList = new Map < string , string > ( ) ;
@@ -58,7 +58,7 @@ class GenerateSite {
5858 } ;
5959 } ;
6060 } ;
61- 'zh-Hant ' : {
61+ 'zh-CN ' : {
6262 translation : {
6363 menu : {
6464 'components-group' : { [ index : string ] : string } ;
@@ -67,7 +67,7 @@ class GenerateSite {
6767 } ;
6868 } ;
6969 } ;
70- private menuGroups ! : { 'en-US' : string ; 'zh-Hant ' : string } [ ] ;
70+ private menuGroups ! : { 'en-US' : string ; 'zh-CN ' : string } [ ] ;
7171 private routesTmp ! : string ;
7272 private componentRouteTmp ! : string ;
7373 private mdRouteTmp ! : string ;
@@ -127,7 +127,7 @@ class GenerateSite {
127127 this . outputFile ( path . join ( outDir , `${ fileName } .tsx` ) , outTSX ) ;
128128
129129 const demo = new Map <
130- 'en-US' | 'zh-Hant ' ,
130+ 'en-US' | 'zh-CN ' ,
131131 {
132132 id ?: string ;
133133 name ?: string ;
@@ -139,7 +139,7 @@ class GenerateSite {
139139 }
140140 > ( [
141141 [ 'en-US' , { } ] ,
142- [ 'zh-Hant ' , { } ] ,
142+ [ 'zh-CN ' , { } ] ,
143143 ] ) ;
144144 Array . from ( demo . keys ( ) ) . forEach ( ( lang , index , langs ) => {
145145 const obj = demo . get ( lang ) ! ;
@@ -167,18 +167,18 @@ class GenerateSite {
167167
168168 generateComponentRoute ( file : { name : string ; path : string ; data : string [ ] } ) {
169169 const enMeta = loadFront ( readFileSync ( path . join ( file . path , 'README.md' ) ) ) as ComponentMeta ;
170- const zhMeta = loadFront ( readFileSync ( path . join ( file . path , 'README.zh-Hant .md' ) ) ) as ComponentMeta ;
170+ const zhMeta = loadFront ( readFileSync ( path . join ( file . path , 'README.zh-CN .md' ) ) ) as ComponentMeta ;
171171 const meta = {
172172 aria : enMeta . aria ?? '' ,
173173 compose : enMeta . compose ?? '' ,
174174 'virtual-scroll' : enMeta [ 'virtual-scroll' ] ?? '' ,
175175 title : {
176176 'en-US' : enMeta . title ,
177- 'zh-Hant ' : zhMeta . title ,
177+ 'zh-CN ' : zhMeta . title ,
178178 } ,
179179 __content : {
180180 'en-US' : enMeta . __content ,
181- 'zh-Hant ' : zhMeta . __content ,
181+ 'zh-CN ' : zhMeta . __content ,
182182 } ,
183183 } ;
184184
@@ -483,7 +483,7 @@ export default async function* siteBuildExecutor(options: SiteBuildExecutorOptio
483483 } ;
484484 if ( ! fileWatcher . hasWatcher ( path . join ( componentPath , 'README.md' ) ) ) {
485485 fileWatcher . addWatcher ( path . join ( componentPath , 'README.md' ) , task ) ;
486- fileWatcher . addWatcher ( path . join ( componentPath , 'README.zh-Hant .md' ) , task ) ;
486+ fileWatcher . addWatcher ( path . join ( componentPath , 'README.zh-CN .md' ) , task ) ;
487487 fileWatcher . addWatcher ( path . join ( componentPath , 'demos' ) , task ) ;
488488 }
489489 }
@@ -508,7 +508,7 @@ export default async function* siteBuildExecutor(options: SiteBuildExecutorOptio
508508 } ;
509509 if ( ! fileWatcher . hasWatcher ( filePath ) ) {
510510 fileWatcher . addWatcher ( path . join ( mdPath , routeName + '.md' ) , task ) ;
511- fileWatcher . addWatcher ( path . join ( mdPath , routeName + '.zh-Hant .md' ) , task ) ;
511+ fileWatcher . addWatcher ( path . join ( mdPath , routeName + '.zh-CN .md' ) , task ) ;
512512 }
513513 }
514514 }
0 commit comments