reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
11.08k stars 7.55k forks source link

[Beta] Translating New React Docs #4135

Closed gaearon closed 1 year ago

gaearon commented 2 years ago

It's time to translate new React docs at https://react.dev!

Who is this issue for?

This issue is for existing translation repo maintainers.

What is ok to translate now?

All pages in src/content are good to translate.

Something unclear?

Please comment here with concerns or suggestions. Originally we wanted to suggest translating when more of the content is written. However, some translators have expressed interest in starting earlier so that's why we made this issue.

arshadkazmi42 commented 2 years ago

Hi @gaearon

Does that mean, we should stop the translation of the current website, which in progress? And start focusing on this?

gaearon commented 2 years ago

I think that would make the most sense. (Sorry if you spent a bunch of effort on this.)

arshadkazmi42 commented 2 years ago

I think that would make the most sense. (Sorry if you spent a bunch of effort on this.)

Thank you for confirmation. Will start working towards that.

jakubdrozdek commented 2 years ago

@gaearon Hey, I just started working on the Polish docs, but unfortunately my first PR's CI checks fail on Analyze bundle job. https://github.com/reactjs/pl.reactjs.org/runs/4360534093?check_suite_focus=true Do you know what's the problem? Is it required to pass?

And second question: where can we preview our translated website and what's the URL for the live Polish beta? The link in PR for Vercel app links to the old React docs: https://plreactjsorg-7luo3ndx9-fbopensource.vercel.app/

smikitky commented 2 years ago

@jakubdrozdek That happened on our fork (Japanese), too. That dawidd6/action-download-artifact@v2 GitHub action tries to download "external" files (artifact) that had been generated by a workflow executed on the main branch. You got that error because no relevant workflow has been previously merged into the main. If I understand correctly, you can ignore that error and just merge the PR for now. Everything should be fine from the next PR.

gaearon commented 2 years ago

Do you know what's the problem? Is it required to pass?

Like @smikitky said, try without it passing and see if that resolves next time. I wouldn't worry about it for now.

And second question: where can we preview our translated website and what's the URL for the live Polish beta?

If you write a few pages I'll set up a project. Unfortunately it's manual so write here and we'll do it.

smikitky commented 2 years ago

The current pre-commit hook has the following two lines:

https://github.com/reactjs/reactjs.org/blob/4022f9774b8dd93d863fd6bca6447b1f03ae3979/beta/.husky/pre-commit#L5-L6

This may make sense on the main repo but makes no sense on translation forks. Every time I commit, I see many useless notices saying the explicit IDs are different from auto-generated ones.

https://github.com/reactjs/reactjs.org/blob/4022f9774b8dd93d863fd6bca6447b1f03ae3979/beta/scripts/generateHeadingIDs.js#L55-L57

What's worse, because of the unconditional git add -u, I accidentally committed and pushed a draft translation without knowing it. I think this process could be smarter and less confusing to new translators.

gaearon commented 2 years ago

@smikitky yeah this sounds confusing! do you have a fix in mind? how did this work before?

hg-pyun commented 2 years ago

@gaearon Is there a schedule for the official release of new documents? It would be nice to share roughly.

smikitky commented 2 years ago

@gaearon In the future, it would be nice to run pre-commit generate-ids only on the main repo. When it finds a heading without an explicit ID, it should reject the commit instead of unconditionally fixing it and committing it. Alternatively, it could auto-fix only the files to be committed, not all the files in the src directory.

But in the meantime, I think this pre-commit hook could be simply removed.

harish-sethuraman commented 2 years ago

When it finds a heading without an explicit ID, it should reject the commit instead of unconditionally fixing it and committing it.

We might have to write a custom hook for that will look into that.

But in the meantime, I think this pre-commit hook could be simply removed

Will remove it

jakubdrozdek commented 2 years ago

@gaearon Hey, I just finished translating the whole first chapter, and going on. Do you think it's enough to deploy the Polish beta docs now? 😉 https://github.com/reactjs/pl.reactjs.org/issues/287

smikitky commented 2 years ago

@gaearon Please set up the Japanese beta docs, too. Translations for several pages and MDX tags were merged into main.

gaearon commented 2 years ago

