ar.react.dev icon indicating copy to clipboard operation
ar.react.dev copied to clipboard

Upgrade Arabic Repo to Align with React 19

Open Mohamed-Hashem opened this issue 2 months ago • 3 comments

Upgrade Arabic Repo to Align with React 19

📋 Summary

This PR merges the latest updates from the upstream react.dev repository (React 19.0.0) while preserving all existing Arabic translations and fixing all documentation issues.

Demo Live: https://ar-react-dev.vercel.app


⚠️ IMPORTANT: DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will "erase" the commits from main and cause them to appear as conflicts the next time we merge.

This PR contains merge commits from the upstream repository. Squashing these commits will break the git history and cause conflicts in future syncs with the upstream react.dev repository and the @react-translations-bot.

✅ Required merge method: Use "Create a merge commit" or "Rebase and merge"


✨ Changes

✅ Completed

  • Successfully rebased onto latest upstream (all merge conflicts resolved)
  • ✅ Merged upstream React 19.0.0 updates (318 files changed)
  • ✅ Preserved all existing Arabic translations (119+ files)
  • Translated navigation components to Arabic (TopNav, Sidebar, Footer, BrandMenu, Feedback)
  • Fixed all Copilot AI review issues (5 documentation corrections)
  • Resolved all merge conflicts while maintaining commit history
  • ✅ Fixed compilation and TypeScript issues:
    • Fixed mime-db missing db.json issue in postinstall script
    • Fixed JSX runtime compatibility for React 19
    • Fixed TypeScript errors in Icon components (JSX namespace)
    • Added missing dependencies (@types/prop-types, React Compiler dependencies)
    • Resolved ESLint plugin conflict (react-hooks)
    • Fixed Sandpack preview ESLint integration
  • ✅ Updated documentation structure for React 19 features
  • All CI checks passing (prettier, lint, tsc, link validation, heading IDs)
  • All dead links fixed (1774 links validated)

📊 Statistics

  • 318 files changed: +37,224 insertions, -7,130 deletions
  • Arabic translations: Fully preserved and functional
  • New content: React Compiler docs, new blog posts, updated APIs
  • UI localization: Navigation, headers, and sidebar fully translated to Arabic
  • Documentation fixes: 5 typos and inconsistencies corrected
  • Merge conflicts resolved: All conflicts in rebase handled successfully

🔄 New Content Added

React 19 Features

  • React Compiler documentation (installation, configuration, debugging)
  • New React APIs: Activity, ViewTransition, useEffectEvent, cacheSignal, etc.
  • React DOM static prerendering APIs
  • Enhanced server rendering functions

Documentation Updates

  • ESLint plugin documentation (17 pages)
  • React Compiler configuration guides (10 pages)
  • Updated blog posts (6 new posts)
  • Performance tracking tools documentation

🌐 UI Localization Completed

  • ✅ TopNav component (Search, Learn, Reference, Community, Blog)
  • ✅ Sidebar navigation (all sections)
  • ✅ Footer links and labels
  • ✅ BrandMenu component
  • ✅ Feedback widget
  • ✅ Page headings and status tags
  • ✅ Version badges and tooltips

🐛 Documentation Fixes Applied

Based on Copilot AI review feedback:

  1. addTransitionType.md - Fixed incorrect function name in return documentation
  2. ViewTransition.md - Fixed backtick spacing in nested ViewTransition reference
  3. resumeAndPrerenderToNodeStream.md - Removed duplicate article "a a"
  4. resumeAndPrerenderToNodeStream.md - Fixed anchor ID typo (added missing 'o')
  5. resumeAndPrerenderToNodeStream.md - Fixed grammar: "rendering the is" → "rendering is"

Additional Fixes After Rebase

  • startTransition.md - Updated dead link anchor reference
  • react-compiler-beta-release.md - Updated documentation links to new structure
  • form.md - Fixed comment typo
  • use-server.md - Resolved duplicate translation sections
  • hydrateRoot.md - Integrated new error logging documentation

⚠️ Translation Needed

56 new English files require Arabic translation:

Category Count Examples
Blog Posts 6 React 19.2, React Compiler 1.0, React Foundation
Learn Section 8 React Compiler guides, setup documentation
ESLint Plugin 17 Linting rules documentation
React Compiler Config 10 Configuration options
React DOM APIs 8 Server/static rendering functions
React APIs 7 New hooks and components

📄 Complete list: See files-needing-translation.txt


🔧 Technical Details

Dependencies Updated

  • React 19.0.0
  • Next.js 15.1.0
  • TypeScript 5.7.2
  • babel-plugin-react-compiler 1.0.0
  • @codesandbox/sandpack-react 2.20.0

Breaking Changes Handled

  • Removed deprecated APIs: findDOMNode, render, hydrate, createFactory, unmountComponentAtNode
  • Updated JSX runtime for React 19 compatibility
  • Fixed Icon component TypeScript types for React 19
  • Resolved ESLint plugin conflicts with eslint-config-next

ESLint & Sandpack Fixes

  • Removed duplicate react-hooks plugin from .eslintrc (provided by eslint-config-next)
  • Added robust error handling in Sandpack ESLint runner
  • Fixed in-browser linting to gracefully handle missing plugin rules

Rebase Strategy

  • ✅ Used proper git rebase (not squash) to preserve commit references
  • ✅ All merge conflicts resolved manually
  • ✅ Commit history maintained for @react-translations-bot compatibility
  • ✅ All files formatted with Prettier after rebase

✅ Testing & Validation

All CI Checks Passing ✅

✅ yarn install works correctly
✅ yarn dev starts development server
✅ yarn ci-check passes (exit code: 0)
  ├─ ✅ Prettier formatting
  ├─ ✅ ESLint (only pre-existing img warnings)
  ├─ ✅ TypeScript compilation
  ├─ ✅ Heading ID validation
  ├─ ✅ RSS generation
  └─ ✅ Dead link checker (1774 links validated)
✅ Arabic content displays correctly
✅ Sandpack preview boxes function properly
✅ Navigation fully localized to Arabic
✅ All merge conflicts resolved

Mohamed-Hashem avatar Nov 05 '25 21:11 Mohamed-Hashem