File tree 2 files changed +18
-4
lines changed
src/startPage-ui/startPage
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change
1
+ Re-enable localization on the start page. It was accidentally
2
+ disabled in October when the Jupyter extension was split out.
Original file line number Diff line number Diff line change 4
4
5
5
import * as React from 'react' ;
6
6
import '../../client/common/extensions' ;
7
+ import { SharedMessages } from '../../client/common/startPage/messages' ;
7
8
import { ISettingPackage , IStartPageMapping , StartPageMessages } from '../../client/common/startPage/types' ;
8
9
import { Image , ImageName } from '../react-common/image' ;
9
- import { getLocString } from '../react-common/locReactSide' ;
10
+ import { getLocString , storeLocStrings } from '../react-common/locReactSide' ;
10
11
import { IMessageHandler , PostOffice } from '../react-common/postOffice' ;
11
12
import './startPage.css' ;
12
13
@@ -146,9 +147,20 @@ export class StartPage extends React.Component<IStartPageProps> implements IMess
146
147
}
147
148
148
149
public handleMessage = ( msg : string , payload ?: any ) => {
149
- if ( msg === StartPageMessages . SendSetting ) {
150
- this . releaseNotes . showAgainSetting = payload . showAgainSetting ;
151
- this . setState ( { } ) ;
150
+ switch ( msg ) {
151
+ case StartPageMessages . SendSetting :
152
+ this . releaseNotes . showAgainSetting = payload . showAgainSetting ;
153
+ this . setState ( { } ) ;
154
+ break ;
155
+
156
+ case SharedMessages . LocInit :
157
+ // Initialize localization.
158
+ const locJSON = JSON . parse ( payload ) ;
159
+ storeLocStrings ( locJSON ) ;
160
+ break ;
161
+
162
+ default :
163
+ break ;
152
164
}
153
165
154
166
return false ;
You can’t perform that action at this time.
0 commit comments