I actually just went on a vacation but I asked @rickhanlonii to find someone from the team to help with this. Ping me in twitter DM if there’s no progress in a week and I’ll double check.

yepes commented 2 years ago

I'd like to help with the Spanish translation. How can I get enrolled?

rickhanlonii commented 2 years ago

Just a heads up: we're going to be a bit delayed during React Conf this week. Thanks for your patience!

rickhanlonii commented 2 years ago

Sorry for the delay, Polish and Japanese docs are deployed here:

We're working to get the domains registered as well, will update when that's available.

jakubdrozdek commented 2 years ago

Sorry for the delay, Polish and Japanese docs are deployed here:

* https://pl-beta-reactjs-org.vercel.app/

* https://ja-beta-reactjs-org.vercel.app/

We're working to get the domains registered as well, will update when that's available.

Awesome! Thank you, that helps a lot :)

rickhanlonii commented 2 years ago

Heads up, the domains are now available:

smikitky commented 2 years ago

@gaearon Analyze bundle job still fails for every new PR made in translation forks. Looks like the cause is this (Line 57):

https://github.com/reactjs/reactjs.org/blob/c005fa4d7a2a0a602d6d538526699d7073ae3109/.github/workflows/analyze.yml#L53-L60

Line 57 refers to bundle_analysis_upload.yml, but this workflow file no longer exists (removed by 25ac9d0). Perhaps the CI is currently using some stale artifact that remains only in the main repository as the "base"?

EDIT: @jakubdrozdek "Analyze Bundle" keeps failing, so I investigated and found this problem. I believe there is a CI setup bug that doesn't surface on the main repository because an old artifact happens to exist and is used as a base.

EDIT: I confirmed recent actions for PRs on this repository were downloading the same artifact (RunID: 1429732265, Artifact: 111304536) even though the main branch has been changing frequently.

smikitky commented 2 years ago

I made a PR to fix the problem above: #4192

arshadkazmi42 commented 2 years ago

hi @gaearon

For Hindi translation we have completed two pages, is it enough to get the hindi docs domain also setup?

https://github.com/reactjs/hi.reactjs.org/issues/168

neighborhood999 commented 2 years ago

Hi @gaearon & @rickhanlonii , the zh-hant already finished three pages translation (check here), please help us to set up the beta page, Thanks!

Have a nice day!

habarahonaa commented 2 years ago

I'd like to help with the Spanish translation. How can I get enrolled?

I second this! Would love to be part of it though I'm not currently a translation repo maintainer. Have a nice day everyone and thanks :)

gaearon commented 2 years ago

I've added more pages to the list of things that are good to start translating. See updated list above.

rickhanlonii commented 2 years ago

Hey all, sorry for the delay! These are now up:

arshadkazmi42 commented 2 years ago

Hey all, sorry for the delay! These are now up:

Thank you for setting this up @rickhanlonii :smile:

arshadkazmi42 commented 2 years ago

@gaearon @rickhanlonii

Many test runs are failing for hindi translation repository on all PRs. Is there anything needs to be done there?

Here is a sample PR https://github.com/reactjs/hi.reactjs.org/pull/186#pullrequestreview-886811263

gaearon commented 2 years ago

@arshadkazmi42 Please don't merge code changes like https://github.com/reactjs/hi.reactjs.org/pull/186. Only do translation changes on your repo. All code changes should be done on the main repo. Otherwise you'll get out of sync.

arshadkazmi42 commented 2 years ago

@gaearon Got it. will take care of that. Is this why the builds are failing? I have been merging these Bump PRs.

gaearon commented 2 years ago

Depends on which failure specifically. You can click on each to see the cause.

Here is one, for example:

Screenshot 2022-02-18 at 18 16 06

I would recommend to copy all content files outside the project, replace all the code with the original code in this repo, and then copy all the content files back. This way you'll get back to the state this repo is in.

arshadkazmi42 commented 2 years ago

When I am trying to open those build, it does not shows me these details, seems there is some access level and I don't have access. Below are the tests which are failing and circle ci is stuck Screenshot from 2022-02-18 23-48-17 Screenshot from 2022-02-18 23-48-25

arshadkazmi42 commented 2 years ago

