-
Notifications
You must be signed in to change notification settings - Fork 131
Translated - Lifting State Up #30
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
Conversation
SambhavSacheti
commented
Apr 13, 2019
•
edited by arshadkazmi42
Loading
edited by arshadkazmi42
- Lifting State Up
- Adding a Second Input
- Writing Conversion Functions
- Lifting State Up
- Lessons Learned
Deploy preview for hi-reactjs ready! Built with commit 77df3fd |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
added comments till line 171 |
@saranshkataria I have made changes as per your comments. |
Hi @saranshkataria please let me know when you have reviewed the rest of the file. |
content/docs/lifting-state-up.md
Outdated
|
||
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` में ले जायेंगे। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
साझाकरण -> too complex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revisit line gramatically too
There was a problem hiding this comment.
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
|
||
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 में रहेंगे। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
साझा स्टेट -> better wording
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
सत्य का स्रोत sounds better
done till line 202 |
@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 |
@SambhavSacheti any updates? |
I got distracted with other things. Please check now. |
content/docs/lifting-state-up.md
Outdated
|
||
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 है जिसे हमने इनपुट्स से "ऊपर उठा लिया", और यह उन दोनों के लिए "सत्य का एक स्रोत" के रूप में काम करेगी। यह दोनों इनपुट्स को रेंडर करने के लिए हमारे द्वारा आवश्यक सभी डेटा का न्यूनतम प्रतिनिधित्व है। |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ऊपर उठा लिया tha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
सत्य का एक स्रोत -> सत्य ke स्रोत
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
यह दोनों इनपुट्स को रेंडर करने के लिए हमारे द्वारा आवश्यक सभी डेटा का न्यूनतम प्रतिनिधित्व है। -> revisit once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
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
@SambhavSacheti Any updates on this? let us know if you need any help |
Will work today. |
@SambhavSacheti any updates on this? |
Made the changes as per review. |
@SambhavSacheti this is already reviewed from my end. @saranshkataria will be handling the current review process |
|
||
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 संरक्षित रहता है, और अन्य इनपुट वैल्यू हमेशा इसके आधार पर पुनर्गणना होता है। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
इनपुट्स में से एक को वैल्यू मिलती है, इसलिए कोई भी user input संरक्षित रहता है, और अन्य इनपुट वैल्यू हमेशा इसके आधार पर पुनर्गणना होता है। -> revisit once
You missed a few before, added comments on those, and will add more after line 304 soon |
Closing due to inactivity |