You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From Gatsby i18n plugin I've brought over the TemplateWrapper to this repo from here.
Whereas the "Using Contentful" repo uses a React.Component as shown here.
I've used the TemplateWrapper from the i18n plugin as I need to pass those arguments for the i18n strings. There's probably a way I can do this with the Component method?
Seeing the issue with dynamically created pages not getting the i18n strings - this seems like an issue where gatsby-plugin-i18n isn't applying the specialized layout (e.g. src/layouts/en-US.js) to a dynamically created path?
Should that be something accounted for by the plugin, then?
Hey @romeboards, thanks a lot for chipping in here. Yes, I think you're right. I think it is related to what I mention on this issue on the plugin, but I don't know so much about it other than that at the moment. Would be great if you had anything to share on that, would love to address it. angeloocana/gatsby-plugin-i18n#12 (comment) Cheers
mccrodp
changed the title
Improve current usage of TemplateWrapper or convert to Component
Investigate Converting TemplateWrapper to Component that extends React.Component
Mar 28, 2018
From Gatsby i18n plugin I've brought over the TemplateWrapper to this repo from here.
Whereas the "Using Contentful" repo uses a React.Component as shown here.
I've used the TemplateWrapper from the i18n plugin as I need to pass those arguments for the i18n strings. There's probably a way I can do this with the Component method?
Also, this method has issue as it's designed to work with the static pages, not dynamic content from a CMS that uses templates, so in that way, our dynamic content: Products and Categories that use templates do not pass the i18n strings, so I need to do a hack for them here: https://github.com/mccrodp/gatsby-contentful-i18n/blob/master/src/layouts/index.js#L21
The text was updated successfully, but these errors were encountered: