Skip to content

Commit 4b8266a

Browse files
docs(ar): translate remaining reference pages (react-dom + react API)
Made-with: Cursor
1 parent f9e644c commit 4b8266a

72 files changed

Lines changed: 4347 additions & 4350 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/content/reference/react-dom/client/hydrateRoot.md

Lines changed: 113 additions & 113 deletions
Large diffs are not rendered by default.

src/content/reference/react-dom/components/common.md

Lines changed: 352 additions & 352 deletions
Large diffs are not rendered by default.

src/content/reference/react-dom/components/form.md

Lines changed: 37 additions & 37 deletions
Large diffs are not rendered by default.

src/content/reference/react-dom/components/index.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
---
2-
title: "React DOM Components"
2+
title: "مكوّنات React DOM"
33
---
44

55
<Intro>
66

7-
React supports all of the browser built-in [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) and [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) components.
7+
يدعم React جميع مكوّنات [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) و [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) المدمجة في المتصفح.
88

99
</Intro>
1010

1111
---
1212

13-
## Common components {/*common-components*/}
13+
## المكوّنات الشائعة {/*common-components*/}
1414

15-
All of the built-in browser components support some props and events.
15+
تدعم جميع مكوّنات المتصفح المدمجة بعض الخصائص والأحداث.
1616

17-
* [Common components (e.g. `<div>`)](/reference/react-dom/components/common)
17+
* [مكوّنات شائعة (مثل `<div>`)](/reference/react-dom/components/common)
1818

19-
This includes React-specific props like `ref` and `dangerouslySetInnerHTML`.
19+
يشمل ذلك خصائص React الخاصة مثل `ref` و `dangerouslySetInnerHTML`.
2020

2121
---
2222

23-
## Form components {/*form-components*/}
23+
## مكوّنات النماذج {/*form-components*/}
2424

25-
These built-in browser components accept user input:
25+
تقبل مكوّنات المتصفح المدمجة هذه إدخال المستخدم:
2626

2727
* [`<input>`](/reference/react-dom/components/input)
2828
* [`<select>`](/reference/react-dom/components/select)
2929
* [`<textarea>`](/reference/react-dom/components/textarea)
3030

31-
They are special in React because passing the `value` prop to them makes them *[controlled.](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)*
31+
تتميّز في React لأن تمرير خاصية `value` إليها يجعلها *[متحكَّمًا فيها.](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)*
3232

3333
---
3434

35-
## Resource and Metadata Components {/*resource-and-metadata-components*/}
35+
## مكوّنات الموارد والبيانات الوصفية {/*resource-and-metadata-components*/}
3636

37-
These built-in browser components let you load external resources or annotate the document with metadata:
37+
تتيح لك مكوّنات المتصفح المدمجة هذه تحميل موارد خارجية أو إثراء المستند ببيانات وصفية:
3838

3939
* [`<link>`](/reference/react-dom/components/link)
4040
* [`<meta>`](/reference/react-dom/components/meta)
4141
* [`<script>`](/reference/react-dom/components/script)
4242
* [`<style>`](/reference/react-dom/components/style)
4343
* [`<title>`](/reference/react-dom/components/title)
4444

45-
They are special in React because React can render them into the document head, suspend while resources are loading, and enact other behaviors that are described on the reference page for each specific component.
45+
تتميّز في React لأن React يمكنه تصييرها في رأس المستند، وتعليق التنفيذ أثناء تحميل الموارد، وتطبيق سلوكيات أخرى تُوضَّح في صفحة المرجع لكل مكوّن.
4646

4747
---
4848

49-
## All HTML components {/*all-html-components*/}
49+
## جميع مكوّنات HTML {/*all-html-components*/}
5050

51-
React supports all built-in browser HTML components. This includes:
51+
يدعم React جميع مكوّنات HTML المدمجة في المتصفح. من ذلك:
5252

5353
* [`<aside>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside)
5454
* [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio)
@@ -154,39 +154,39 @@ React supports all built-in browser HTML components. This includes:
154154

155155
<Note>
156156

157-
Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing HTML to JSX with an [online converter.](https://transform.tools/html-to-jsx)
157+
مثل [معيار DOM،](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) يستخدم React تسمية `camelCase` لأسماء الخصائص. مثلاً تكتب `tabIndex` بدلًا من `tabindex`. يمكنك تحويل HTML الحالي إلى JSX باستخدام [محوّل على الويب.](https://transform.tools/html-to-jsx)
158158

159159
</Note>
160160

161161
---
162162

163-
### Custom HTML elements {/*custom-html-elements*/}
163+
### عناصر HTML مخصصة {/*custom-html-elements*/}
164164

165-
If you render a tag with a dash, like `<my-element>`, React will assume you want to render a [custom HTML element.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)
165+
إذا صيّرت وسمًا يحتوي على شرطة، مثل `<my-element>`، فسيفترض React أنك تريد تصيير [عنصر HTML مخصص.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)
166166

167-
If you render a built-in browser HTML element with an [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is) attribute, it will also be treated as a custom element.
167+
إذا صيّرت عنصر HTML مدمجًا مع سمة [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is)، فسيُعامل أيضًا كعنصر مخصص.
168168

169-
#### Setting values on custom elements {/*attributes-vs-properties*/}
169+
#### تعيين القيم على العناصر المخصصة {/*attributes-vs-properties*/}
170170

171-
Custom elements have two methods of passing data into them:
171+
للعناصر المخصصة طريقتان لتمرير البيانات إليها:
172172

173-
1) Attributes: Which are displayed in markup and can only be set to string values
174-
2) Properties: Which are not displayed in markup and can be set to arbitrary JavaScript values
173+
1) السمات: تظهر في التعليمات ولا يمكن تعيينها إلا لقيم نصية
174+
2) الخصائص: لا تظهر في التعليمات ويمكن تعيينها لقيم JavaScript بأي نوع
175175

176-
By default, React will pass values bound in JSX as attributes:
176+
بشكل افتراضي، يمرّر React القيم المربوطة في JSX كسمات:
177177

178178
```jsx
179179
<my-element value="Hello, world!"></my-element>
180180
```
181181

182-
Non-string JavaScript values passed to custom elements will be serialized by default:
182+
تُسلسل القيم غير النصية الممرَّرة للعناصر المخصصة افتراضيًا:
183183

184184
```jsx
185-
// Will be passed as `"1,2,3"` as the output of `[1,2,3].toString()`
185+
// ستُمرَّر كـ `"1,2,3"` أي ناتج `[1,2,3].toString()`
186186
<my-element value={[1,2,3]}></my-element>
187187
```
188188

189-
React will, however, recognize an custom element's property as one that it may pass arbitrary values to if the property name shows up on the class during construction:
189+
سيتعرّف React مع ذلك على خاصية عنصر مخصص يمكنه تمرير قيم بأي نوع إليها إذا ظهر اسم الخاصية على الصنف أثناء الإنشاء:
190190

191191
<Sandpack>
192192

@@ -224,9 +224,9 @@ export function App() {
224224

225225
</Sandpack>
226226

227-
#### Listening for events on custom elements {/*custom-element-events*/}
227+
#### الاستماع للأحداث على العناصر المخصصة {/*custom-element-events*/}
228228

229-
A common pattern when using custom elements is that they may dispatch [`CustomEvent`s](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) rather than accept a function to call when an event occur. You can listen for these events using an `on` prefix when binding to the event via JSX.
229+
من الأنماط الشائعة مع العناصر المخصصة أنها قد ترسل [`CustomEvent`s](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) بدل قبول دالة تُستدعى عند حدوث الحدث. يمكنك الاستماع لهذه الأحداث باستخدام بادئة `on` عند الربط عبر JSX.
230230

231231
<Sandpack>
232232

@@ -285,7 +285,7 @@ export function App() {
285285

286286
<Note>
287287

288-
Events are case-sensitive and support dashes (`-`). Preserve the casing of the event and include all dashes when listening for custom element's events:
288+
الأحداث حسّاسة لحالة الأحرف وتدعم الشرطات (`-`). احفظ حالة الأحرف في اسم الحدث وضمّن كل الشرطات عند الاستماع لأحداث العنصر المخصص:
289289

290290
```jsx
291291
// Listens for `say-hi` events
@@ -297,9 +297,9 @@ Events are case-sensitive and support dashes (`-`). Preserve the casing of the e
297297
</Note>
298298
---
299299

300-
## All SVG components {/*all-svg-components*/}
300+
## جميع مكوّنات SVG {/*all-svg-components*/}
301301

302-
React supports all built-in browser SVG components. This includes:
302+
يدعم React جميع مكوّنات SVG المدمجة في المتصفح. من ذلك:
303303

304304
* [`<a>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/a)
305305
* [`<animate>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate)
@@ -370,20 +370,20 @@ React supports all built-in browser SVG components. This includes:
370370

371371
<Note>
372372

373-
Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing SVG to JSX with an [online converter.](https://transform.tools/)
374-
375-
Namespaced attributes also have to be written without the colon:
376-
377-
* `xlink:actuate` becomes `xlinkActuate`.
378-
* `xlink:arcrole` becomes `xlinkArcrole`.
379-
* `xlink:href` becomes `xlinkHref`.
380-
* `xlink:role` becomes `xlinkRole`.
381-
* `xlink:show` becomes `xlinkShow`.
382-
* `xlink:title` becomes `xlinkTitle`.
383-
* `xlink:type` becomes `xlinkType`.
384-
* `xml:base` becomes `xmlBase`.
385-
* `xml:lang` becomes `xmlLang`.
386-
* `xml:space` becomes `xmlSpace`.
387-
* `xmlns:xlink` becomes `xmlnsXlink`.
373+
مثل [معيار DOM،](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) يستخدم React تسمية `camelCase` لأسماء الخصائص. مثلاً تكتب `tabIndex` بدلًا من `tabindex`. يمكنك تحويل SVG الحالي إلى JSX باستخدام [محوّل على الويب.](https://transform.tools/)
374+
375+
يجب كتابة السمات ذات المساحة الاسمية بدون النقطتين:
376+
377+
* `xlink:actuate` تصبح `xlinkActuate`.
378+
* `xlink:arcrole` تصبح `xlinkArcrole`.
379+
* `xlink:href` تصبح `xlinkHref`.
380+
* `xlink:role` تصبح `xlinkRole`.
381+
* `xlink:show` تصبح `xlinkShow`.
382+
* `xlink:title` تصبح `xlinkTitle`.
383+
* `xlink:type` تصبح `xlinkType`.
384+
* `xml:base` تصبح `xmlBase`.
385+
* `xml:lang` تصبح `xmlLang`.
386+
* `xml:space` تصبح `xmlSpace`.
387+
* `xmlns:xlink` تصبح `xmlnsXlink`.
388388

389389
</Note>

0 commit comments

Comments
 (0)