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

i18n Custom Previews #5337

Closed
kaw2k opened this issue May 3, 2021 · 0 comments · Fixed by #5875
Closed

i18n Custom Previews #5337

kaw2k opened this issue May 3, 2021 · 0 comments · Fixed by #5875
Labels
area: i18n area: ui/editor/preview-pane good first issue type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@kaw2k
Copy link

kaw2k commented May 3, 2021

Is your feature request related to a problem? Please describe.
Currently there is no way to preview i18n entries in the template preview pane. No matter what language you have selected on the left side of the content editor, the right preview pane reflects the default locale.

Describe the solution you'd like
An additional field as part of PreviewTemplateComponentProps. It should be a string that represents the current locale selected. This would be useful if the component being rendered by the preview changed based on the locale type.

Additionally have the entry property update to whatever locale is selected on the left side. This way getIn should just reflect the new data source.

Additional context
My use case: I have several languages and many custom previews. It would greatly help the content editors to see the current language they are editing in the preview pane rather than the default language.

@kaw2k kaw2k added the type: feature code contributing to the implementation of a feature and/or user facing functionality label May 3, 2021
ManojBahuguna added a commit to ManojBahuguna/netlify-cms that referenced this issue Oct 7, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: i18n area: ui/editor/preview-pane good first issue type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants