-
Notifications
You must be signed in to change notification settings - Fork 113
Translating "forms" page, and a typo fixed #17
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
|
Deploy preview for ar-reactjs ready! Built with commit 31f6968 |
|
I used hsoub translation with "forms.md", I made the markdown arrangements. |
asantarissy
left a comment
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.
Thank you @aladin002dz, great job.
I left you couple of comments please check them out, also make sure you pull this repo master branch to make sure your branch is up-to-date.
Cheers!
content/docs/forms.md
Outdated
| <input type="text" name="name" /> | ||
| </label> | ||
| <input type="submit" value="Submit" /> | ||
| <input type="submit" value="تقديم البيانات" /> |
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.
I don't think that we're going to translate code snippets. if you can keep it in English please.
@iRayan7 what do you think?
content/docs/forms.md
Outdated
| } | ||
| ``` | ||
|
|
||
| Notice that `this.state.value` is initialized in the constructor, so that the text area starts off with some text in it. |
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.
Remove this.
content/docs/forms.md
Outdated
| ## Handling Multiple Inputs {#handling-multiple-inputs} | ||
| ## التعامل مع إدخالات متعددة {#handling-multiple-inputs} | ||
|
|
||
| When you need to handle multiple controlled `input` elements, you can add a `name` attribute to each element and let the handler function choose what to do based on the value of `event.target.name`. |
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.
Please review and fix this.
content/docs/forms.md
Outdated
| ، وهي تقنيّة بديلة للتعامل مع حقول الإدخال. | ||
|
|
||
| ## Fully-Fledged Solutions {#fully-fledged-solutions} | ||
| ## حلول متناهية-الصغر {#fully-fledged-solutions} |
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.
I think this could be: حلول أخرى متكاملة
content/docs/forms.md
Outdated
| ## حلول متناهية-الصغر {#fully-fledged-solutions} | ||
|
|
||
| If you're looking for a complete solution including validation, keeping track of the visited fields, and handling form submission, [Formik](https://jaredpalmer.com/formik) is one of the popular choices. However, it is built on the same principles of controlled components and managing state — so don't neglect to learn them. | ||
| إذا كنت تبحث عن حل كامل بما في ذلك التحقق من الصحة ، وتتبع الحقول التي قمت بزيارتها ، والتعامل مع إرسال النموذج ، فإن |
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.
- Please remove spaces before commas
- Change "للمكونات الخاضعة للرقابة" to "للمكونات المضبوطة"
- Change "التحقق من الصحة" to "التحقق من صحة الحقول"
|
all the notes handled, please check now @asantarissy |
content/docs/forms.md
Outdated
| --- | ||
| id: forms | ||
| title: Forms | ||
| title: الحقول |
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.
Please change الحقول or حقل to نماذج or نموذج in this file.
content/docs/forms.md
Outdated
| When you need to handle multiple controlled `input` elements, you can add a `name` attribute to each element and let the handler function choose what to do based on the value of `event.target.name`. | ||
| عندما تحتاج إلى التعامل مع عناصر `input` مُتعدِّدة مضبوطة فبإمكانك إضافة الخاصيّة `name` إلى كل عنصر وتترك لدالة معالجة الأحداث أن تختار ما ستفعله بناءً على قيمة `event.target.name`، فلنأخذ هذا المثال: | ||
|
|
||
| For example: |
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.
Please remove this.
content/docs/forms.md
Outdated
| يمتلك هذا الحقل نفس السّلوك الافتراضي لحقول HTML من حيث الانتقال إلى صفحة جديدة عندما يضغط المستخدم على زر تقديم البيانات (Submit)، وإن أردت فقط هذا السّلوك في React فسيعمل بشكل جيّد معك، ولكن في معظم الأحيان من الملائم أكثر أن نمتلك دالة في JavaScript تتعامل مع تقديم البيانات ولديها الوصول إلى البيانات التي أدخلها المستخدم في الحقل. الطريقة القياسيّة لتحقيق هذا الأمر هي باستخدام تقنيّة تدعى المُكوِّنات المضبوطة (controlled components). | ||
|
|
||
| In HTML, form elements such as `<input>`, `<textarea>`, and `<select>` typically maintain their own state and update it based on user input. In React, mutable state is typically kept in the state property of components, and only updated with [`setState()`](/docs/react-component.html#setstate). | ||
| ## المكونات الخاضعة للرقابة {#controlled-components} |
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.
Please change المكونات الخاضعة للرقابة to المكونات المضبوطة in this file
asantarissy
left a comment
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.
Thank you @aladin002dz so much for your first contribution! we couldn't run this project without people like you. 🎉
No description provided.