@@ -8,9 +8,9 @@ function prepare (siteData) {
88 page . frontmatter = { }
99 }
1010 } )
11- if ( siteData . langs ) {
12- Object . keys ( siteData . langs ) . forEach ( path => {
13- siteData . langs [ path ] . path = path
11+ if ( siteData . locales ) {
12+ Object . keys ( siteData . locales ) . forEach ( path => {
13+ siteData . locales [ path ] . path = path
1414 } )
1515 }
1616 Object . freeze ( siteData )
@@ -33,30 +33,30 @@ export default {
3333 $site ( ) {
3434 return store . siteData
3535 } ,
36- $langConfig ( ) {
37- const { langs } = this . $site
36+ $localeConfig ( ) {
37+ const { locales } = this . $site
3838 let targetLang
3939 let defaultLang
40- Object . keys ( langs ) . forEach ( path => {
40+ Object . keys ( locales ) . forEach ( path => {
4141 if ( path === '/' ) {
42- defaultLang = langs [ path ]
42+ defaultLang = locales [ path ]
4343 } else if ( this . $page . path . indexOf ( path ) === 0 ) {
44- targetLang = langs [ path ]
44+ targetLang = locales [ path ]
4545 }
4646 } )
4747 return targetLang || defaultLang || { }
4848 } ,
4949 $title ( ) {
50- return this . $langConfig . title || this . $site . title || ''
50+ return this . $localeConfig . title || this . $site . title || ''
5151 } ,
5252 $description ( ) {
53- return this . $langConfig . description || this . $site . description || ''
53+ return this . $localeConfig . description || this . $site . description || ''
5454 } ,
5555 $lang ( ) {
56- return this . $langConfig . lang || 'en-US'
56+ return this . $localeConfig . lang || 'en-US'
5757 } ,
5858 $localePath ( ) {
59- return this . $langConfig . path || '/'
59+ return this . $localeConfig . path || '/'
6060 } ,
6161 $page ( ) {
6262 return findPageForPath (
0 commit comments