Fixes #4253 by telling the vm the langauge when it is initialized. Before it didn't get the language until the blocks component mounted.
This commit is contained in:
1 parent
aa7d52553a
commit
ac0705c12c
1 file changed
+5
@@ -33,6 +33,7 @@ const vmManagerHOC = function (WrappedComponent) {
|
||||
this.props.vm.attachAudioEngine(this.audioEngine);
|
||||
this.props.vm.setCompatibilityMode(true);
|
||||
this.props.vm.initialized = true;
|
||||
this.props.vm.setLocale(this.props.locale, this.props.messages);
|
||||
}
|
||||
if (!this.props.isPlayerOnly && !this.props.isStarted) {
|
||||
this.props.vm.start();
|
||||
@@ -105,6 +106,8 @@ const vmManagerHOC = function (WrappedComponent) {
|
||||
isLoadingWithId: PropTypes.bool,
|
||||
isPlayerOnly: PropTypes.bool,
|
||||
loadingState: PropTypes.oneOf(LoadingStates),
|
||||
locale: PropTypes.string,
|
||||
messages: PropTypes.objectOf(PropTypes.string),
|
||||
onError: PropTypes.func,
|
||||
onLoadedProject: PropTypes.func,
|
||||
onSetProjectUnchanged: PropTypes.func,
|
||||
@@ -119,6 +122,8 @@ const vmManagerHOC = function (WrappedComponent) {
|
||||
return {
|
||||
fontsLoaded: state.scratchGui.fontsLoaded,
|
||||
isLoadingWithId: getIsLoadingWithId(loadingState),
|
||||
locale: state.locales.locale,
|
||||
messages: state.locales.messages,
|
||||
projectData: state.scratchGui.projectState.projectData,
|
||||
projectId: state.scratchGui.projectState.projectId,
|
||||
loadingState: loadingState,
|
||||
|
||||
Reference in new issue
Block a user