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

[WIP] Add gatsby-plugin-i18n plugin #1

Closed
wants to merge 2 commits into from
Closed

Conversation

mccrodp
Copy link
Owner

@mccrodp mccrodp commented Feb 11, 2018

Attempt to add the gatsby-plugin-i18n plugin...

This gives build errors at the moment on running gatsby develop:

success delete html files from previous builds — 0.008 s
success open and validate gatsby-config.js — 0.004 s
success copy gatsby files — 0.054 s
success onPreBootstrap — 0.009 s
⠁ Starting to fetch data from Contentful
Fetching default locale
⠄ source and transform nodesdefault local is : en-US
⠠ source and transform nodescontentTypes fetched 4
Updated entries  10
Deleted entries  0
Updated assets  11
Deleted assets  0
Fetch Contentful data: 334.602ms
error UNHANDLED EXCEPTION


  TypeError: Cannot read property 'langKey' of undefined

  - onCreateNode.js:49 Object.onCreateNode
    [gatsby-contentful-i18n]/[gatsby-plugin-i18n]/onCreateNode.js:49:25

I presume this is because the Gatsby plugin has en rather than en-US set, but not sure where is throwing the error. Perhaps I could just duplicate the locale related files to use en-US and de like the Contentful example. Will try that next.

@mccrodp mccrodp changed the title [WIP] Add i18n plugin [WIP] Add gatsby-plugin-i18n plugin Feb 11, 2018
@mccrodp
Copy link
Owner Author

mccrodp commented Feb 11, 2018

Tried to play around with file naming and imports re the en-US and de lang codes used in the Contentful example, but no luck there, same error as above. Done for today.

@mccrodp
Copy link
Owner Author

mccrodp commented Feb 19, 2018

Got this working by starting afresh.

@mccrodp mccrodp closed this Feb 19, 2018
@mccrodp mccrodp deleted the add-i18n-plugin branch January 4, 2019 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant