Skip to content

Commit 5e911e4

Browse files
committed
translate #101 #102 #120
1 parent c053c5a commit 5e911e4

File tree

5 files changed

+132
-128
lines changed

5 files changed

+132
-128
lines changed

.vitepress/theme/components/PreferenceTooltip.vue

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,32 +97,32 @@ function dismiss() {
9797

9898
<template>
9999
<Transition name="fly-in">
100-
<div class="preference-tooltip" v-if="show">
100+
<div class="preference-tooltip" v-if="show" dir="rtl">
101101
<template v-if="source === 'default'">
102-
<p>API style now defaults to Composition API.</p>
102+
<p>الآن النمط البرمجي الافتراضي هو الواجهة التركيبية.</p>
103103
<p>
104-
Some pages contain different content based on the API style
105-
chosen. Use this switch to toggle between APIs styles.
104+
بعض الصفحات تحتوي على محتوى مختلف بناءً على نمط واجهة البرمجة
105+
المختارة. استخدم هذا الزر للتبديل بين أنماط واجهات البرمجة.
106106
</p>
107107
</template>
108108
<template v-if="source && source.startsWith('url')">
109109
<p>
110-
Showing content for
111-
{{ preferComposition ? 'Composition' : 'Options' }} API because
110+
عرض المحتوى لـ
111+
{{ preferComposition ? 'الواجهة التركيبية' : 'واجهة الخيارات' }}لأن
112112
{{
113113
source === 'url-query'
114-
? 'it is specified by the URL query.'
115-
: 'the target section is only available for that API.'
114+
? 'تم تحديده في استعلام URL.'
115+
: 'القسم المستهدف متاح فقط لهذه الواجهة.'
116116
}}
117117
</p>
118118
<p>
119-
This is different from your saved preference and will only affect
120-
the current browsing session.
119+
هذا مختلف عن تفضيلك المحفوظ وسيؤثر
120+
فقط على جلسة التصفح الحالية.
121121
</p>
122122
</template>
123123
<p class="actions">
124-
<a href="/guide/introduction#api-styles">Learn more</a>
125-
<button @click="dismiss">Got it</button>
124+
<a href="/guide/introduction#api-styles">اطلع على المزيد</a>
125+
<button @click="dismiss">مفهوم</button>
126126
</p>
127127
<div class="arrow-top"></div>
128128
<div class="arrow-top inner"></div>
@@ -191,9 +191,11 @@ p {
191191
}
192192
193193
.actions {
194-
text-align: right;
194+
text-align: left;
195195
margin-top: 14px;
196196
margin-bottom: 0;
197+
display: flex;
198+
gap:16px;
197199
}
198200
199201
a {

glossary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@
6161
| list | قائمة | ليس بعد |
6262
| logic | شيفرة، منطق | ليس بعد |
6363
| macro | تعليمة عامة | ليس بعد |
64+
| meta | وصفي | ليس بعد |
6465
| method | التابع | ليس بعد |
6566
| migration | الترقية | ليس بعد |
6667
| mixin | مخلوط | ليس بعد |
6768
| modifier | مُعدِّل | ليس بعد |
6869
| mount | وصل | ليس بعد |
6970
| mutation | تغيير (في إدارة الحالة) | ليس بعد |
7071
| Options API | واجهة الخيارات لبرمجة التطبيقات | ليس بعد |
72+
| Outlet | مَخرَج | ليس بعد |
7173
| parameter | معامل | ليس بعد |
7274
| parent component | مكوّن أب/أصلي | ليس بعد |
7375
| placeholder | عنصر/محتوى نائب | ليس بعد |
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
# Built-in Special Attributes {#built-in-special-attributes}
1+
# سمات مدمجة خاصة {#built-in-special-attributes}
22

33
## key {#key}
44

5-
The `key` special attribute is primarily used as a hint for Vue's virtual DOM algorithm to identify vnodes when diffing the new list of nodes against the old list.
5+
السمة الخاصة `key` تُستخدم أساسًا كتلميح لخوارزمية الـDOM الافتراضي في Vue لتحديد العقد الافتراضية عند المطابقة بين قائمة العقد الجديدة والقائمة القديمة.
66

7-
- **Expects:** `number | string | symbol`
7+
- **تتوقع قيمة من نوع:** `number | string | symbol`
88

9-
- **Details**
9+
- **التفاصيل**
1010

11-
Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed / destroyed.
11+
بدون مفاتيح، تستخدم Vue خوارزمية تقلل من حركة العناصر وتحاول إصلاح/إعادة استخدام العناصر من نفس النوع في المكان قدر الإمكان. مع المفاتيح، ستعيد ترتيب العناصر بناءً على تغيير ترتيب المفاتيح، وستُزال/تُتلف العناصر التي لم تعد موجودة من الآن فصاعدا.
1212

13-
Children of the same common parent must have **unique keys**. Duplicate keys will cause render errors.
13+
يجب أن تحتوي العناصر الأبناء لنفس الأب المشترك على **مفاتيح وحيدة**. ستتسبب المفاتيح المكررة في أخطاء تصييرية.
1414

15-
The most common use case is combined with `v-for`:
15+
حالة الاستخدام الأكثر شيوعًا هي مع `v-for`:
1616

1717
```vue-html
1818
<ul>
1919
<li v-for="item in items" :key="item.id">...</li>
2020
</ul>
2121
```
2222

23-
It can also be used to force replacement of an element/component instead of reusing it. This can be useful when you want to:
23+
يمكن أيضًا استخدامه لإجبار استبدال عنصر/مكون بدلاً من إعادة استخدامه. يمكن أن يكون ذلك مفيدًا عندما تريد:
2424

25-
- Properly trigger lifecycle hooks of a component
26-
- Trigger transitions
25+
- تشغيل بشكل صحيح خطافات دورة حياة مكون
26+
- تشغيل الانتقالات
2727

28-
For example:
28+
على سبيل المثال:
2929

3030
```vue-html
3131
<transition>
3232
<span :key="text">{{ text }}</span>
3333
</transition>
3434
```
3535

36-
When `text` changes, the `<span>` will always be replaced instead of patched, so a transition will be triggered.
36+
عندما يتغير `text`، سيستبدل `<span>` دائمًا بدلاً من إصلاحه، لذا سيشغل انتقال.
3737

38-
- **See also** [Guide - List Rendering - Maintaining State with `key`](/guide/essentials/list#maintaining-state-with-key)
38+
- **اطلع أيضًا على** [الدليل - تصيير القوائم - الحفاظ على الحالة مع `key`](/guide/essentials/list#maintaining-state-with-key)
3939

4040
## ref {#ref}
4141

42-
Denotes a [template ref](/guide/essentials/template-refs).
42+
يشير إلى [مرجع القالب](/guide/essentials/template-refs).
4343

44-
- **Expects:** `string | Function`
44+
- **تتوقع قيمة من نوع:** `string | Function`
4545

46-
- **Details**
46+
- **التفاصيل**
4747

48-
`ref` is used to register a reference to an element or a child component.
48+
`ref` يستخدم لتسجيل مرجع إلى عنصر أو مكون ابن.
4949

50-
In Options API, the reference will be registered under the component's `this.$refs` object:
50+
في واجهة الخيارات، سيسجل المرجع تحت كائن `this.$refs` للمكون:
5151

5252
```vue-html
53-
<!-- stored as this.$refs.p -->
53+
<!-- تُخزن كـ this.$refs.p -->
5454
<p ref="p">hello</p>
5555
```
5656

57-
In Composition API, the reference will be stored in a ref with matching name:
57+
في الواجهة التركيبية، سيخزن المرجع في ref بالاسم المطابق:
5858

5959
```vue
6060
<script setup>
@@ -64,46 +64,46 @@ Denotes a [template ref](/guide/essentials/template-refs).
6464
</script>
6565
6666
<template>
67-
<p ref="p">hello</p>
67+
<p ref="p">السلام عليكم</p>
6868
</template>
6969
```
7070

71-
If used on a plain DOM element, the reference will be that element; if used on a child component, the reference will be the child component instance.
71+
إذا استخدمت على عنصر DOM عادي، سيكون المرجع هو هذا العنصر؛ إذا استخدمت على مكون ابن، سيكون المرجع هو نسخة المكون الابن.
7272

73-
Alternatively `ref` can accept a function value which provides full control over where to store the reference:
73+
بدلاً من ذلك، يمكن لـ `ref` قبول دالة كقيمة توفر التحكم الكامل في مكان تخزين المرجع:
7474

7575
```vue-html
7676
<ChildComponent :ref="(el) => child = el" />
7777
```
7878

79-
An important note about the ref registration timing: because the refs themselves are created as a result of the render function, you must wait until the component is mounted before accessing them.
79+
ملاحظة مهمة حول توقيت تسجيل المرجع: لأن المراجع تُنشأ بذاتها نتيجة لدالة التصيير، يجب عليك الانتظار حتى يُوصَّل المكون قبل الوصول إليها.
8080

81-
`this.$refs` is also non-reactive, therefore you should not attempt to use it in templates for data-binding.
81+
`this.$refs` أيضًا غير تفاعلي، لذا يجب ألا تحاول استخدامه في القوالب لربط البيانات.
8282

83-
- **See also**
84-
- [Guide - Template Refs](/guide/essentials/template-refs)
85-
- [Guide - Typing Template Refs](/guide/typescript/composition-api#typing-template-refs) <sup class="vt-badge ts" />
86-
- [Guide - Typing Component Template Refs](/guide/typescript/composition-api#typing-component-template-refs) <sup class="vt-badge ts" />
83+
- **اطلع أيضًا على**
84+
- [الدليل - مراجع القوالب](/guide/essentials/template-refs)
85+
- [الدليل - إضافة الأنواع إلى مراجع القوالب](/guide/typescript/composition-api#typing-template-refs) <sup class="vt-badge ts" />
86+
- [الدليل - إضافة الأنواع إلى مراجع قوالب المكون](/guide/typescript/composition-api#typing-component-template-refs) <sup class="vt-badge ts" />
8787

8888
## is {#is}
8989

90-
Used for binding [dynamic components](/guide/essentials/component-basics#dynamic-components).
90+
يستخدم لربط [المكونات الديناميكية](/guide/essentials/component-basics#dynamic-components).
9191

92-
- **Expects:** `string | Component`
92+
- **يتوقع قيمة من نوع:** `string | Component`
9393

94-
- **Usage on native elements** <sup class="vt-badge">3.1+</sup>
94+
- **الاستخدامعلى العناصر الأصلية** <sup class="vt-badge">3.1+</sup>
9595

96-
When the `is` attribute is used on a native HTML element, it will be interpreted as a [Customized built-in element](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-customized-builtin-example), which is a native web platform feature.
96+
عندما تستخدم السمة `is` على عنصر HTML أصلي، ستترجم على أنها [عنصر مدمج مخصص](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-customized-builtin-example)، وهو ميزة أصلية لمنصة الويب.
9797

98-
There is, however, a use case where you may need Vue to replace a native element with a Vue component, as explained in [in-DOM Template Parsing Caveats](/guide/essentials/component-basics#in-dom-template-parsing-caveats). You can prefix the value of the `is` attribute with `vue:` so that Vue will render the element as a Vue component instead:
98+
  ومع ذلك، هناك حالة استخدام حيث قد تحتاج Vue إلى استبدال عنصر أصلي بمكون Vue، كما هو موضح في [تنبيهات تحليل القوالب في DOM](/guide/essentials/component-basics#in-dom-template-parsing-caveats). يمكنك إضافة بادئة لقيمة السمة `is` بـ `:vue` حتى يقوم Vue بدلاً من ذلك بتصيير العنصر كمكون Vue :
9999

100100
```vue-html
101101
<table>
102102
<tr is="vue:my-row-component"></tr>
103103
</table>
104104
```
105105

106-
- **See also**
106+
- **اطلع أيضًا على**
107107

108-
- [Built-in Special Element - `<component>`](/api/built-in-special-elements#component)
109-
- [Dynamic Components](/guide/essentials/component-basics#dynamic-components)
108+
- [العنصر الخاص المدمج - `<component>`](/api/built-in-special-elements#component)
109+
- [المكونات الديناميكية](/guide/essentials/component-basics#dynamic-components)

0 commit comments

Comments
 (0)