Gatsby: Pull in translation repos as sources to gatsbyjs.org

Created on 7 Nov 2019  路  6Comments  路  Source: gatsbyjs/gatsby

Summary

Pull in translated content from translated repos like gatsby-es into the gatsby-config of www/

Details

Use gatsby-source-git or another plugin to pull in content from the translation repos.

Considerations:

  • Ideally, we should be able to query both the English docs and the translated docs the same way, and only need to differentiate them by passing a language code as a query parameter
  • While the translation repos only contain markdown files right now, they will also have YAML files and JSDoc files, so we need to make sure queries work for those as well.
  • For the majority of translation repos, the majority of content will not be translated yet. We need to find a way to differentiate this content and make sure we're not downloading or displaying unnecessary files.
  • We should have a way to easily "turn off" queries to other language so it is easier to iterate while developing.
help wanted i18n

Most helpful comment

This is an issue I might look into if https://github.com/gatsbyjs/gatsby/pull/19297 goes well. They are fairly complementary.

All 6 comments

the english docs can be git sourced from https://github.com/gatsbyjs/gatsby-i18n-source
then we also see if all is right exported and synced from gatsbyjs/gatsby docs (md/yaml/JSDoc)

Ooh... that's not a bad idea! That reduces the chances of having to do something different for English and translated repos.

But then I'm wondering what's the point of keeping the docs in the monorepo and not just moving it to gatsby-i18n-source (which I guess we could rename to gatsby-en or something). I guess the benefit of keeping it locally is:

  • Contributors don't need to download two different repos
  • When running a dev build, we could source from the local filesystem instead of git to be faster

Thanks for the suggestion :)

  • searching for for some code (a methodname) or similar in one repo is more easy then over 2 seperate repos.
  • then docs are better found for updates.
  • updates to docs and code can also be done in one PR.

todo: add an issue template for pull request/issues with information that this is only a technical repo and all should be gone to the main repo ( -> #19381)

@muescha would you be interested in helping implement this?

@tesseralis sorry - i am not so familiar with this :(

This is an issue I might look into if https://github.com/gatsbyjs/gatsby/pull/19297 goes well. They are fairly complementary.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magicly picture magicly  路  3Comments

kalinchernev picture kalinchernev  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

brandonmp picture brandonmp  路  3Comments

rossPatton picture rossPatton  路  3Comments