Skip to content

Commit 55a7437

Browse files
Translate React Labs blog post to Arabic, update sidebar titles for clarity, and enhance documentation links for hooks and server actions.
1 parent 8d2fb96 commit 55a7437

34 files changed

+393
-405
lines changed

files-needing-translation.txt

-120 Bytes
Binary file not shown.

src/components/DocsFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function FooterLink({
8787
/>
8888
<div className="flex flex-col overflow-hidden">
8989
<span className="text-sm font-bold tracking-wide no-underline uppercase text-secondary dark:text-secondary-dark group-focus:text-link dark:group-focus:text-link-dark group-focus:text-opacity-100">
90-
{type === 'Previous' ? 'Previous' : 'Next'}
90+
{type === 'Previous' ? 'السابق' : 'التالي'}
9191
</span>
9292
<span className="text-lg break-words group-hover:underline">
9393
{title}

src/components/Layout/Footer.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -320,50 +320,48 @@ export function Footer() {
320320
</div>
321321
<div className="flex flex-col">
322322
<FooterLink href="/learn" isHeader={true}>
323-
Learn React
323+
تعلم React
324324
</FooterLink>
325-
<FooterLink href="/learn/">Quick Start</FooterLink>
326-
<FooterLink href="/learn/installation">Installation</FooterLink>
325+
<FooterLink href="/learn/">بداية سريعة</FooterLink>
326+
<FooterLink href="/learn/installation">التثبيت</FooterLink>
327327
<FooterLink href="/learn/describing-the-ui">
328-
Describing the UI
328+
وصف واجهة المستخدم (UI)
329329
</FooterLink>
330330
<FooterLink href="/learn/adding-interactivity">
331-
Adding Interactivity
331+
إضافة التفاعلية
332332
</FooterLink>
333-
<FooterLink href="/learn/managing-state">Managing State</FooterLink>
334-
<FooterLink href="/learn/escape-hatches">Escape Hatches</FooterLink>
333+
<FooterLink href="/learn/managing-state">إدارة State</FooterLink>
334+
<FooterLink href="/learn/escape-hatches">مخارج الطوارئ</FooterLink>
335335
</div>
336336
<div className="flex flex-col">
337337
<FooterLink href="/reference/react" isHeader={true}>
338-
API Reference
338+
مرجع API
339339
</FooterLink>
340340
<FooterLink href="/reference/react">React APIs</FooterLink>
341341
<FooterLink href="/reference/react-dom">React DOM APIs</FooterLink>
342342
</div>
343343
<div className="md:col-start-2 xl:col-start-4 flex flex-col">
344344
<FooterLink href="/community" isHeader={true}>
345-
Community
345+
المجتمع
346346
</FooterLink>
347347
<FooterLink href="https://github.com/facebook/react/blob/main/CODE_OF_CONDUCT.md">
348-
Code of Conduct
348+
ميثاق السلوك
349349
</FooterLink>
350-
<FooterLink href="/community/team">Meet the Team</FooterLink>
350+
<FooterLink href="/community/team">تعرف على الفريق</FooterLink>
351351
<FooterLink href="/community/docs-contributors">
352-
Docs Contributors
353-
</FooterLink>
354-
<FooterLink href="/community/acknowledgements">
355-
Acknowledgements
352+
المساهمون في التوثيق
356353
</FooterLink>
354+
<FooterLink href="/community/acknowledgements">شكر وتقدير</FooterLink>
357355
</div>
358356
<div className="flex flex-col">
359-
<FooterLink isHeader={true}>More</FooterLink>
360-
<FooterLink href="/blog">Blog</FooterLink>
357+
<FooterLink isHeader={true}>المزيد</FooterLink>
358+
<FooterLink href="/blog">المدونة</FooterLink>
361359
<FooterLink href="https://reactnative.dev/">React Native</FooterLink>
362360
<FooterLink href="https://opensource.facebook.com/legal/privacy">
363-
Privacy
361+
الخصوصية
364362
</FooterLink>
365363
<FooterLink href="https://opensource.fb.com/legal/terms/">
366-
Terms
364+
الشروط
367365
</FooterLink>
368366
<div className="flex flex-row items-center mt-8 gap-x-2">
369367
<ExternalLink

src/components/Layout/HomeContent.js

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

src/components/Layout/Toc.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function Toc({headings}: {headings: Toc}) {
2323
<nav role="navigation" className="pt-20 sticky top-0 end-0">
2424
{headings.length > 0 && (
2525
<h2 className="mb-3 lg:mb-3 uppercase tracking-wide font-bold text-sm text-secondary dark:text-secondary-dark px-4 w-full">
26-
On this page
26+
في هذه الصفحة
2727
</h2>
2828
)}
2929
<div

src/components/MDX/BlogCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function BlogCard({title, badge, date, icon, url, children}: BlogCardProps) {
6666
{date}
6767
{badge ? (
6868
<div className="h-fit px-1 bg-highlight dark:bg-highlight-dark rounded uppercase text-link dark:text-link-dark font-bold tracking-wide text-xs whitespace-nowrap">
69-
New
69+
جديد
7070
</div>
7171
) : null}
7272
</div>
@@ -75,7 +75,7 @@ function BlogCard({title, badge, date, icon, url, children}: BlogCardProps) {
7575
</span>
7676
{children != null && (
7777
<div className="text-link text-base dark:text-link-dark hover:underline mt-4">
78-
Read more
78+
اقرأ المزيد
7979
</div>
8080
)}
8181
</div>

src/components/MDX/Challenges/Challenge.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function Challenge({
5757
className="text-xl text-primary dark:text-primary-dark mb-2 mt-0 font-medium"
5858
id={currentChallenge.id}>
5959
<div className="font-bold block md:inline">
60-
{isRecipes ? 'Example' : 'Challenge'} {currentChallenge.order} of{' '}
60+
{isRecipes ? 'مثال' : 'تحدي'} {currentChallenge.order} من{' '}
6161
{totalChallenges}
6262
<span className="text-primary dark:text-primary-dark">: </span>
6363
</div>
@@ -70,14 +70,14 @@ export function Challenge({
7070
<div>
7171
<Button className="me-2" onClick={toggleHint} active={showHint}>
7272
<IconHint className="me-1.5" />{' '}
73-
{showHint ? 'Hide hint' : 'Show hint'}
73+
{showHint ? 'إخفاء التلميح' : 'إظهار التلميح'}
7474
</Button>
7575
<Button
7676
className="me-2"
7777
onClick={toggleSolution}
7878
active={showSolution}>
7979
<IconSolution className="me-1.5" />{' '}
80-
{showSolution ? 'Hide solution' : 'Show solution'}
80+
{showSolution ? 'إخفاء الحل' : 'إظهار الحل'}
8181
</Button>
8282
</div>
8383
) : (
@@ -87,7 +87,7 @@ export function Challenge({
8787
onClick={toggleSolution}
8888
active={showSolution}>
8989
<IconSolution className="me-1.5" />{' '}
90-
{showSolution ? 'Hide solution' : 'Show solution'}
90+
{showSolution ? 'إخفاء الحل' : 'إظهار الحل'}
9191
</Button>
9292
)
9393
)}
@@ -101,7 +101,7 @@ export function Challenge({
101101
)}
102102
onClick={handleClickNextChallenge}
103103
active>
104-
Next {isRecipes ? 'Example' : 'Challenge'}
104+
{isRecipes ? 'المثال' : 'التحدي'} التالي
105105
<IconArrowSmall displayDirection="end" className="block ms-1.5" />
106106
</Button>
107107
)}
@@ -111,13 +111,11 @@ export function Challenge({
111111
{showSolution && (
112112
<div className="mt-6">
113113
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
114-
Solution
114+
الحل
115115
</h3>
116116
{currentChallenge.solution}
117117
<div className="flex justify-between items-center mt-4">
118-
<Button onClick={() => setShowSolution(false)}>
119-
Close solution
120-
</Button>
118+
<Button onClick={() => setShowSolution(false)}>إغلاق الحل</Button>
121119
{hasNextChallenge && (
122120
<Button
123121
className={cn(

src/components/MDX/Challenges/Challenges.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function Challenges({
8888
children,
8989
isRecipes,
9090
noTitle,
91-
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
91+
titleText = isRecipes ? 'جرّب بعض الأمثلة' : 'جرّب بعض التحديات',
9292
titleId = isRecipes ? 'examples' : 'challenges',
9393
}: ChallengesProps) {
9494
const challenges = parseChallengeContents(children);

src/components/MDX/ExpandableCallout.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ interface ExpandableCalloutProps {
3535

3636
const variantMap = {
3737
deprecated: {
38-
title: 'Deprecated',
38+
title: 'منتهي الصلاحية',
3939
Icon: IconWarning,
4040
containerClasses: 'bg-red-5 dark:bg-red-60 dark:bg-opacity-20',
4141
textColor: 'text-red-50 dark:text-red-40',
4242
overlayGradient:
4343
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
4444
},
4545
note: {
46-
title: 'Note',
46+
title: 'ملاحظة',
4747
Icon: IconNote,
4848
containerClasses:
4949
'bg-green-5 dark:bg-green-60 dark:bg-opacity-20 text-primary dark:text-primary-dark text-lg',
@@ -70,7 +70,7 @@ const variantMap = {
7070
'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
7171
},
7272
experimental: {
73-
title: 'Experimental Feature',
73+
title: 'ميزة تجريبية',
7474
Icon: IconCanary,
7575
containerClasses:
7676
'bg-green-5 dark:bg-green-60 dark:bg-opacity-20 text-primary dark:text-primary-dark text-lg',
@@ -79,15 +79,15 @@ const variantMap = {
7979
'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
8080
},
8181
pitfall: {
82-
title: 'Pitfall',
82+
title: 'مأزق',
8383
Icon: IconPitfall,
8484
containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
8585
textColor: 'text-yellow-50 dark:text-yellow-40',
8686
overlayGradient:
8787
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
8888
},
8989
wip: {
90-
title: 'Under Construction',
90+
title: 'قيد الإنشاء',
9191
Icon: IconNote,
9292
containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
9393
textColor: 'text-yellow-50 dark:text-yellow-40',

src/components/MDX/ExpandableExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
7878
{isDeepDive && (
7979
<>
8080
<IconDeepDive className="inline me-2 dark:text-purple-30 text-purple-40" />
81-
Deep Dive
81+
غوص عميق
8282
</>
8383
)}
8484
{isExample && (
8585
<>
8686
<IconCodeBlock className="inline me-2 dark:text-yellow-30 text-yellow-50" />
87-
Example
87+
مثال
8888
</>
8989
)}
9090
</h5>

0 commit comments

Comments
 (0)