Skip to content
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

Translate home page examples #36

Merged
merged 5 commits into from
Mar 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions content/home/examples/a-component-using-external-plugins.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: A Component Using External Plugins
title: مكوّن يستخدم مكتبة خارجية
order: 3
domid: markdown-example
---

React allows you to interface with other libraries and frameworks. This example uses **remarkable**, an external Markdown library, to convert the `<textarea>`'s value in real time.
يسمح React باستخدام مكتبات (Libraries) خارجية بالإضافة الى Frameworks.
هذا المثال يستخدم المكتبة **remarkable** كمكتبة خارجية لمعالجة تعابير من نوع Markdown، لتحويل قيمة `<textarea>` بشكل آني.
10 changes: 6 additions & 4 deletions content/home/examples/a-simple-component.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: A Simple Component
title: مكّون بسيط
order: 0
domid: hello-example
---
كل مكوّن React مزوّد بالدّالة `Render()` التي تأخذ البيانات المدخلة و تُرجع ما يجب اظهاره.
هذا المثال يستخدم تعابير تشبه XML أي (XML-Like) و التي تسمى JSX.
البيانات المرسلة خلال المكّون يمكن الوصول اليها ضمن الدالة `Render()` بواسطة `this.props`.

React components implement a `render()` method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by `render()` via `this.props`.

**JSX is optional and not required to use React.** Try the [Babel REPL](babel://es5-syntax-example) to see the raw JavaScript code produced by the JSX compilation step.
**استخدام JSX اختياري، وليس مطلوباً او شرطاً لاستخدام React.** جرّب [Babel REPL](babel://es5-syntax-example)
لترى شيفرة الـ JavaScript الخام الموّلدة من خلال خطوة التحويل البرمجي لـ JSX.
5 changes: 2 additions & 3 deletions content/home/examples/a-stateful-component.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: A Stateful Component
title: مكوّن الحالة (Stateful)
order: 1
domid: timer-example
---

In addition to taking input data (accessed via `this.props`), a component can maintain internal state data (accessed via `this.state`). When a component's state data changes, the rendered markup will be updated by re-invoking `render()`.
بالإضافة الى أخذ بيانات الادخال (التي يمكن الوصول اليها من خلال `this.props`)، يستطيع المكوّن ان يحتفظ بحالة بياناته الداخلية (التي يمكن الوصول اليها من خلال `this.state`) . عندما تتغير حالة بيانات المكوّن، العلامات المرسومة أو المُظهرة سيتم تحديثها و إعادة رسمها من خلال إعادة تنفيذ الدّالة `render()`.
6 changes: 4 additions & 2 deletions content/home/examples/an-application.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: An Application
title: تطبيق
order: 2
domid: todos-example
---

Using `props` and `state`, we can put together a small Todo application. This example uses `state` to track the current list of items as well as the text that the user has entered. Although event handlers appear to be rendered inline, they will be collected and implemented using event delegation.
باستخدام `props` و `state`، نستطيع ان ننشأ برنامج صغير يعرض قائمة المهام التي يجب القيام بها (Todo list). هذا المثال يستخدم `state` لمتابعة العناصر الموجودة في القائمة الحالية بالإضافة الى متابعة النص المُدخل من قبل المستخدم.
على الرغم من أن معالجات الأحداث تبدو وكأنها مُضمّنة ، إلا أنه سيتم جمعها وتنفيذها باستخدام تفويض الحدث.