Skip to content

Commit 66806cf

Browse files
authored
Merge pull request #487 from muh-osman/translate-option-page
Translate `<option>` page [UPDATED]
2 parents df5fc55 + 2aa4e54 commit 66806cf

File tree

1 file changed

+27
-26
lines changed
  • src/content/reference/react-dom/components

1 file changed

+27
-26
lines changed

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

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ title: "<option>"
44

55
<Intro>
66

7-
The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) lets you render an option inside a [`<select>`](/reference/react-dom/components/select) box.
7+
يتيح لك [مكون الـ `<option>` المدمج في المتصفح](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) عرض خيارات داخل عنصر [`<select>`](/reference/react-dom/components/select).
88

99
```js
1010
<select>
11-
<option value="someOption">Some option</option>
12-
<option value="otherOption">Other option</option>
11+
<option value="someOption">بعض الخيارات</option>
12+
<option value="otherOption">خيارات أخرى</option>
1313
</select>
1414
```
1515

@@ -19,56 +19,58 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
1919

2020
---
2121

22-
## Reference {/*reference*/}
22+
## المرجع {/*reference*/}
2323

2424
### `<option>` {/*option*/}
2525

26-
The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select) lets you render an option inside a [`<select>`](/reference/react-dom/components/select) box.
26+
يتيح لك [مكون الـ `<option>` المدمج في المتصفح](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select) عرض خيارات داخل عنصر [`<select>`](/reference/react-dom/components/select).
2727

2828
```js
2929
<select>
30-
<option value="someOption">Some option</option>
31-
<option value="otherOption">Other option</option>
30+
<option value="someOption">بعض الخيارات</option>
31+
<option value="otherOption">خيارات أخرى</option>
3232
</select>
3333
```
3434

35-
[See more examples below.](#usage)
35+
[اطّلع على المزيد من الأمثلة في الأسفل.](#usage)
3636

37-
#### Props {/*props*/}
37+
#### الخصائص {/*props*/}
3838

39-
`<option>` supports all [common element props.](/reference/react-dom/components/common#props)
39+
تدعم `<option>` [جميع خصائص العناصر الشائعة.](/reference/react-dom/components/common#props)
4040

41-
Additionally, `<option>` supports these props:
41+
بالإضافة إلى ذلك ، يدعم `<option>` هذه الخصائص:
4242

43-
* [`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): A boolean. If `true`, the option will not be selectable and will appear dimmed.
44-
* [`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): A string. Specifies the meaning of the option. If not specified, the text inside the option is used.
45-
* [`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): The value to be used [when submitting the parent `<select>` in a form](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form) if this option is selected.
43+
* [`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): قيمة منطقية. إذا كانت `true`، فلن يكون الخيار قابلاً للتحديد وسيظهر باهت.
4644

47-
#### Caveats {/*caveats*/}
45+
* [`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): نص. يحدد معنى الخيار. إذا لم يتم تحديده، فسيتم استخدام النص الموجود داخل الخيار.
4846

49-
* React does not support the `selected` attribute on `<option>`. Instead, pass this option's `value` to the parent [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option) for an uncontrolled select box, or [`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable) for a controlled select.
47+
* [`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): القيمة التي سيتم استخدامها [عند إرسال العنصر الأب `<select>` في النموذج](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form) إذا تم اختيار هذا الخيار.
48+
49+
#### تنبيه {/*caveats*/}
50+
51+
* لا تدعم React سمة `selected` في `<option>`. بدلاً من ذلك، مرِّر قيمة `value` هذا الخيار إلى العنصر الأب في [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option) لعنصر اختيار غير متحكم فيه، أو في [`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable) لمعنصر اختيار متحكم فيه.
5052

5153
---
5254

53-
## Usage {/*usage*/}
55+
## الاستخدام {/*usage*/}
5456

55-
### Displaying a select box with options {/*displaying-a-select-box-with-options*/}
57+
### عرض عنصر الاختيار مع الخيارات {/*displaying-a-select-box-with-options*/}
5658

57-
Render a `<select>` with a list of `<option>` components inside to display a select box. Give each `<option>` a `value` representing the data to be submitted with the form.
59+
قم بإنشاء `<select>` يتضمن داخله قائمة من مكونات `<option>` لعرض مربع تحديد. أعط كل `<option>` قيمة `value` تمثل البيانات التي سيتم رفعها مع النموذج.
5860

59-
[Read more about displaying a `<select>` with a list of `<option>` components.](/reference/react-dom/components/select)
61+
[اقرأ المزيد حول عرض `<select>` بقائمة مكونات `<option>`.](/reference/react-dom/components/select)
6062

6163
<Sandpack>
6264

6365
```js
6466
export default function FruitPicker() {
6567
return (
6668
<label>
67-
Pick a fruit:
69+
اختر فاكهة:
6870
<select name="selectedFruit">
69-
<option value="apple">Apple</option>
70-
<option value="banana">Banana</option>
71-
<option value="orange">Orange</option>
71+
<option value="apple">تفاح</option>
72+
<option value="banana">موز</option>
73+
<option value="orange">برتقال</option>
7274
</select>
7375
</label>
7476
);
@@ -79,5 +81,4 @@ export default function FruitPicker() {
7981
select { margin: 5px; }
8082
```
8183

82-
</Sandpack>
83-
84+
</Sandpack>

0 commit comments

Comments
 (0)