Also, when I am trying to access the details, for CircleCI and Vercel failed jobs, I get below pages, which does not shows any reason of failing Screenshot from 2022-02-18 23-50-37 Screenshot from 2022-02-18 23-50-44

arshadkazmi42 commented 2 years ago

Depends on which failure specifically. You can click on each to see the cause.

Here is one, for example:

Screenshot 2022-02-18 at 18 16 06

I would recommend to copy all content files outside the project, replace all the code with the original code in this repo, and then copy all the content files back. This way you'll get back to the state this repo is in.

@gaearon I just did what you have suggested and created a PR. Still seeing some builds fail. Can you check the logs, what could be failing? https://github.com/reactjs/hi.reactjs.org/pull/188

Took clone of main branch of https://github.com/reactjs/reactjs.org

arshadkazmi42 commented 2 years ago

Finally was able to fix the build issues with manual merge https://github.com/reactjs/hi.reactjs.org/pull/188. Thank you for the help

carburo commented 2 years ago

Hi @rickhanlonii, @gaearon! The Spanish translation has 3 finished articles. Could you set up deployments for the beta site?

rickhanlonii commented 2 years ago

@carburo all set: http://beta.es.reactjs.org/

mirorauhala commented 2 years ago

Hey @rickhanlonii, @gaearon! The Finnish translation has 5 pages currently translated. However, the pull request for it has not been approved yet. https://github.com/reactjs/reactjs.org-translation/pull/191

Perhaps you could look into it? Thanks!

Avi98 commented 2 years ago

Hey, @gaearon @rickhanlonii I don't know whether it should be opening up a new issue or not for this. But can I raise a PR for enabling BF cache? I have tested it with chrome dev most of the things are already there. Screenshot 2022-05-26 at 6 39 56 PM

gaearon commented 2 years ago

Sure, a PR is welcome.

gaearon commented 2 years ago

@mirorauhala Approved!

theringsofsaturn commented 2 years ago

@rickhanlonii I have finished 7 pages for the Albanian Beta website. I attached the PDF with the screenshots. It would be great if you please help us set up the deployment for this. @gaearon Even thought you added me to the maintainers list, I need someone to review and accept my pull requests, because I cannot. Could you please, take a look and accept it, when you have some time? It would be great if I had the rights to review and accept myself. Thank you in advance!

Here are my commits: https://github.com/reactjs/sq.reactjs.org/pull/51

Screenshots of the Beta website: React Docs SQ.pdf

gaearon commented 2 years ago

@theringsofsaturn Are you in the maintainers list? I think maintainers should be able to merge things. If you're not, can you send a PR to add yourself to the maintainers?

theringsofsaturn commented 2 years ago

@theringsofsaturn Are you in the maintainers list? I think maintainers should be able to merge things. If you're not, can you send a PR to add yourself to the maintainers?

@gaearon Yes, I sent the PR and you already merged that, here: https://github.com/reactjs/reactjs.org-translation/pull/195#issue-1254096301 I am in the maintainers list now. But still it shows me this:

image
EsmaeilSaleh commented 2 years ago

Hello, I'm willing to translate to Persian/Farsi. But unfortunately the current Persiona repo doesn't even have the beta folder. In recent weeks I've translated several pages (old docs) but they have never been reviewed.

Now I want to proceed with Beta version. Please add me to maintainers list.

galnir commented 2 years ago

Hey @gaearon, we have 3 translated pages in the Hebrew docs - https://github.com/reactjs/he.reactjs.org Can we get a deployment?

TajAlasfiyaa commented 2 years ago

Hello Dan I want to translate to arabic but I have question is there RTL website version ? thank تاج الاصفياء اسحاق

hg-pyun commented 2 years ago

@gaearon Could you also set up the distribution of Korean beta documents?

https://github.com/reactjs/ko.reactjs.org

faisalhani commented 1 year ago

Hello @gaearon , The https://github.com/reactjs/ar.reactjs.org does not have the beta folder yet, I can help to contribute and help translate it into Arabic.

jhonmike commented 1 year ago

Hi react maintainers We are returning with the translations on the beta pages of the pt-br repo, can you help me configure the deploy process on the beta pt-br site? what should I do?