-
Notifications
You must be signed in to change notification settings - Fork 107
Translate <option>
page [UPDATED]
#487
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
70a8864
translate option page
muh-osman 693c251
Merge branch 'reactjs:main' into translate-option-page
muh-osman c1a31a1
Translate <option> page [UPDATED]
muh-osman f5de836
Merge branch 'translate-option-page' of https://github.com/muh-osman/…
muh-osman 7314df6
Translate <option> page [UPDATED]
muh-osman 2aa4e54
Update option.md
AhmedBaset File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,12 @@ title: "<option>" | |
|
||
<Intro> | ||
|
||
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. | ||
يتيح لك [مكون الـ `<option>` المدمج في المتصفح](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) عرض خيارات داخل عنصر [`<select>`](/reference/react-dom/components/select). | ||
|
||
```js | ||
<select> | ||
<option value="someOption">Some option</option> | ||
<option value="otherOption">Other option</option> | ||
<option value="someOption">بعض الخيارات</option> | ||
<option value="otherOption">خيارات أخرى</option> | ||
</select> | ||
``` | ||
|
||
|
@@ -19,56 +19,58 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/ | |
|
||
--- | ||
|
||
## Reference {/*reference*/} | ||
## المرجع {/*reference*/} | ||
|
||
### `<option>` {/*option*/} | ||
|
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. أحسنت في تنبهك للرابط الخاطئ |
||
يتيح لك [مكون الـ `<option>` المدمج في المتصفح](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select) عرض خيارات داخل عنصر [`<select>`](/reference/react-dom/components/select). | ||
|
||
```js | ||
<select> | ||
<option value="someOption">Some option</option> | ||
<option value="otherOption">Other option</option> | ||
<option value="someOption">بعض الخيارات</option> | ||
<option value="otherOption">خيارات أخرى</option> | ||
</select> | ||
``` | ||
|
||
[See more examples below.](#usage) | ||
[اطّلع على المزيد من الأمثلة في الأسفل.](#usage) | ||
|
||
#### Props {/*props*/} | ||
#### الخصائص {/*props*/} | ||
|
||
`<option>` supports all [common element props.](/reference/react-dom/components/common#props) | ||
تدعم `<option>` [جميع خصائص العناصر الشائعة.](/reference/react-dom/components/common#props) | ||
|
||
Additionally, `<option>` supports these props: | ||
بالإضافة إلى ذلك ، يدعم `<option>` هذه الخصائص: | ||
|
||
* [`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. | ||
* [`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. | ||
* [`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. | ||
* [`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): قيمة منطقية. إذا كانت `true`، فلن يكون الخيار قابلاً للتحديد وسيظهر باهت. | ||
|
||
#### Caveats {/*caveats*/} | ||
* [`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): نص. يحدد معنى الخيار. إذا لم يتم تحديده، فسيتم استخدام النص الموجود داخل الخيار. | ||
|
||
* 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. | ||
* [`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) إذا تم اختيار هذا الخيار. | ||
|
||
#### تنبيه {/*caveats*/} | ||
|
||
* لا تدعم 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) لمعنصر اختيار متحكم فيه. | ||
|
||
--- | ||
|
||
## Usage {/*usage*/} | ||
## الاستخدام {/*usage*/} | ||
|
||
### Displaying a select box with options {/*displaying-a-select-box-with-options*/} | ||
### عرض عنصر الاختيار مع الخيارات {/*displaying-a-select-box-with-options*/} | ||
|
||
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. | ||
قم بإنشاء `<select>` يتضمن داخله قائمة من مكونات `<option>` لعرض مربع تحديد. أعط كل `<option>` قيمة `value` تمثل البيانات التي سيتم رفعها مع النموذج. | ||
|
||
[Read more about displaying a `<select>` with a list of `<option>` components.](/reference/react-dom/components/select) | ||
[اقرأ المزيد حول عرض `<select>` بقائمة مكونات `<option>`.](/reference/react-dom/components/select) | ||
|
||
<Sandpack> | ||
|
||
```js | ||
export default function FruitPicker() { | ||
return ( | ||
<label> | ||
Pick a fruit: | ||
اختر فاكهة: | ||
<select name="selectedFruit"> | ||
<option value="apple">Apple</option> | ||
<option value="banana">Banana</option> | ||
<option value="orange">Orange</option> | ||
<option value="apple">تفاح</option> | ||
<option value="banana">موز</option> | ||
<option value="orange">برتقال</option> | ||
</select> | ||
</label> | ||
); | ||
|
@@ -79,5 +81,4 @@ export default function FruitPicker() { | |
select { margin: 5px; } | ||
``` | ||
|
||
</Sandpack> | ||
|
||
</Sandpack> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
رائع.
من فضلك راجع آخر تعديل commit عملته أنا