1 Star 0 Fork 0

过纯中 / learn.redwoodjs.com

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

THIS REPO IS NO LONGER MAINTAINED

All documentation for Redwood now lives in the /docs directory in the main repo: https://github.com/redwoodjs/redwood That directory now contains this Docusaurus site with all documentation from redwoodjs.com.

learn.redwoodjs.com

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

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"

空文件

简介

暂无描述 展开 收起
JavaScript 等 3 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/Eric-Guo/learn.redwoodjs.com.git
git@gitee.com:Eric-Guo/learn.redwoodjs.com.git
Eric-Guo
learn.redwoodjs.com
learn.redwoodjs.com
cn_site

搜索帮助