Skip to content

Simplify the translation infra #285

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

Merged
merged 2 commits into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/sync-batch-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Sync CI (batch 1)

on:
schedule:
# Run this job every Monday at 12am
- cron: "0 0 * * 1"

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}

defaults:
run:
working-directory: ./scripts

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: ACTIONS_BATCH_PATTERN=6:1 yarn sync-translations
34 changes: 34 additions & 0 deletions .github/workflows/sync-batch-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Sync CI (batch 2)

on:
schedule:
# Run this job every Monday at 1am
- cron: "0 1 * * 1"

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}

defaults:
run:
working-directory: ./scripts

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: ACTIONS_BATCH_PATTERN=6:2 yarn sync-translations
34 changes: 34 additions & 0 deletions .github/workflows/sync-batch-3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Sync CI (batch 3)

on:
schedule:
# Run this job every Monday at 2am
- cron: "0 2 * * 1"

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}

defaults:
run:
working-directory: ./scripts

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: ACTIONS_BATCH_PATTERN=6:3 yarn sync-translations
34 changes: 34 additions & 0 deletions .github/workflows/sync-batch-4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Sync CI (batch 4)

on:
schedule:
# Run this job every Monday at 3am
- cron: "0 3 * * 1"

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}

defaults:
run:
working-directory: ./scripts

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: ACTIONS_BATCH_PATTERN=6:4 yarn sync-translations
34 changes: 34 additions & 0 deletions .github/workflows/sync-batch-5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Sync CI (batch 5)

on:
schedule:
# Run this job every Monday at 4am
- cron: "0 4 * * 1"

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}

defaults:
run:
working-directory: ./scripts

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: ACTIONS_BATCH_PATTERN=6:5 yarn sync-translations
34 changes: 34 additions & 0 deletions .github/workflows/sync-batch-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Sync CI (batch 6)

on:
schedule:
# Run this job every Monday at 5am
- cron: "0 5 * * 1"

env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}

defaults:
run:
working-directory: ./scripts

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: ACTIONS_BATCH_PATTERN=6:6 yarn sync-translations
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ npm-debug.log
yarn-error.log
!.gitkeep

.temp
.env*
!.env.sample
16 changes: 10 additions & 6 deletions PROGRESS.template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## Maintainer List

{MAINTAINERS}

## For New Translators

To translate a page:
Expand All @@ -19,13 +15,13 @@ Please be prompt with your translations! If you find that you can't commit anymo
When someone volunteers, edit this issue with the username of the volunteer, and with the PR. Ex:

```
- [ ] Quick Start (@tesseralis) #12345
- [ ] Some Page (@exampleusername) #12345
```

When PRs are merged, make sure to mark that page as completed like this:

```
- [x] Quick Start (@tesseralis) #12345
- [x] Some Page (@exampleusername) #12345
```

This ensures your translation's progress is tracked correctly at https://translations.react.dev/.
Expand Down Expand Up @@ -179,3 +175,11 @@ These aren't the main translation targets, but if you'd like to do them, feel fr
- [ ] Community
- [ ] Blog
- [ ] Warnings

## Maintainer List

This translation is maintained by:

{MAINTAINERS}

If you want to become a maintainer, ask them to add you. If the original maintainers are no longer responsive, raise an issue in the [main translations repository](https://github.com/reactjs/translations.react.dev).
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,30 @@ Check [translations.react.dev](https://translations.react.dev/) to see if your l

## Starting a new translation

If you would like to be the maintainer of a new translation, submit a PR adding a new file `{lang-code}.json`
to the `langs` folder with the following information:
If you would like to be the maintainer of a new translation, submit a PR adding it to the list in `langs/langs.json` with the following information:

* Language name (in English please)
* [Language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
* List of maintainers
* Language name (in your language)
* Language name (in English)

For example:

```json
{
"name": "English",
"code": "en",
"maintainers": ["gaearon", "tesseralis"]
}
{ "code": "fr", "name": "Français", "enName": "French" },
```

In the PR comment, please describe your experiences with translation (e.g. links to previous work). We prefer more than one maintainer on each repo, so if you're by yourself, we'll leave the PR open for others to join in. If you are a group, please have at least one person other than the PR opener comment, to make sure all people listed actually want to be part of the translation!
In the PR comment, please describe your experiences with translation (e.g. links to previous work) and mention all the initial translation maintainers. We prefer more than one maintainer on each repo, so if you're by yourself, we'll leave the PR open for others to join in. If you are a group, please have at least one person other than the PR opener comment, to make sure all people listed actually want to be part of the translation!

Also, please read the [Maintainer Responsibilities](/maintainer-guide.md#maintainer-responsibilities) and make sure that you are comfortable with the responsibilities listed.

Once the PR is accepted, the bot will:
Once the PR is accepted, a member of the React team will [run a script](/scripts/README.md#creating-a-translation) which will:

* Create a new repository for you at `reactjs/{lang-code}.react.dev`
* Add/invite all maintainers listed to a "react.dev {language} Translation" team in the reactjs organization
* Add/invite all maintainers you provided in the PR comment as administrators of the new repo
* Create an issue from [PROGRESS.template.md](/PROGRESS.template.md) in the new repository to track your translation progress

File an issue on this repository to apply for a real `{lang-code}.react.dev` subdomain once you have a few sections translated and can show sustained progress. Until then, the translation will be hosted at a preview domain.

If you are not a member of the reactjs organization, you should receive an email invite to join. Please accept this invite so you can get admin access to your repository!

You may want to [pin](https://help.github.com/articles/pinning-an-issue-to-your-repository/) the generated issue to make it easier to find.
Expand All @@ -45,10 +42,12 @@ Happy translating!

## Adding a maintainer

If you are currently a maintainer of a translation and want to add another member, send a pull request to this repo updating `langs/{lang-code}.json`, where `{lang-code}` is the language code of the repo you want to be a maintainer of.
If you are currently a maintainer of a translation and want to add another member, do it directly in the Settings panel of your repo.

If you are interested in becoming a maintainer for a translation, please ask one of the current maintainers if they would like to add you. While different maintainers can have different requirements, usually they look for people who have already contributed to the translation already, either by translating or reviewing.

If the translation's existing maintainers become unresponsible for more than a month, please raise an issue on this repository. If you don't receive a response in a week, please escalate the issue to the main React repository.

## Before publishing

1. Review your translations and make sure that the pages listed in "Main Content" are fully translated. Run the site yourself locally to make sure there are no bugs or missing translations.
Expand Down
5 changes: 0 additions & 5 deletions langs/ar.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/az.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/de.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/es.json

This file was deleted.

7 changes: 0 additions & 7 deletions langs/fa.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/fr.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/he.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/hi.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/hu.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/id.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/it.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/ja.json

This file was deleted.

5 changes: 0 additions & 5 deletions langs/ko.json

This file was deleted.

Loading