Skip to content

Commit

Permalink
docs(cn): fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
awxiaoxian2020 committed Feb 18, 2023
2 parents fe7fb27 + cfaaa2d commit 492c1b5
Show file tree
Hide file tree
Showing 734 changed files with 77,088 additions and 44,080 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
node-version: "14.x"

- name: Install dependencies
uses: bahmutov/npm-install@v1.6.0
uses: bahmutov/npm-install@v1.7.10
with:
working-directory: 'beta'

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
with:
workflow: bundle_analysis_upload.yml
workflow: analyze.yml
branch: ${{ github.event.pull_request.base.ref }}
name: bundle_analysis.json
path: beta/.next/analyze/base/bundle
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/beta_site_lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Beta Site Lint
name: Beta Site Lint / Heading ID check

on:
push:
branches:
- main # change this if your default branch is named differently
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -18,7 +21,7 @@ jobs:
node-version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1.6.0
uses: bahmutov/npm-install@v1.7.10
with:
working-directory: 'beta'

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build
name: Lint / Flow check

on:
push:
branches:
- main # change this if your default branch is named differently
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -18,7 +21,7 @@ jobs:
node-version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1.6.0
uses: bahmutov/npm-install@v1.7.10

- name: Lint codebase
run: yarn ci-check
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16.1
12.22.0
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

