react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

reactjs.org Localization Forks

Open tesseralis opened this issue 7 years ago • 116 comments

🌐🚨See here if you'd like to be a language fork maintainer! 🚨🌐

Hi everyone! My name is Nat and I'm picking up on the work Brian (@bvaughn) and Eric (@ericnakagawa) have been doing to internationalize the React documentation website (https://github.com/reactjs/reactjs.org/pull/873 and https://github.com/reactjs/reactjs.org/issues/82). To this end, Dan (@gaearon) and I were discussing alternate proposals to our current approach using Crowdin when we came across how the Vue team localizes their documentation (https://vuejs.org), and we think it may be a simpler and better approach for translating the React docs.

The Approach

For vuejs.org, each translation is managed in a separate fork of the main repo by a dedicated team (e.g. https://jp.vue.org) that is synced to keep in line with the main repo. In particular, the Japanese translation uses a bot (https://github.com/vuejs-jp-bot) that performs the following functions:

  • Watch the RSS feed of the original repo for changes and look at the diff
  • If there is no conflict:
    • Submit a PR that automatically cherry pick those changes onto the fork
  • If there is a conflict (e.g. because of text that needs to be translated)
    • Create an issue

In effect, the bot will automatically update any pure code changes to the site, and create an issue anytime the text changes, indicating new translation needs to occur.

Dan and I like this approach and think it would be a good fit for React's translation efforts. It would unload a lot of the work from the React core team and put it into the hands of dedicated translators. In addition:

  • It inspires ownership over the individual language branches and lead to higher quality translations than Crowdin has offered so far.
  • It would be easier to prevent stale translations since issues would be generated to keep track of what copy needs to be changed.
  • Translations would be versioned in lockstep with the main React docs.

In addition, @potato4d, one of the maintainers of the Japanese Vue fork, mentioned that compared to SaaS solutions like Crowdin, people were more motivated to provide translations when they could contribute directly to the Github org, and that git's conflict resolution strategies were better than third party ones.

Below I will list the steps needed to make this happen, concerns we have, alternatives we have considered, and what we need help with from the international React community.

Steps

  • [x] Pick a "partner team" (or two) of translators for a proof-of-concept.
    • Simplified Chinese: https://github.com/reactjs/zh-hans.reactjs.org/issues/4
    • Spanish: https://github.com/reactjs/es.reactjs.org/issues/4
    • Japanese: https://github.com/reactjs/ja.reactjs.org/issues/4
  • [x] Prepare reactjs.org for forking/translation
    • [x] Make sure that the site works under a different subdomain and that there are no absolute URLs (no links to reactjs.org from jp.reactjs.org).
    • [x] Add a translations page/dropdown to the site! 😊 - PR #1691
    • [x] Ensure that anchor names for headers, which are currently auto-generated, remain consistent across translations (thanks @smikitky)
      • Issue: https://github.com/reactjs/reactjs.org/issues/1608
  • [x] Create the bot and/or git hooks to create issues/cherry-picks when the original English React documentation changes.
  • [x] Create a guide for starting a new translation project and integrating the bot.
  • [x] Make a site to keep track of translation progress for various languages (https://github.com/reactjs/reactjs.org/issues/1619)
    • https://www.isreacttranslatedyet.com

Open Questions and Concerns

Existing work on CrowdIn

Eric brought up that a lot of work has already been put in the CrowdIn translations, and there is a fear of letting that community work go to waste. However that work won't necessarily be thrown away -- translators can use the Crowdin translation as a base when building the new fork (though we have to be careful that we don't keep any stale content).

Frequently changed files

Brian brought up that sometimes files are heavily edited in a short period of time (e.g. the Hooks proposal). This would mean that lots of issues get created under a short period of time, especially if they are auto-generated by a bot. In cases like this, The React team can coordinate with translation groups to make sure they're prepared. Additionally, while the bot can create issues, it is ultimately up to the fork maintainers to decide how to handle this. For example, they could decide to only translate the initial Hooks proposal and wait until the API is finalized before making changes to avoid having to make copious edits.

Maintenance

Maintaining a fork means that language maintainers must know the internals of the react website. However, that might actually be an advantage of this approach: if you're maintaining a translation for the React documentation, you better know how to use React!

Additionally, requiring translations be under a subdomain makes it harder to start up a new translations in a new language. To mitigate this, we plan on setting up a How-to guide to ease people setting up their own repositories and translations. We can also start a process of "graduating" translations: once the translation moves past a certain benchmark (e.g. Home page + tutorial + main concepts + API), move ownership to the main ReactJS Github org to mark it as an "official" translation effort and add it to the official list of translations.

One open question is how licensing and hosting would work. Dan is reaching out to folks to figure that out.

Alternatives

Crowdin

The initial plan was to integrate and serve translated pages with Crowdin, as demonstrated by Brian's PR: https://github.com/reactjs/reactjs.org/pull/873. We have some issues with Crowdin:

  • It's complicated, it requires a significant amount of code integration to get off the ground.
  • Updates to the site require a very awkward and possibly destructive syncing process
  • Translation quality varies. For example, in the Indonesian translation, "function" in a code block was translated as "funksi". While an Indonesian language version of JS would be amazing, I don't believe that is currently the case.

Translations in one repository

An alternative approach taken by Nuxt.js is to put all translations in the same repo and use a traditional i18n library to switch between them. But, as Dan pointed out, reactjs.org already has hundreds of pull requests and PRs, and any copy change would bloat up the number of issues, especially if they are automatically generated.

What we need help with

If you have some experience maintaining open source translations and would like to maintain an official React docs translation into your language, submit a PR to this repo to add your language!

tesseralis avatar Jan 30 '19 02:01 tesseralis

I'd like to help out with maintaining and translating documents in Japanese! 🤗

Naturalclar avatar Jan 31 '19 00:01 Naturalclar

  • Translation quality varies. For example, in the Indonesian translation, "function" in a code block was translated as "funksi". While an Indonesian language version of JS would be amazing, I don't believe that is currently the case.

Hi Nat, I am Andri and I am from Indonesia. I agree with you on this; it's bothering me that some translator from my country still using this "Google translator" with no effort on their side!

  1. Copy pasting to a machine translator is not an effort
  2. Not reading your translation then submit the result is not an effort.

If you have some experience maintaining open source translations and would like to maintain an official React docs translation into your language, please leave a comment, and we can talk about further steps.

I don't have any experience in maintaining open source translations but I would like to learn. So if you already have Indonesian group as a translator and needs an editor, let me know and I'll be glad to help.

techandmedia avatar Jan 31 '19 00:01 techandmedia

Looks good to me!, I interested in Korean language translation and maintaining :D, I have been experience translating some react document. Like this.

hg-pyun avatar Jan 31 '19 00:01 hg-pyun

I can help you with the spanish translation, I'm a native Spanish speaker and have already helped translate other projects.

icarlossz avatar Jan 31 '19 02:01 icarlossz

Hi folks!

We've decided to go with the following three languages to start off with:

Japanese: https://github.com/reactjs/ja.reactjs.org Chinese: https://github.com/reactjs/cn.reactjs.org Spanish: https://github.com/reactjs/es.reactjs.org

If you would like to help with any of those translation efforts, check their wiki for further instructions!

If you want to help with any of the other languages, feel free to continue to contribute to the Crowdin to use as a base (although you might want to wait until tomorrow -- we just reuploaded the translations and need to sync them). Please DO NOT create additional forks -- we would like to work with a small subset of teams at first in order to iron out any issues with this process.

tesseralis avatar Jan 31 '19 03:01 tesseralis

@tesseralis Chinese:https://github.com/reactjs/cn.reactjs.org Not ch. The same error occurred in the wiki.

QC-L avatar Jan 31 '19 04:01 QC-L

@QC-L thanks XD

tesseralis avatar Jan 31 '19 04:01 tesseralis

@tesseralis When merging the PR with merge commits, the bot creates an extra issue because the commits on master branch include all commits on source branch. For this reason, I recommend change the setting to allow only squash merge on this repo if possible :)

