Commit e5833b0 1 parent c4103ed commit e5833b0 Copy full SHA for e5833b0
File tree 13 files changed +49
-43
lines changed
13 files changed +49
-43
lines changed Original file line number Diff line number Diff line change 1
- export const LANGUAGES : string [ ] ;
2
-
3
- export const LANGUAGES_SSR : string [ ] ;
4
-
5
- export const LANGUAGES_IN_PROGRESS : string [ ] ;
6
-
7
- export const LANGUAGES_IGNORE_PAGES : ( pathname : string ) => boolean ;
1
+ export * from '@mui/docs/config' ;
Original file line number Diff line number Diff line change 1
- // Valid languages to server-side render in production
2
- const LANGUAGES = [ 'en' ] ;
3
-
4
- // Server side rendered languages
5
- const LANGUAGES_SSR = [ 'en' ] ;
6
-
7
- // Work in progress
8
- const LANGUAGES_IN_PROGRESS = LANGUAGES . slice ( ) ;
9
-
10
- const LANGUAGES_IGNORE_PAGES = ( pathname ) => {
11
- // We don't have the bandwidth like Qt to translate our blog posts
12
- // https://www.qt.io/zh-cn/blog
13
- if ( pathname === '/blog' || pathname . startsWith ( '/blog/' ) ) {
14
- return true ;
15
- }
16
-
17
- if ( pathname === '/size-snapshot/' ) {
18
- return true ;
19
- }
20
-
21
- return false ;
22
- } ;
23
-
24
- module . exports = {
25
- LANGUAGES ,
26
- LANGUAGES_IN_PROGRESS ,
27
- LANGUAGES_SSR ,
28
- LANGUAGES_IGNORE_PAGES ,
29
- } ;
1
+ module . exports = require ( '@mui/docs/config' ) ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import NewspaperRoundedIcon from '@mui/icons-material/NewspaperRounded';
22
22
import GlobalStyles from '@mui/material/GlobalStyles' ;
23
23
import { alpha , styled } from '@mui/material/styles' ;
24
24
import { pathnameToLanguage } from 'docs/src/modules/utils/helpers' ;
25
- import { LANGUAGES_SSR } from 'docs/config' ;
25
+ import { LANGUAGES_SSR } from '@mui/ docs/config' ;
26
26
import Link from 'docs/src/modules/components/Link' ;
27
27
import { useTranslate , useUserLanguage } from '@mui/docs/i18n' ;
28
28
import useLazyCSS from 'docs/src/modules/utils/useLazyCSS' ;
Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import NextHead from 'next/head' ;
3
3
import { useRouter } from 'next/router' ;
4
- import { LANGUAGES_SSR } from 'docs/config' ;
4
+ import { LANGUAGES_SSR } from '@mui/ docs/config' ;
5
5
import { useUserLanguage , useTranslate } from '@mui/docs/i18n' ;
6
6
import { pathnameToLanguage } from 'docs/src/modules/utils/helpers' ;
7
7
Original file line number Diff line number Diff line change 1
1
import upperFirst from 'lodash/upperFirst' ;
2
2
import camelCase from 'lodash/camelCase' ;
3
- import { LANGUAGES } from 'docs/config' ;
3
+ import { LANGUAGES } from '@mui/ docs/config' ;
4
4
5
5
function pascalCase ( str : string ) {
6
6
return upperFirst ( camelCase ( str ) ) ;
Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
- import { LANGUAGES } from 'docs/config' ;
2
+ import { LANGUAGES } from '@mui/ docs/config' ;
3
3
import { ProjectSettings } from '@mui-internal/api-docs-builder' ;
4
4
import findApiPages from '@mui-internal/api-docs-builder/utils/findApiPages' ;
5
5
import {
Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
- import { LANGUAGES } from 'docs/config' ;
2
+ import { LANGUAGES } from '@mui/ docs/config' ;
3
3
import { ProjectSettings } from '@mui-internal/api-docs-builder' ;
4
4
import findApiPages from '@mui-internal/api-docs-builder/utils/findApiPages' ;
5
5
import {
Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
- import { LANGUAGES } from 'docs/config' ;
2
+ import { LANGUAGES } from '@mui/ docs/config' ;
3
3
import { ProjectSettings } from '@mui-internal/api-docs-builder' ;
4
4
import findApiPages from '@mui-internal/api-docs-builder/utils/findApiPages' ;
5
5
import {
Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
- import { LANGUAGES } from 'docs/config' ;
2
+ import { LANGUAGES } from '@mui/ docs/config' ;
3
3
import { ProjectSettings } from '@mui-internal/api-docs-builder' ;
4
4
import findApiPages from '@mui-internal/api-docs-builder/utils/findApiPages' ;
5
5
import {
Original file line number Diff line number Diff line change 9
9
"typescript" : " tsc -p tsconfig.json"
10
10
},
11
11
"dependencies" : {
12
+ "@mui/docs" : " workspace:^" ,
12
13
"@mui-internal/api-docs-builder" : " workspace:^" ,
13
14
"@mui/markdown" : " workspace:^" ,
14
15
"docs" : " workspace:^" ,
Original file line number Diff line number Diff line change
1
+ export const LANGUAGES : string [ ] ;
2
+
3
+ export const LANGUAGES_SSR : string [ ] ;
4
+
5
+ export const LANGUAGES_IN_PROGRESS : string [ ] ;
6
+
7
+ export const LANGUAGES_IGNORE_PAGES : ( pathname : string ) => boolean ;
Original file line number Diff line number Diff line change
1
+ // Valid languages to server-side render in production
2
+ const LANGUAGES = [ 'en' ] ;
3
+
4
+ // Server side rendered languages
5
+ const LANGUAGES_SSR = [ 'en' ] ;
6
+
7
+ // Work in progress
8
+ const LANGUAGES_IN_PROGRESS = LANGUAGES . slice ( ) ;
9
+
10
+ const LANGUAGES_IGNORE_PAGES = ( pathname ) => {
11
+ // We don't have the bandwidth like Qt to translate our blog posts
12
+ // https://www.qt.io/zh-cn/blog
13
+ if ( pathname === '/blog' || pathname . startsWith ( '/blog/' ) ) {
14
+ return true ;
15
+ }
16
+
17
+ if ( pathname === '/size-snapshot/' ) {
18
+ return true ;
19
+ }
20
+
21
+ return false ;
22
+ } ;
23
+
24
+ module . exports = {
25
+ LANGUAGES ,
26
+ LANGUAGES_IN_PROGRESS ,
27
+ LANGUAGES_SSR ,
28
+ LANGUAGES_IGNORE_PAGES ,
29
+ } ;
You can’t perform that action at this time.
0 commit comments