Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(i18n): fixes that preview not changing with locale #5875

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

ManojBahuguna
Copy link
Contributor

@ManojBahuguna ManojBahuguna commented Oct 7, 2021

Summary
Though we are passing onLocaleChange prop to EditorControlPane, that prop is not actually being used by the component.
So EditorLayout doesn't get updates reagrding locale selection changes.

This was causing preview pane to not update according to the selected locale as mentioned in issue: #5337

closes #5337

Checklist

  • I have read the contribution guidelines.
  • Code is formatted via running yarn format.
  • Tests are passing via running yarn test.
  • The status checks are successful (continuous integration). Those can be seen below.

A picture of a cute animal (not mandatory but encouraged)
Red Panda
red-panda

Though we are passing `onLocaleChange` prop to EditorControlPane, that prop is not actually being used by the component.  
So EditorLayout doesn't get updates reagrding locale selection changes.

This was causing preview pane to not update according to the selected locale as mentioned in issue: decaporg#5337
@ManojBahuguna ManojBahuguna requested a review from a team October 7, 2021 19:17
@ManojBahuguna
Copy link
Contributor Author

Prop was passed, but was not being used
image

So leftPanelLocale was always undefined

and thus previewEntry had data always for default locale only

@erezrokah erezrokah added the type: bug code to address defects in shipped code label Oct 8, 2021
Copy link
Contributor

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ManojBahuguna, nice catch!

@erezrokah erezrokah merged commit b331cc6 into decaporg:master Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i18n Custom Previews
2 participants