Giter VIP home page Giter VIP logo

learn.redwoodjs.com's Introduction

learn.redwoodjs.com

Deployment URL: https://learn.redwoodjs.com/

Crowdin

Translation

We currently support English, French, Spanish, Portuguese and Italian, but wish to include more languages!

Hey polyglots, want to help translate or proofread? Check out the Translation Guide to find out how to get started

Docusaurus 2 + Crowdin

We are using a late stage Alpha release of Docusuraus 2 that includes experimental integration with l10n management service Crowdin. i18n is a bleeding edge feature of Docusaurus and official documentation has not been released yet. However, there is unofficial documentation here, and we also have this PR and this explanatory comment to reference.

We are also learning from the source code for Jest website migration on docusaurus-2 branch, which is using this same undocumented setup for their localized docs. See their test site here: https://jest-v2.netlify.app/

Getting started

yarn install

yarn start  # defaults to serving English locale
  • NOTE Only one locale can be served in development at a time, so start yarn with the locale with it's language code if you want to test
yarn start --locale fr

P.S., the language switcher doesn't really work in development. No worries, things work better once the site is built and served. Try this and the locale switcher suddenly works:

yarn build

yarn serve

Localized content

Source content markdown files are found in docs/, which map to locales in i18n/%lang_code%/<plugin>/current/.

├── docs
│   └── tutorial
├── i18n
│   └── fr
│       └── docusaurus-plugin-content-docs
│           └── current
│               └── tutorial

Target language codes follow ISO 639-1 codes

Localized content without a "counterpart" for the source content fallbacks to the source locale (English).

Do not directly edit translations in this repo!

All translation is done via our Crowdin repo to make sure our translations do not go stale.

Fully approved translations made from the above repo are auto-PR'ed into this Github repo (every 10 minutes).

Here's the lifecycle image

Keep in mind in source markdown

Static assets

If a static asset is referenced in the source markdown with a relative path (ex: []!(../img/logo.svg)), the path will break in the target locale document which is in a differently nested directory.

Use absolute paths for local static assets that do not change across locales.

If it is an image that you feel absolutely inclined to localize, you can use relative paths and include files with the exact same name (with different image content) at the same relative path in all target dirs. ^ This is cumbersome - let's try to be as lazy as possible and not localize image assets unless totally necessary.

Internal linking

For links to other docs inside the tutorials directory, USE RELATIVE LINKS!

In [previous section](./our-first-page) we....

This ensures accurate linking no matter what locale a user is viewing.

# acessing ./our-first-page from within tutorial/* works in any locale

/docs/tutorial/our-first-page/
/fr/docs/tutorial/our-first-page/

Crowdin

Crowdin is our localization (l10n) manager. We use a Github integration to sync our Crowdin repo with this repo.

Contact

Questions or ideas? Hit up @clairefro or drop a post in the Redwood forums under "Docs & Content Translations"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.