Translated - Lifting State Up by SambhavSacheti · Pull Request #30 · reactjs/hi.react.dev

@SambhavSacheti

  • Lifting State Up
  • Adding a Second Input
  • Writing Conversion Functions
  • Lifting State Up
  • Lessons Learned

Sambhav Sacheti and others added 10 commits

March 26, 2019 18:12

@netlify

@arshadkazmi42

arshadkazmi42

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work. Great work at the translation, I didn't found much of translation related issue. One of the best translation I have seen.
There are a couple of syntax issues which I have reported, once you are done with fixing those, it will be good to go from my end.
Also, do read #23 which has our review process

@SambhavSacheti

@SambhavSacheti

arshadkazmi42

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Its good to go from my end.
For the next steps, we will have the second phase of review, which will be done by @saranshkataria
Thank you for working on this

saranshkataria

saranshkataria

saranshkataria

saranshkataria

saranshkataria

saranshkataria

@saranshkataria

added comments till line 171

@saranshkataria

@SambhavSacheti

@SambhavSacheti

Hi @saranshkataria please let me know when you have reviewed the rest of the file.

saranshkataria

हालाँकि, हम चाहते हैं कि ये दोनों इनपुट एक दूसरे के sync में रहें। जब हम Celsius इनपुट को अपडेट करें, तो Fahrenheit इनपुट अपडेट हो और इसके विपरीत भी प्रतिबिंबित होना चाहिए।

In React, sharing state is accomplished by moving it up to the closest common ancestor of the components that need it. This is called "lifting state up". We will remove the local state from the `TemperatureInput` and move it into the `Calculator` instead.
React में, state साझाकरण का कार्य उसे कौम्पोनॅन्टस के निकटतम सामान्य पूर्वज तक ले जाकर पूरा किया जाता है। यह "लिफ्टिंग स्टेट अप" कहलाता है। हम लोकल स्टेट को `TemperatureInput` से हटा देंगे एवं `Calculator` में ले जायेंगे।

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

साझाकरण -> too complex?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revisit line gramatically too

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

साझा is too complex, this still has not been resolved

saranshkataria

React में, state साझाकरण का कार्य उसे कौम्पोनॅन्टस के निकटतम सामान्य पूर्वज तक ले जाकर पूरा किया जाता है। यह "लिफ्टिंग स्टेट अप" कहलाता है। हम लोकल स्टेट को `TemperatureInput` से हटा देंगे एवं `Calculator` में ले जायेंगे।

If the `Calculator` owns the shared state, it becomes the "source of truth" for the current temperature in both inputs. It can instruct them both to have values that are consistent with each other. Since the props of both `TemperatureInput` components are coming from the same parent `Calculator` component, the two inputs will always be in sync.
यदि साझा स्टेट का मालिक `Calculator` हे, तो वह दोनों इन्पुट्स में वर्तमान तापमान के लिए "सत्य का स्रोत" बन जाता है। यह उन दोनों को एक दूसरे के अनुरूप वैल्यूज रखने का निर्देश दे सकता है। चूंकि दोनों `TemperatureInput` कौम्पोनॅन्टस के props एक ही `Calculator` पैरेंट कौम्पोनॅन्ट से हैं, यह दोनों हमेशा sync में रहेंगे।

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

साझा स्टेट -> better wording

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we translate source of truth?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

साझा स्टेट -> better wording

Hi Saransh - I am out of ideas to replace साझा स्टेट. Could you please advise?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we translate source of truth?

सत्य का स्रोत is better than सोर्स ऑफ़ ट्रुथ ! What do you think? Should I just revert it back to 'source of truth' ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

सत्य का स्रोत sounds better

saranshkataria

saranshkataria

@saranshkataria

@arshadkazmi42

@SambhavSacheti Any updates on this? Let us know if you need any help with this.

@SambhavSacheti

@SambhavSacheti Any updates on this? Let us know if you need any help with this.

Hi @arshadkazmi42 , Just saw your message. Will work on this and get back soon.

@arshadkazmi42

@SambhavSacheti Any updates on this? Let us know if you need any help with this.

Hi @arshadkazmi42 , Just saw your message. Will work on this and get back soon.

Cool. Thanks

@saranshkataria

@SambhavSacheti

@SambhavSacheti any updates?

I got distracted with other things. Please check now.

Sambhav Sacheti and others added 2 commits

July 2, 2019 10:23

@saranshkataria

saranshkataria

अब `Calculator` कौम्पोनॅन्ट की ओर मुड़ते हैं।

We will store the current input's `temperature` and `scale` in its local state. This is the state we "lifted up" from the inputs, and it will serve as the "source of truth" for both of them. It is the minimal representation of all the data we need to know in order to render both inputs.
हम वर्तमान इनपुट के `temperature` और `scale` को उसके लोकल state में जमा करेंगे। यह वही state है जिसे हमने इनपुट्स से "ऊपर उठा लिया", और यह उन दोनों के लिए "सत्य का एक स्रोत" के रूप में काम करेगी। यह दोनों इनपुट्स को रेंडर करने के लिए हमारे द्वारा आवश्यक सभी डेटा का न्यूनतम प्रतिनिधित्व है।

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

जमा करेंगे does not seem to be the right translation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ऊपर उठा लिया tha

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

सत्य का एक स्रोत -> सत्य ke स्रोत

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

यह दोनों इनपुट्स को रेंडर करने के लिए हमारे द्वारा आवश्यक सभी डेटा का न्यूनतम प्रतिनिधित्व है। -> revisit once

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

यह उन सभी डेटा का न्यूनतम प्रतिनिधित्व है जिन्हें हमें जानना आवश्यक है, दोनों इनपुट को रेंडर करने के लिए| could be reordered a bit to make better sense

@arshadkazmi42

@SambhavSacheti

this? let us know

Will work today.

@arshadkazmi42

@saranshkataria

@SambhavSacheti

@SambhavSacheti

@SambhavSacheti

@saranshkataria

@arshadkazmi42

@saranshkataria

saranshkataria

[**इसे CodePen पर आज़माएँ**](https://codepen.io/gaearon/pen/WZpxpz?editors=0010)

Now, no matter which input you edit, `this.state.temperature` and `this.state.scale` in the `Calculator` get updated. One of the inputs gets the value as is, so any user input is preserved, and the other input value is always recalculated based on it.
अब, कोई फर्क नहीं पड़ता कि आप किस इनपुट को संपादित करते हैं, `Calculator` के `this.state.temperature` और `this.state.scale` अपडेट हो जायेंगे। इनपुट्स में से एक को वैल्यू मिलती है, इसलिए कोई भी user input संरक्षित रहता है, और अन्य इनपुट वैल्यू हमेशा इसके आधार पर पुनर्गणना होता है।

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

इनपुट्स में से एक को वैल्यू मिलती है, इसलिए कोई भी user input संरक्षित रहता है, और अन्य इनपुट वैल्यू हमेशा इसके आधार पर पुनर्गणना होता है। -> revisit once

@saranshkataria

You missed a few before, added comments on those, and will add more after line 304 soon

@arshadkazmi42

Closing due to inactivity