File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,16 +133,15 @@ function LanguagePicker() {
133133 }
134134 aria-label = { translate ( 'i18n' , 'selectYourLanguage' ) }
135135 >
136- { typeof window !== 'undefined' &&
137- Object . entries ( config . locales ) . map ( ( [ id , label ] ) => (
138- < button
139- class = { cx ( id == lang && style . current ) }
140- data-value = { id }
141- onClick = { e => setLang ( e . currentTarget . dataset . value ) }
142- >
143- { label }
144- </ button >
145- ) ) }
136+ { Object . entries ( config . locales ) . map ( ( [ id , label ] ) => (
137+ < button
138+ class = { cx ( id == lang && style . current ) }
139+ data-value = { id }
140+ onClick = { e => setLang ( e . currentTarget . dataset . value ) }
141+ >
142+ { label }
143+ </ button >
144+ ) ) }
146145 </ ExpandableNavLink >
147146 ) }
148147 </ NavMenu >
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export function LanguageProvider({ children }) {
5252 const [ lang , setLang ] = useState ( 'en' ) ;
5353
5454 const translations = useResource ( ( ) => {
55- if ( lang == 'en' ) return Promise . resolve ( englishTranslations ) ;
55+ if ( lang == 'en' ) return englishTranslations ;
5656 let url = '' ;
5757 for ( const translationURL in translationURLs ) {
5858 if ( translationURL . includes ( `/${ lang } .json` ) ) {
You can’t perform that action at this time.
0 commit comments