re-fort avatar Jan 31 '19 05:01 re-fort

To be clear — if everything goes well we don’t plan to hold off other languages for long. The first pilot period will likely be something like a week and then we’ll add more.

gaearon avatar Jan 31 '19 07:01 gaearon

Hi @haimengzhang and anyone who wants to work on either simplified or traditional Chinese, we can open another discussion thread elsewhere to discuss how to work together and the possibility of creating another fork for traditional Chinese, such as https://github.com/reactjs/tw.reactjs.org. You can also find me on twitter at @chloewlin and message me there. :)

chloewlin avatar Jan 31 '19 07:01 chloewlin

@chloewlin I added you and others to the group! We're working on Simplified Chinese right now (sorry, I'll specify it in the documents) and we actually have an issue on how we're going to name simplified vs traditional chinese here: https://github.com/reactjs/cn.reactjs.org/issues/1

tesseralis avatar Jan 31 '19 07:01 tesseralis

@tesseralis
Please check this join us discussion.

QC-L avatar Jan 31 '19 08:01 QC-L

@QC-L already sent you an invite 🙂

tesseralis avatar Jan 31 '19 08:01 tesseralis

I have make some suggestions in this issue. Please check.

https://github.com/discountry/react/issues/334

@tesseralis

lcxfs1991 avatar Jan 31 '19 08:01 lcxfs1991

@tesseralis I would like to help with Simplified Chinese translations

robertying avatar Jan 31 '19 08:01 robertying

I'd like to help with Russian when you start the second round. Keep it up!

dkozickis avatar Jan 31 '19 09:01 dkozickis

Ok there are others interested in helping with Spanish.... I am one more willing to help with Spanish translation s too :)

jvelezpo avatar Jan 31 '19 10:01 jvelezpo

Would like to help with translations to Polish.

goto1 avatar Jan 31 '19 11:01 goto1

I'm happy to help with translations to Portuguese 🇵🇹

0xtelmo avatar Jan 31 '19 11:01 0xtelmo

@tesseralis I'd like to help with the Chinese Translation

shaodahong avatar Jan 31 '19 11:01 shaodahong