1. 挑选你想要翻译或校对的文章 [New Chinese Website: TODOs](https://github.com/reactjs/zh-hans.reactjs.org/issues/4)
2. 请 fork 这个仓库
3. 基于 fork 后的仓库中 master 分支拉取一个新的分支(名字自取)
3. 基于 fork 后的仓库中 main 分支拉取一个新的分支(名字自取)
4. 翻译(校对)你所选择的文章,提交到新的分支
5. 此时提交 Pull Request 到该仓库
6. 会有专人 Review 该 Pull Request,当两人以上通过该 Pull Request 时,你的翻译将被合并到仓库中
Expand All @@ -34,13 +34,13 @@
2. 同步 git fetch 上游代码

```
$ git checkout master && git fetch upstream
$ git checkout main && git fetch upstream
```

3. 将上游代码合并至你 fork 后的仓库(master 分支)中,保证你的 master 分支永远是最新版本
3. 将上游代码合并至你 fork 后的仓库(main 分支)中,保证你的 main 分支永远是最新版本

```
$ git merge upstream/master
$ git merge upstream/main
```

4. 重复翻译流程
Expand All @@ -63,7 +63,7 @@

1. Choose the article you want to translate or proofread [New Chinese Website: TODOs](https://github.com/reactjs/zh-hans.reactjs.org/issues/4)
2. Please fork this repo
3. In the repo after fork, create a new branch (custom branch name) based on the master branch.
3. In the repo after fork, create a new branch (custom branch name) based on the main branch.
4. Translation or proofread article, and commit your branch
5. Commit your PR to this repo
6. Please wait for Review.
Expand All @@ -83,10 +83,10 @@
```
$ git fetch upstream
```
3. Merge upstream/master to your repo/master
3. Merge upstream/main to your repo/main

```
$ git checkout master && git merge upstream/master
$ git checkout main && git merge upstream/main
```
4. Re-execute the translation process

Expand All @@ -96,7 +96,7 @@

1. Git
1. Node: any 12.x version starting with v12.0.0 or greater
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1. Yarn v1: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1. A fork of the repo (for any contributions)
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine

Expand Down Expand Up @@ -141,7 +141,7 @@ The documentation is divided into several sections with a different tone and pur
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. If possible, include screenshots of visual changes. A [Netlify](https://www.netlify.com/) build will also be automatically created once you make your PR so other people can see your change.
1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub.

## Translation

Expand All @@ -155,4 +155,4 @@ If your language does not have a translation and you would like to create one, p
- `yarn reset` to clear the local cache

## License
Content submitted to [reactjs.org](https://reactjs.org/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/open-source-explorer/reactjs.org/blob/master/LICENSE-DOCS.md) file.
Content submitted to [reactjs.org](https://reactjs.org/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](LICENSE-DOCS.md) file.
3 changes: 1 addition & 2 deletions beta/.env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
NEXT_PUBLIC_HJ_SITE_ID = 2411683
NEXT_PUBLIC_HJ_SITE_V = 6
SANDPACK_BARE_COMPONENTS=true
4 changes: 2 additions & 2 deletions beta/.env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NEXT_PUBLIC_HJ_SITE_ID = 2411651
NEXT_PUBLIC_HJ_SITE_V = 6
NEXT_PUBLIC_GA_TRACKING_ID = 'UA-41298772-4'
SANDPACK_BARE_COMPONENTS=true
10 changes: 8 additions & 2 deletions beta/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"root": true,
"extends": "next",
"extends": "next/core-web-vitals",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn"
},
"env": {
"node": true,
"commonjs": true,
"browser": true,
"es6": true
}
}
}
6 changes: 6 additions & 0 deletions beta/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# misc
.DS_Store
*.pem
tsconfig.tsbuildinfo

# debug
npm-debug.log*
Expand All @@ -32,3 +33,8 @@ yarn-error.log*

# vercel
.vercel

# external fonts
public/fonts/Optimistic_Display_W_Lt.woff2
public/fonts/Optimistic_Display_W_Md.woff2
public/fonts/Optimistic_Display_W_Bd.woff2
5 changes: 1 addition & 4 deletions beta/.husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

cd beta
yarn generate-ids
git add -u src/pages/**/*.md
yarn prettier
yarn lint:fix
yarn lint-staged
3 changes: 1 addition & 2 deletions beta/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
src/pages/docs/**/*.md
src/pages/blog/**/*.md
src/content/**/*.md
16 changes: 15 additions & 1 deletion beta/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,19 @@
"singleQuote": true,
"bracketSameLine": true,
"trailingComma": "es5",
"printWidth": 80
"printWidth": 80,
"overrides": [
{
"files": "*.css",
"options": {
"parser": "css"
}
},
{
"files": "*.md",
"options": {
"parser": "mdx"
}
}
]
}
2 changes: 1 addition & 1 deletion beta/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The documentation is divided into sections to cater to different learning styles

**[Learn React](https://beta.reactjs.org/learn)** is designed to introduce fundamental concepts in a step-by-step way. Each individual article in Learn React builds on the knowledge from the previous ones, so make sure not to add any "cyclical dependencies" between them. It is important that the reader can start with the first article and work their way to the last Learn React article without ever having to "look ahead" for a definition. This explains some ordering choices (e.g. that state is explained before events, or that "thinking in React" doesn't use refs). Learn React also serves as a reference manual for React concepts, so it is important to be very strict about their definitions and relationships between them.

**[API Reference](https://reactjs.org/reference)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Learn React should be mentioned in the reference documentation for the corresponding APIs.
**[API Reference](https://reactjs.org/apis/react)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Learn React should be mentioned in the reference documentation for the corresponding APIs.

**Try to follow your own instructions.**

Expand Down
4 changes: 2 additions & 2 deletions beta/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# reactjs.org

This repo contains the source code and documentation powering [reactjs.org](https://reactjs.org/).
This repo contains the source code and documentation powering [beta.reactjs.org](https://beta.reactjs.org/).


## Getting started
Expand Down Expand Up @@ -56,7 +56,7 @@ The documentation is divided into several sections with a different tone and pur
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. If possible, include screenshots of visual changes. A [Netlify](https://www.netlify.com/) build will also be automatically created once you make your PR so other people can see your change.
1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub.

## Translation

Expand Down
4,950 changes: 0 additions & 4,950 deletions beta/illustrations/import-export.ai

This file was deleted.

Loading

0 comments on commit 492c1b5

Please sign in to comment.