-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Languages" navigation and article (#6382)
* Add new article "Translations" * Add "languages" button in TopNav * Add link to English (main) site * Split deployedTranslations into multiple lines * Fix build error regarding types * Address some review comments - deployedTranslations => finishedTranslations - showTranslated => progress - English fixes * Update src/content/community/translations.md Co-authored-by: Ricky <[email protected]> * Update src/content/community/translations.md --------- Co-authored-by: Ricky <[email protected]>
- Loading branch information
1 parent
0dbd67a
commit 9e1f5cd
Showing
10 changed files
with
166 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
*/ | ||
|
||
import {createContext} from 'react'; | ||
|
||
export type LanguageItem = { | ||
code: string; | ||
name: string; | ||
enName: string; | ||
}; | ||
export type Languages = Array<LanguageItem>; | ||
|
||
export const LanguagesContext = createContext<Languages | null>(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: Translations | ||
--- | ||
|
||
<Intro> | ||
|
||
React docs are translated by the global community into many languages all over the world. | ||
|
||
</Intro> | ||
|
||
## Source site {/*main-site*/} | ||
|
||
All translations are provided from the canonical source docs: | ||
|
||
- [English](https://react.dev/) — [Contribute](https://github.com/reactjs/react.dev/) | ||
|
||
## Full translations {/*full-translations*/} | ||
|
||
{/* If you are a language maintainer and want to add your language here, finish the "Core" translations and edit `deployedTranslations` under `src/utils`. */} | ||
|
||
<LanguageList progress="complete" /> | ||
|
||
## In-progress translations {/*in-progress-translations*/} | ||
|
||
For the progress of each translation, see: [Is React Translated Yet?](https://translations.react.dev/) | ||
|
||
<LanguageList progress="in-progress" /> | ||
|
||
## How to contribute {/*how-to-contribute*/} | ||
|
||
You can contribute to the translation efforts! | ||
|
||
The community conducts the translation work for the React docs on each language-specific fork of react.dev. Typical translation work involves directly translating a Markdown file and creating a pull request. Click the "contribute" link above to the GitHub repository for your language, and follow the instructions there to help with the translation effort. | ||
|
||
If you want to start a new translation for your language, visit: [translations.react.dev](https://github.com/reactjs/translations.react.dev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// This is a list of languages with enough translated content. | ||
// Add more languages here when they have enough content. | ||
// Please DO NOT edit this list without a discussion in the reactjs/react.dev repo. | ||
// It must be the same between all translations. | ||
// This will also affect the 'Translations' article. | ||
|
||
// prettier-ignore | ||
export const finishedTranslations = [ | ||
'en', | ||
'zh-hans', | ||
'es', | ||
'fr', | ||
'ja', | ||
'tr' | ||
]; |