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

Change routing to support localizations #17759

Closed
tesseralis opened this issue Sep 20, 2019 · 8 comments
Closed

Change routing to support localizations #17759

tesseralis opened this issue Sep 20, 2019 · 8 comments
Labels
help wanted Issue with a clear description that the community can help with.

Comments

@tesseralis
Copy link
Contributor

tesseralis commented Sep 20, 2019

Summary

Make changes to the gatsbyjs.org site's gatsby-node to support localized routes.

Details

A lot of implementation details can be taken from the using-i18n example by @LekoArts .

Step 1

For the first step, we need to reroute all English docs to a localized /en path:

  • Move translate-able routes (currently /docs, /tutorial, and /contributing) under an en/ route (e.g. /en/docs/quick-start)
  • Redirect /docs/[page] to /en/docs/[page] (same for tutorials and contributing)
  • Make a LocalizedLink component so that links in markdown to localized files are always routed to the localized URL.

Step 2

Once we are able to pull in language repos, we can then proceed to display those localized pages based on the language code:

  • Update gatsby-node to create pages for each localized markdown file
  • Decide on a strategy for dealing with non-localized pages
  • Update LocalizedLink to keep links in the current language

Unresolved Questions

  • There are a number of redirects from translate-able pages to other translate-able pages (e.g. /docs/community/ to /contributing/community/). How should we deal with these when all pages are being redirected to /en?
@gatsbot
Copy link

gatsbot bot commented Oct 14, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 14, 2019
@tesseralis tesseralis added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Oct 15, 2019
@nutboltu
Copy link

@tesseralis I would like to work on this issue

@tesseralis tesseralis self-assigned this Oct 28, 2019
@tesseralis
Copy link
Contributor Author

@nutboltu thanks for the offer, but I think this is something I need to handle myself!

@nutboltu
Copy link

@tesseralis Cheers!. Just curious if there's any ticket I can tackle regarding translation docs.

@tesseralis
Copy link
Contributor Author

Actually... @nuboltu if you want to take a shot at this, be my guest. The barrier I ran into was that the source takes so long to build that it was difficult to iterate on and it made more sense for me to wait until the core team made improvements to it. I'm focused more on setting up the translation workflow now, but if you want to try your hand, go ahead!

@nutboltu
Copy link

Thanks, @tesseralis I'll take a look 😄

@krpeacock
Copy link

Looking forward to seeing how this goes! I've got an MDX project that would benefit from this work once it's ready

@tesseralis tesseralis changed the title [i18n] Change routing to support localizations Change routing to support localizations Nov 8, 2019
@tesseralis tesseralis removed their assignment Nov 8, 2019
@tesseralis tesseralis added the help wanted Issue with a clear description that the community can help with. label Nov 8, 2019
@tesseralis
Copy link
Contributor Author

Fiexed as of #20637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with.
Projects
None yet
Development

No branches or pull requests

5 participants