Skip to content

Commit ec92937

Browse files
Translate various components and documentation to Arabic for improved accessibility and understanding
1 parent ec40854 commit ec92937

File tree

9 files changed

+110
-95
lines changed

9 files changed

+110
-95
lines changed

src/components/Layout/Feedback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
7474
{exit: isSubmitted}
7575
)}>
7676
<p className="w-full text-lg font-bold text-primary dark:text-primary-dark me-4">
77-
{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}
77+
{isSubmitted ? 'شكراً لك على ملاحظاتك!' : 'هل هذه الصفحة مفيدة؟'}
7878
</p>
7979
{!isSubmitted && (
8080
<button

src/components/Layout/Sidebar/SidebarLink.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,26 @@ export function SidebarLink({
8585
{title}{' '}
8686
{version === 'major' && (
8787
<span
88-
title="- This feature is available in React 19 beta and the React canary channel"
88+
title="- هذه الميزة متاحة في React 19 بيتا وقناة canary"
8989
className={`text-xs px-1 ms-1 rounded bg-gray-10 dark:bg-gray-40 dark:bg-opacity-20 text-gray-40 dark:text-gray-40`}>
9090
React 19
9191
</span>
9292
)}
9393
{version === 'canary' && (
9494
<IconCanary
95-
title=" - This feature is available in the latest Canary version of React"
95+
title=" - هذه الميزة متاحة في أحدث إصدار Canary من React"
9696
className="ms-1 text-gray-30 dark:text-gray-60 inline-block w-3.5 h-3.5 align-[-3px]"
9797
/>
9898
)}
9999
{version === 'experimental' && (
100100
<IconExperimental
101-
title=" - This feature is available in the latest Experimental version of React"
101+
title=" - هذه الميزة متاحة في أحدث إصدار تجريبي من React"
102102
className="ms-1 text-gray-30 dark:text-gray-60 inline-block w-3.5 h-3.5 align-[-3px]"
103103
/>
104104
)}
105105
{version === 'rc' && (
106106
<IconCanary
107-
title=" - This feature is available in the latest RC version"
107+
title=" - هذه الميزة متاحة في أحدث إصدار RC"
108108
className="ms-1 text-gray-30 dark:text-gray-60 inline-block w-3.5 h-3.5 align-[-3px]"
109109
/>
110110
)}

src/components/Layout/TopNav/BrandMenu.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,23 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
5757
sideOffset={0}
5858
align="end">
5959
<ContextMenu.Label className="ps-4 pt-2 text-base text-tertiary dark:text-tertiary-dark">
60-
Dark Mode
60+
الوضع الداكن
6161
</ContextMenu.Label>
6262
<DownloadMenuItem
6363
fileName="react_logo_dark.svg"
6464
href="/images/brand/logo_dark.svg">
6565
<span className="w-8">
6666
<IconDownload />
6767
</span>
68-
<span>Logo SVG</span>
68+
<span>شعار SVG</span>
6969
</DownloadMenuItem>
7070
<DownloadMenuItem
7171
fileName="react_wordmark_dark.svg"
7272
href="/images/brand/wordmark_dark.svg">
7373
<span className="w-8">
7474
<IconDownload />
7575
</span>
76-
<span>Wordmark SVG</span>
76+
<span>علامة كلمة SVG</span>
7777
</DownloadMenuItem>
7878
<MenuItem
7979
onSelect={async () => {
@@ -82,26 +82,26 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
8282
<span className="w-8">
8383
<IconCopy />
8484
</span>
85-
<span>Copy dark mode color</span>
85+
<span>نسخ لون الوضع الداكن</span>
8686
</MenuItem>
8787
<ContextMenu.Label className="ps-4 text-base text-tertiary dark:text-tertiary-dark">
88-
Light Mode
88+
الوضع الفاتح
8989
</ContextMenu.Label>
9090
<DownloadMenuItem
9191
fileName="react_logo_light.svg"
9292
href="/images/brand/logo_light.svg">
9393
<span className="w-8">
9494
<IconDownload />
9595
</span>
96-
<span>Logo SVG</span>
96+
<span>شعار SVG</span>
9797
</DownloadMenuItem>
9898
<DownloadMenuItem
9999
fileName="react_wordmark_light.svg"
100100
href="/images/brand/wordmark_light.svg">
101101
<span className="w-8">
102102
<IconDownload />
103103
</span>
104-
<span>Wordmark SVG</span>
104+
<span>علامة كلمة SVG</span>
105105
</DownloadMenuItem>
106106
<MenuItem
107107
onSelect={async () => {
@@ -110,7 +110,7 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
110110
<span className="w-8">
111111
<IconCopy />
112112
</span>
113-
<span>Copy light mode color</span>
113+
<span>نسخ لون الوضع الفاتح</span>
114114
</MenuItem>
115115
<div className="uwu-visible flex flex-col">
116116
<ContextMenu.Separator className="" />
@@ -125,13 +125,13 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
125125
<span className="w-8">
126126
<IconClose />
127127
</span>
128-
<span>Turn off</span>
128+
<span>إيقاف</span>
129129
</MenuItem>
130130
<DownloadMenuItem fileName="react_uwu_png" href="/images/uwu.png">
131131
<span className="w-8">
132132
<IconDownload />
133133
</span>
134-
<span>Logo PNG</span>
134+
<span>شعار PNG</span>
135135
</DownloadMenuItem>
136136

137137
<ExternalLink
@@ -141,7 +141,7 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
141141
<span className="w-8">
142142
<IconNewPage />
143143
</span>
144-
<span>Logo by @sawaratsuki1004</span>
144+
<span>الشعار من @sawaratsuki1004</span>
145145
</MenuItem>
146146
</ExternalLink>
147147
</div>

src/components/Layout/TopNav/TopNav.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export default function TopNav({
317317
)}
318318
onClick={onOpenSearch}>
319319
<IconSearch className="align-middle me-3 text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
320-
Search
320+
بحث
321321
<span className="hidden ms-auto sm:flex item-center me-1">
322322
<Kbd data-platform="mac"></Kbd>
323323
<Kbd data-platform="win" wide>
@@ -330,18 +330,18 @@ export default function TopNav({
330330
<div className="text-base justify-center items-center gap-1.5 flex 3xl:flex-1 flex-row 3xl:justify-end">
331331
<div className="mx-2.5 gap-1.5 hidden lg:flex">
332332
<NavItem isActive={section === 'learn'} url="/learn">
333-
Learn
333+
تعلم
334334
</NavItem>
335335
<NavItem
336336
isActive={section === 'reference'}
337337
url="/reference/react">
338-
Reference
338+
مرجع
339339
</NavItem>
340340
<NavItem isActive={section === 'community'} url="/community">
341-
Community
341+
المجتمع
342342
</NavItem>
343343
<NavItem isActive={section === 'blog'} url="/blog">
344-
Blog
344+
المدونة
345345
</NavItem>
346346
</div>
347347
<div className="flex w-full md:hidden"></div>

src/components/PageHeading.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ function PageHeading({
4242
{title}
4343
{version === 'canary' && (
4444
<IconCanary
45-
title=" - This feature is available in the latest Canary version of React"
45+
title=" - هذه الميزة متاحة في أحدث إصدار Canary من React"
4646
className="ms-4 mt-1 text-gray-50 dark:text-gray-40 inline-block w-6 h-6 align-[-1px]"
4747
/>
4848
)}
4949
{version === 'rc' && (
5050
<IconCanary
51-
title=" - This feature is available in the latest RC version"
51+
title=" - هذه الميزة متاحة في أحدث إصدار RC"
5252
className="ms-4 mt-1 text-gray-50 dark:text-gray-40 inline-block w-6 h-6 align-[-1px]"
5353
/>
5454
)}
5555
{version === 'experimental' && (
5656
<IconExperimental
57-
title=" - This feature is available in the latest Experimental version of React"
57+
title=" - هذه الميزة متاحة في أحدث إصدار تجريبي من React"
5858
className="ms-4 mt-1 text-gray-50 dark:text-gray-40 inline-block w-6 h-6 align-[-1px]"
5959
/>
6060
)}

src/components/Tag.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ import type {RouteTag} from './Layout/getRouteMeta';
1414

1515
const variantMap = {
1616
foundation: {
17-
name: 'Foundation',
17+
name: 'أساسي',
1818
classes: 'bg-yellow-50 text-white',
1919
},
2020
intermediate: {
21-
name: 'Intermediate',
21+
name: 'متوسط',
2222
classes: 'bg-purple-40 text-white',
2323
},
2424
advanced: {
25-
name: 'Advanced',
25+
name: 'متقدم',
2626
classes: 'bg-green-40 text-white',
2727
},
2828
experimental: {
29-
name: 'Experimental',
29+
name: 'تجريبي',
3030
classes: 'bg-ui-orange text-white',
3131
},
3232
deprecated: {
33-
name: 'Deprecated',
33+
name: 'مهمل',
3434
classes: 'bg-red-40 text-white',
3535
},
3636
};
Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,76 @@
1+
````markdown
12
---
23
title: panicThreshold
34
---
45

56
<Intro>
67

7-
The `panicThreshold` option controls how the React Compiler handles errors during compilation.
8+
يتحكم خيار `panicThreshold` في كيفية تعامل React Compiler مع الأخطاء أثناء التجميع.
89

910
</Intro>
1011

1112
```js
1213
{
13-
panicThreshold: 'none' // Recommended
14+
panicThreshold: 'none' // موصى به
1415
}
1516
```
1617

1718
<InlineToc />
1819

1920
---
2021

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

2324
### `panicThreshold` {/*panicthreshold*/}
2425

25-
Determines whether compilation errors should fail the build or skip optimization.
26+
يحدد ما إذا كان يجب أن تفشل أخطاء التجميع في البناء أو تخطي التحسين.
2627

27-
#### Type {/*type*/}
28+
#### النوع {/*type*/}
2829

2930
```
3031
'none' | 'critical_errors' | 'all_errors'
3132
```
3233

33-
#### Default value {/*default-value*/}
34+
#### القيمة الافتراضية {/*default-value*/}
3435

3536
`'none'`
3637

37-
#### Options {/*options*/}
38+
#### الخيارات {/*options*/}
3839

39-
- **`'none'`** (default, recommended): Skip components that can't be compiled and continue building
40-
- **`'critical_errors'`**: Fail the build only on critical compiler errors
41-
- **`'all_errors'`**: Fail the build on any compiler diagnostic
40+
- **`'none'`** (افتراضي، موصى به): تخطي المكونات التي لا يمكن تجميعها ومتابعة البناء
41+
- **`'critical_errors'`**: فشل البناء فقط عند أخطاء المُجمّع الحرجة
42+
- **`'all_errors'`**: فشل البناء عند أي تشخيص للمُجمّع
4243

43-
#### Caveats {/*caveats*/}
44+
#### تنبيهات {/*caveats*/}
4445

45-
- Production builds should always use `'none'`
46-
- Build failures prevent your application from building
47-
- The compiler automatically detects and skips problematic code with `'none'`
48-
- Higher thresholds are only useful during development for debugging
46+
- يجب أن تستخدم بيئات الإنتاج دائمًا `'none'`
47+
- فشل البناء يمنع تطبيقك من البناء
48+
- يكتشف المُجمّع تلقائيًا ويتخطى الكود الإشكالي مع `'none'`
49+
- العتبات الأعلى مفيدة فقط أثناء التطوير لتصحيح الأخطاء
4950

5051
---
5152

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

54-
### Production configuration (recommended) {/*production-configuration*/}
55+
### إعداد الإنتاج (موصى به) {/*production-configuration*/}
5556

56-
For production builds, always use `'none'`. This is the default value:
57+
لبيئات الإنتاج، استخدم دائمًا `'none'`. هذه هي القيمة الافتراضية:
5758

5859
```js
5960
{
6061
panicThreshold: 'none'
6162
}
6263
```
6364

64-
This ensures:
65-
- Your build never fails due to compiler issues
66-
- Components that can't be optimized run normally
67-
- Maximum components get optimized
68-
- Stable production deployments
65+
يضمن هذا:
66+
- لن يفشل بناؤك أبدًا بسبب مشاكل المُجمّع
67+
- المكونات التي لا يمكن تحسينها تعمل بشكل طبيعي
68+
- الحد الأقصى من المكونات يتم تحسينها
69+
- نشر إنتاج مستقر
6970

70-
### Development debugging {/*development-debugging*/}
71+
### تصحيح أخطاء التطوير {/*development-debugging*/}
7172

72-
Temporarily use stricter thresholds to find issues:
73+
استخدم مؤقتًا عتبات أكثر صرامة للعثور على المشاكل:
7374

7475
```js
7576
const isDevelopment = process.env.NODE_ENV === 'development';
@@ -84,4 +85,5 @@ const isDevelopment = process.env.NODE_ENV === 'development';
8485
}
8586
}
8687
}
87-
```
88+
```
89+
````

0 commit comments

Comments
 (0)