Skip to content

Commit

Permalink
Merge branch 'master' into docs-static-type-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
QC-L authored Mar 27, 2019
2 parents abdaec2 + e2117c8 commit 73df8d8
Show file tree
Hide file tree
Showing 110 changed files with 3,641 additions and 2,806 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ This repo contains the source code and documentation powering [reactjs.org](http
大家在翻译过程中会遇到不需要翻译的内容,可以添加到词汇表中。

项目起步,部分内容逐步完善中。后续会添加相关流程图片,便于理解。
该流程我继续细化,如有疑问。可扫码进入该群,一起讨论完善这个项目:

<div align="center">
<img src="https://user-images.githubusercontent.com/13861040/52535012-dfc97b80-2d83-11e9-910a-46ab217b7ff4.png" width="300" height="388" alt="图片名称" align=center />
</div>
该流程我继续细化,如有疑问。

## About Chinese translation:

Expand Down
3 changes: 3 additions & 0 deletions content/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ sophiebits:
steveluscher:
name: Steven Luscher
url: https://twitter.com/steveluscher
tesseralis:
name: Nat Alison
url: https://twitter.com/tesseralis
timer:
name: Joe Haddad
url: https://twitter.com/timer150
Expand Down
3 changes: 1 addition & 2 deletions content/blog/2015-03-30-community-roundup-26.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Colin also [blogged about his experience using React Native](http://blog.scottlo

Spencer Ahrens and I had the great pleasure to talk about React Native on [The Changelog](https://thechangelog.com/149/) podcast. It was really fun to chat for an hour, I hope that you'll enjoy listening to it. :)

<audio src="https://fdlyr.co/d/changelog/cdn.5by5.tv/audio/broadcasts/changelog/2015/changelog-149.mp3" controls="controls" style="width: 100%"></audio>

<audio src="https://cdn.changelog.com/uploads/podcast/149/the-changelog-149.mp3" controls="controls" style="width: 100%"></audio>

## Hacker News {#hacker-news}

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2015-08-11-relay-technical-preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ While React simplified the process of developing complex user-interfaces, it lef

Declarative data-fetching means that Relay applications specify *what* data they need, not *how* to fetch that data. Just as React uses a description of the desired UI to manage view updates, Relay uses a data description in the form of GraphQL queries. Given these descriptions, Relay coalesces queries into batches for efficiency, manages error-prone asynchronous logic, caches data for performance, and automatically updates views as data changes.

Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This colocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data.
Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This collocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data.

Relay is in use at Facebook in production apps, and we're using it more and more because *Relay lets developers focus on their products and move fast*. It's working for us and we'd like to share it with the community.

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2018-09-10-introducing-the-react-profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ It also shows that each time it rendered, it was the most "expensive" component

To view this chart, either double-click on a component _or_ select a component and click on the blue bar chart icon in the right detail pane.
You can return to the previous chart by clicking the "x" button in the right detail pane.
You can aso double click on a particular bar to view more information about that commit.
You can also double click on a particular bar to view more information about that commit.

![How to view all renders for a specific component](../images/blog/introducing-the-react-profiler/see-all-commits-for-a-fiber.gif)

Expand Down
76 changes: 76 additions & 0 deletions content/blog/2019-02-23-is-react-translated-yet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: "Is React Translated Yet? ¡Sí! Sim! はい!"
author: [tesseralis]
---

We’re excited to announce an ongoing effort to maintain official translations of the React documentation website into different languages. Thanks to the dedicated efforts of React community members from around the world, React is now being translated into *over 30* languages! You can find them on the new [Languages](/languages) page.

In addition, the following three languages have completed translating most of the React Docs! 🎉

* **Spanish: [es.reactjs.org](https://es.reactjs.org)**
* **Japanese: [ja.reactjs.org](https://ja.reactjs.org)**
* **Brazilian Portuguese: [pt-br.reactjs.org](https://pt-br.reactjs.org)**

Special congratulations to [Alejandro Ñáñez Ortiz](https://github.com/alejandronanez), [Rainer Martínez Fraga](https://github.com/carburo), [David Morales](https://github.com/dmorales), [Miguel Alejandro Bolivar Portilla](https://github.com/Darking360), and all the contributors to the Spanish translation for being the first to *completely* translate the core pages of the docs!

## Why Localization Matters {#why-localization-matters}

React already has many meetups and conferences around the world, but many programmers don't use English as their primary language. We’d love to support local communities who use React by making our documentation available in most popular languages.

In the past, React community members have created unofficial translations for [Chinese](https://github.com/discountry/react), [Arabic](https://wiki.hsoub.com/React), and [Korean](https://github.com/reactjs/ko.reactjs.org/issues/4); by making an official channel for these translated docs we're hoping to make them easier to find and help make sure that non-English-speaking users of React aren't left behind.

## Contributing {#contributing}

If you would like to help out on a current translation, check out the [Languages](/languages) page and click on the "Contribute" link for your language.

Can't find your language? If you'd like to maintain your langauge's translation fork, follow the instructions in the [translation repo](https://github.com/reactjs/reactjs.org-translation#starting-a-new-translation)!

## Backstory {#backstory}

Hi everyone! I'm [Nat](https://twitter.com/tesseralis)! You may know me as the [polyhedra lady](https://www.youtube.com/watch?v=Ew-UzGC8RqQ). For the past few weeks, I've been helping the React team coordinate their translation effort. Here's how I did it.

Our original approach for translations was to use a SaaS platform that allows users to submit translations. There was already a [pull request](https://github.com/reactjs/reactjs.org/pull/873) to integrate it and my original responsibility was to finish that integration. However, we had concerns about the feasibility of that integration and the current quality of translations on the platform. Our primary concern was ensuring that translations kept up to date with the main repo and didn't become "stale".

[Dan](https://twitter.com/dan_abramov) encouraged me to look for alternate solutions, and we stumbled across how [Vue](https://vuejs.org) maintained its translations -- through different forks of the main repo on GitHub. In particular, the [Japanese translation](https://jp.vuejs.org) used a bot to periodically check for changes in the English repo and submits pull requests whenever there is a change.

This approach appealed to us for several reasons:

* It was less code integration to get off the ground.
* It encouraged active maintainers for each repo to ensure quality.
* Contributors already understand GitHub as a platform and are motivated to contribute directly to the React organization.

We started of with an initial trial period of three languages: Spanish, Japanese, and Simplified Chinese. This allowed us to work out any kinks in our process and make sure future translations are set up for success. I wanted to give the translation teams freedom to choose whatever tools they felt comfortable with. The only requirement is a [checklist](https://github.com/reactjs/reactjs.org-translation/blob/master/PROGRESS.template.md) that outlines the order of importance for translating pages.

After the trial period, we were ready to accept more languages. I created [a script](https://github.com/reactjs/reactjs.org-translation/blob/master/scripts/create.js) to automate the creation of the new language repo, and a site, [Is React Translated Yet?](https://isreacttranslatedyet.com), to track progress on the different translations. We started *10* new translations on our first day alone!

Because of the automation, the rest of the maintenance went mostly smoothly. We eventually created a [Slack channel](https://rt-slack-invite.herokuapp.com) to make it easier for translators to share information, and I released a guide solidifying the [responsibilities of maintainers](https://github.com/reactjs/reactjs.org-translation/blob/master/maintainer-guide.md). Allowing translators to talk with each other was a great boon -- for example, the Arabic, Persian, and Hebrew translations were able to talk to each other in order to get [right-to-left text](https://en.wikipedia.org/wiki/Right-to-left) working!

## The Bot {#the-bot}

The most challenging part was getting the bot to sync changes from the English version of the site. Initially we were using the [che-tsumi](https://github.com/vuejs-jp/che-tsumi) bot created by the Japanese Vue translation team, but we soon decided to build our own bot to suit our needs. In particular, the che-tsumi bot works by [cherry picking](https://git-scm.com/docs/git-cherry-pick) new commits. This ended up causing a cavalade of new issues that were interconnected, especially when [Hooks were released](/blog/2019/02/06/react-v16.8.0.html).

In the end, we decided that instead of cherry picking each commit, it made more sense to merge all new commits and create a pull request around once a day. Conflicts are merged as-is and listed in the [pull request](https://github.com/reactjs/pt-BR.reactjs.org/pull/114), leaving a checklist for maintainers to fix.

Creating the [sync script](https://github.com/reactjs/reactjs.org-translation/blob/master/scripts/sync.js) was easy enough: it downloads the translated repo, adds the original as a remote, pulls from it, merges the conflicts, and creates a pull request.

The problem was finding a place for the bot to run. I'm a frontend developer for a reason -- Heroku and its ilk are alien to me and *endlessly* frustrating. In fact, until this past Tuesday, I was running the script by hand on my local machine!

The biggest challenge was space. Each fork of the repo is around 100MB -- which takes minutes to clone on my local machine. We have *32* forks, and the free tiers or most deployment platforms I checked limited you to 512MB of storage.

After lots of notepad calculations, I found a solution: delete each repo once we've finished the script and limit the concurrency of `sync` scripts that run at once to be within the storage requirements. Luckily, Heroku dynos have a much faster Internet connection and are able to clone even the React repo quickly.

There were other smaller issues that I ran into. I tried using the [Heroku Scheduler](https://elements.heroku.com/addons/scheduler) add-on so I didn't have to write any actual `watch` code, but it end up running too inconsistently, and I [had an existential meltdown on Twitter](https://twitter.com/tesseralis/status/1097387938088796160) when I couldn't figure out how to send commits from the Heroku dyno. But in the end, this frontend engineer was able to get the bot working!

There are, as always, improvements I want to make to the bot. Right now it doesn't check whether there is an outstanding pull request before pushing another one. It's still hard to tell the exact change that happened in the original source, and it's possible to miss out on a needed translation change. But I trust the maintainers we've chosen to work through these issues, and the bot is [open source](https://github.com/reactjs/reactjs.org-translation) if anyone wants to help me make these improvements!

## Thanks {#thanks}

Finally, I would like to extend my gratitude to the following people and groups:

* All the translation maintainers and contributors who are helping translate React to more than thirty languages.
* The [Vue.js Japan User Group](https://github.com/vuejs-jp) for initiating the idea of having bot-managed translations, and especially [Hanatani Takuma](https://github.com/potato4d) for helping us understand their approach and helping maintain the Japanese translation.
* [Soichiro Miki](https://github.com/smikitky) for many [contributions](https://github.com/reactjs/reactjs.org/pull/1636) and thoughtful comments on the overall translation process, as well as for maintaining the Japanese translation.
* [Eric Nakagawa](https://github.com/ericnakagawa) for managing our previous translation process.
* [Brian Vaughn](https://github.com/bvaughn) for setting up the [languages page](/languages) and managing all the subdomains.

And finally, thank you to [Dan Abramov](https://twitter.com/dan_abramov) for giving me this opportunity and being a great mentor along the way.
42 changes: 39 additions & 3 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

## Upcoming Conferences {#upcoming-conferences}

### React Iran 2019 {#react-iran-2019}
January 31, 2019 in Tehran, Iran
[Website](http://reactiran.com) - [Instagram](https://www.instagram.com/reactiran/)
### Reactathon 2019 {#reactathon-2019}
March 30-31, 2019 in San Francisco, USA

[Website](https://www.reactathon.com/) - [Twitter](https://twitter.com/reactathon)

### App.js Conf 2019 {#appjs-conf-2019}
April 4-5, 2019 in Kraków, Poland
Expand All @@ -26,16 +27,41 @@ April 12, 2019 in Amsterdam, The Netherlands

[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam)

### ReactJS Girls Conference
May 3, 2019 in London, UK

[Website](https://reactjsgirls.com/) - [Twitter](https://twitter.com/reactjsgirls)

### ReactEurope 2019 {#reacteurope-2019}
May 23-24, 2019 in Paris, France

[Website](https://www.react-europe.org) - [Twitter](https://twitter.com/ReactEurope) - [Facebook](https://www.facebook.com/ReactEurope) - [Videos](https://www.youtube.com/c/ReacteuropeOrgConf)

### React Conf Armenia 2019 {#react-conf-am-19}
May 25, 2019 in Yerevan, Armenia

[Website](https://reactconf.am/) - [Twitter](https://twitter.com/ReactConfAM) - [Facebook](https://www.facebook.com/reactconf.am/) - [YouTube](https://www.youtube.com/c/JavaScriptConferenceArmenia) - [CFP](http://bit.ly/speakReact)

### React Norway 2019 {#react-norway-2019}
June 12, 2019. Larvik, Norway

[Website](https://reactnorway.com) - [Twitter](https://twitter.com/ReactNorway)

### React Loop 2019 {#react-loop-2019}
June 21, 2019 Chicago, Illinois USA

[Website](https://reactloop.com) - [Twitter](https://twitter.com/ReactLoop)

### React Week '19 {#RWNY19}
July 15-21, 2019. New York City, USA

[Website](https://reactweek.nyc) - [Twitter](https://twitter.com/ReactWeek)

### React Rally 2019
August 22-23, 2019. Salt Lake City, USA.

[Website](https://www.reactrally.com/) - [Twitter](https://twitter.com/ReactRally) - [Instagram](https://www.instagram.com/reactrally/)

### ComponentsConf 2019 {#componentsconf-2019}
September 6, 2019 in Melbourne, Australia
[Website](https://www.componentsconf.com.au/) - [Twitter](https://twitter.com/componentsconf)
Expand All @@ -55,6 +81,11 @@ September 26-28, 2019 in Goa, India

[Website](https://www.reactindia.io/) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia)

### React Alicante 2019 {#react-alicante-2019}
September 26-28, 2019 in Alicante, Spain

[Website](http://reactalicante.es/) - [Twitter](https://twitter.com/reactalicante) - [Facebook](https://www.facebook.com/ReactAlicante)

## Past Conferences {#past-conferences}

### React.js Conf 2015 {#reactjs-conf-2015}
Expand Down Expand Up @@ -323,3 +354,8 @@ November 4 in Tel Aviv, Israel
November 30, Berlin, Germany

[Website](https://reactday.berlin) - [Twitter](https://twitter.com/reactdayberlin) - [Facebook](https://www.facebook.com/reactdayberlin/) - [Videos](https://www.youtube.com/channel/UC1EYHmQYBUJjkmL6OtK4rlw)

### React Iran 2019 {#react-iran-2019}
January 31, 2019 in Tehran, Iran

[Website](http://reactiran.com) - [Instagram](https://www.instagram.com/reactiran/)
4 changes: 2 additions & 2 deletions content/community/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ There are many example projects created by the React community. Feel free to add

* **[Calculator](https://github.com/ahfarmer/calculator)** Implementation of the iOS calculator built in React
* **[Emoji Search](https://github.com/ahfarmer/emoji-search)** Simple React app for searching emoji
* **[Github Battle App](https://github.com/ReactTraining/react-fundamentals/tree/hosting)** Battle two Github users and see the most popular Github projects for any language.
* **[Github Battle App](https://tm.dev/react-course-project/)** Battle two Github users and see the most popular Github projects for any language.
* **[React Powered Hacker News Client](https://github.com/insin/react-hn)** A React & react-router-powered implementation of Hacker News using its Firebase API.
* **[Pokedex](https://github.com/alik0211/pokedex)** The list of Pokémon with live search
* **[Shopping Cart](https://github.com/jeffersonRibeiro/react-shopping-cart)** Simple ecommerce cart application built using React
* **[Shopping Cart](https://github.com/jeffersonRibeiro/react-shopping-cart)** Simple ecommerce cart application built using React
* **[Progressive Web Tetris](https://github.com/skidding/flatris)** Besides a beautiful, mobile-friendly implementation of Tetris, this project is a playground for integrating and experimenting with web technologies.
* **[Product Comparison Page](https://github.com/Rhymond/product-compare-react)** Simple Product Compare page built in React
* **[Hacker News Clone React/GraphQL](https://github.com/clintonwoo/hackernews-react-graphql)** Hacker News clone rewritten with universal JavaScript, using React and GraphQL.
Expand Down
Loading

0 comments on commit 73df8d8

Please sign in to comment.