From 31d6fe9a4d12e7264ed32a14ebfaa9811b9dc3bc Mon Sep 17 00:00:00 2001 From: Mohamed Abdel Nasser Date: Mon, 6 Jan 2020 02:32:49 +0200 Subject: [PATCH 01/26] translated page title --- content/docs/concurrent-mode-adoption.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index 45d3b0ea3..9d186c433 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -1,6 +1,6 @@ --- id: concurrent-mode-adoption -title: Adopting Concurrent Mode (Experimental) +title: اعتماد الوضع المتزامن (تجريبي) permalink: docs/concurrent-mode-adoption.html prev: concurrent-mode-patterns.html next: concurrent-mode-reference.html From 504f0b4d9218fa5f86a4d39a950cc8eda19de18c Mon Sep 17 00:00:00 2001 From: Mohamed Abdel Nasser Date: Fri, 10 Jan 2020 04:44:25 +0200 Subject: [PATCH 02/26] translated installation section --- content/docs/concurrent-mode-adoption.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index 9d186c433..f42860135 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -15,11 +15,11 @@ next: concurrent-mode-reference.html
->Caution: +> تحذير: > ->This page describes **experimental features that are not yet available in a stable release**. Don't rely on experimental builds of React in production apps. These features may change significantly and without a warning before they become a part of React. +> تصف هذه الصفحة **الميزات التجريبية التي لم تتوفر بعد في إصدار ثابت**. لا تعتمد على تصميمات React التجريبية في تطبيقات الإنتاج. قد تتغير هذه الميزات بشكل كبير ودون سابق إنذار قبل أن تصبح جزءًا من React. > ->This documentation is aimed at early adopters and people who are curious. **If you're new to React, don't worry about these features** -- you don't need to learn them right now. +> هذه الوثائق تهدف إلى تبني أوائل الناس والأشخاص الفضوليين. **إذا كنت جديدًا في React، فلا تقلق بشأن هذه الميزات** -- لست بحاجة إلى تعلمها الآن.
@@ -31,20 +31,21 @@ next: concurrent-mode-reference.html - [Why So Many Modes?](#why-so-many-modes) - [Feature Comparison](#feature-comparison) -## Installation {#installation} +## تنصيب {#installation} -Concurrent Mode is only available in the [experimental builds](/blog/2019/10/22/react-release-channels.html#experimental-channel) of React. To install them, run: +يتوفر وضع التزامن فقط في [الإنشاءات التجريبية](/blog/2019/10/22/react-release-channels.html#experimental-channel) في React. لتثبيتها، قم بتشغيل: ``` npm install react@experimental react-dom@experimental ``` -**There are no semantic versioning guarantees for the experimental builds.** -APIs may be added, changed, or removed with any `@experimental` release. +**لا توجد ضمانات الإصدار الدلالي للبنيات التجريبية.** +يمكن إضافة واجهات برمجة التطبيقات (APIs) أو تغييرها أو إزالتها مع أي إصدار `@experimental`. -**Experimental releases will have frequent breaking changes.** -You can try these builds on personal projects or in a branch, but we don't recommend running them in production. At Facebook, we *do* run them in production, but that's because we're also there to fix bugs when something breaks. You've been warned! +**الإصدارات التجريبية ستتضمن تغييرات متكررة.** + +يمكنك تجربة هذه الإنشاءات على المشاريع الشخصية أو في أحد الفروع، لكننا لا نوصي بتشغيلها في الإنتاج. في فيسبوك، نقوم *بتشغيلها* في الإنتاج، لكن ذلك لأننا أيضًا هناك لإصلاح الأخطاء عندما ينكسر شيء ما. لقد تم تحذيرك! ### Who Is This Experimental Release For? {#who-is-this-experimental-release-for} From 32afd2234c0a8f823aeaef861dc4701d0b288a01 Mon Sep 17 00:00:00 2001 From: Mohamed Abdel Nasser Date: Mon, 13 Jan 2020 18:49:58 +0200 Subject: [PATCH 03/26] finished installation section translation --- content/docs/concurrent-mode-adoption.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index f42860135..1582ce385 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -47,21 +47,21 @@ npm install react@experimental react-dom@experimental يمكنك تجربة هذه الإنشاءات على المشاريع الشخصية أو في أحد الفروع، لكننا لا نوصي بتشغيلها في الإنتاج. في فيسبوك، نقوم *بتشغيلها* في الإنتاج، لكن ذلك لأننا أيضًا هناك لإصلاح الأخطاء عندما ينكسر شيء ما. لقد تم تحذيرك! -### Who Is This Experimental Release For? {#who-is-this-experimental-release-for} +### لمن يكون هذا الإصدار التجريبي؟ {#who-is-this-experimental-release-for} -This release is primarily aimed at early adopters, library authors, and curious people. +يهدف هذا الإصدار في المقام الأول إلى المتبنين في وقت مبكر، ومؤلفي المكتبات ، والأشخاص الفضوليين. -We're using this code in production (and it works for us) but there are still some bugs, missing features, and gaps in the documentation. We'd like to hear more about what breaks in Concurrent Mode so we can better prepare it for an official stable release in the future. +نحن نستخدم هذه الشفرة في الإنتاج (وهو مناسب لنا) ولكن لا تزال هناك بعض الأخطاء والميزات المفقودة والفجوات في الوثائق. نود أن نسمع المزيد حول ما ينقطع في الوضع المتزامن حتى نتمكن من إعداده بشكل أفضل لإصدار رسمي مستقر في المستقبل. -### Enabling Concurrent Mode {#enabling-concurrent-mode} +### تمكين الوضع المتزامن {#enabling-concurrent-mode} -Normally, when we add features to React, you can start using them immediately. Fragments, Context, and even Hooks are examples of such features. You can use in new code without making any changes to the existing code. +عادة، عندما نضيف ميزات إلى React، يمكنك البدء في استخدامها على الفور. الشظايا والسياق وحتى الخطافات هي أمثلة على هذه الميزات. يمكنك استخدام الكود الجديد دون إجراء أي تغييرات على الكود الموجود. -Concurrent Mode is different. It introduces semantic changes to how React works. Otherwise, the [new features](/docs/concurrent-mode-patterns.html) enabled by it *wouldn't be possible*. This is why they're grouped into a new "mode" rather than released one by one in isolation. +الوضع المتزامن مختلف. أنه يقدم تغييرات الدلالية على كيفية عمل React. خلاف ذلك، فإن [الميزات الجديدة](/docs/concurrent-mode-patterns.html) الممكَّنة به *لن تكون ممكنة*. لهذا السبب تم تجميعهم في "وضع" جديد بدلاً من إصدار واحد تلو الآخر في عزلة. -You can't opt into Concurrent Mode on a per-subtree basis. Instead, to opt in, you have to do it in the place where today you call `ReactDOM.render()`. +لا يمكنك الاشتراك في الوضع المتزامن على أساس الشجرة الفرعية. بدلاً من ذلك، للاشتراك، يتعين عليك القيام بذلك في المكان الذي تقوم بنداء فيه اليوم بـ `ReactDOM.render () `. -**This will enable Concurrent Mode for the whole `` tree:** +**سيمكن هذا الوضع المتزامن للشجرة بأكملها ``:** ```js import ReactDOM from 'react-dom'; @@ -77,11 +77,11 @@ ReactDOM.createRoot( ).render(); ``` ->Note: +> ملاحظة: > ->Concurrent Mode APIs such as `createRoot` only exist in the experimental builds of React. +> واجهات برمجة التطبيقات للوضع المتزامن مثل `createRoot` موجودة فقط في البنى التجريبية لـ React. -In Concurrent Mode, the lifecycle methods [previously marked](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html) as "unsafe" actually *are* unsafe, and lead to bugs even more than in today's React. We don't recommend trying Concurrent Mode until your app is [Strict Mode](https://reactjs.org/docs/strict-mode.html)-compatible. +في الوضع المتزامن، تعد أساليب دورة الحياة [التي تم تمييزها مسبقًا](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html) باعتبارها "غير آمنة" في الواقع *تكون* غير آمنة، وتؤدي إلى الخلل أكثر مما كانت عليه في رد فعل اليوم. لا نوصي بتجربة وضع المتزامنة حتى يكون تطبيق [Strict Mode](https://reactjs.org/docs/strict-mode.html) متوافقًا. ## What to Expect {#what-to-expect} From d8a678eef54b6cc5e2103fe52dcbf3379397149a Mon Sep 17 00:00:00 2001 From: Mohamed Abdel Nasser Date: Wed, 15 Jan 2020 02:49:01 +0200 Subject: [PATCH 04/26] translated first section of 'What to Expect' --- content/docs/concurrent-mode-adoption.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index 1582ce385..5788f3694 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -83,21 +83,22 @@ ReactDOM.createRoot( في الوضع المتزامن، تعد أساليب دورة الحياة [التي تم تمييزها مسبقًا](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html) باعتبارها "غير آمنة" في الواقع *تكون* غير آمنة، وتؤدي إلى الخلل أكثر مما كانت عليه في رد فعل اليوم. لا نوصي بتجربة وضع المتزامنة حتى يكون تطبيق [Strict Mode](https://reactjs.org/docs/strict-mode.html) متوافقًا. -## What to Expect {#what-to-expect} +## ماذا تتوقع {#what-to-expect} -If you have a large existing app, or if your app depends on a lot of third-party packages, please don't expect that you can use the Concurrent Mode immediately. **For example, at Facebook we are using Concurrent Mode for the new website, but we're not planning to enable it on the old website.** This is because our old website still uses unsafe lifecycle methods in the product code, incompatible third-party libraries, and patterns that don't work well with the Concurrent Mode. +إذا كان لديك تطبيق كبير موجود، أو إذا كان تطبيقك يعتمد على الكثير من حزم الطرف الثالث ، فالرجاء عدم توقع أنه يمكنك استخدام الوضع المتزامن على الفور. **على سبيل المثال، في Facebook، نستخدم "الوضع المتزامن" لموقع الويب الجديد ، لكننا لا نخطط لتمكينه على الموقع القديم.** وذلك لأن موقعنا القديم لا يزال يستخدم أساليب دورة حياة غير آمنة في رمز المنتج، غير متوافق مكتبات الطرف الثالث، والأنماط التي لا تعمل بشكل جيد مع وضع المتزامنة. -In our experience, code that uses idiomatic React patterns and doesn't rely on external state management solutions is the easiest to get running in the Concurrent Mode. We will describe common problems we've seen and the solutions to them separately in the coming weeks. +من خلال تجربتنا، فإن الشفرة التى تستخدم أنماط رد الفعل الاصطلاحية ولا يعتمد على حلول إدارة الحالة الخارجية هو الأسهل لتشغيله في الوضع المتزامن. سنصف المشكلات الشائعة التي رأيناها والحلول الخاصة بها بشكل منفصل في الأسابيع المقبلة. -### Migration Step: Blocking Mode {#migration-step-blocking-mode} +### خطوة الترحيل: وضع الحظر {#migration-step-blocking-mode} -For older codebases, Concurrent Mode might be a step too far. This is why we also provide a new "Blocking Mode" in the experimental React builds. You can try it by substituting `createRoot` with `createBlockingRoot`. It only offers a *small subset* of the Concurrent Mode features, but it is closer to how React works today and can serve as a migration step. +بالنسبة لقواعد الشفرات القديمة، قد يكون الوضع المتزامن خطوة بعيدة جدًا. هذا هو السبب في أننا نقدم أيضًا "وضع الحظر" الجديد في تصميمات React التجريبية. يمكنك تجربتها عن طريق استبدال `createRoot` بـ` createBlockingRoot`. إنه يقدم مجموعة *صغيرة* فقط من ميزات الوضع المتزامن، ولكنه أقرب إلى كيفية عمل React اليوم ويمكن أن يكون بمثابة خطوة ترحيل. -To recap: -* **Legacy Mode:** `ReactDOM.render(, rootNode)`. This is what React apps use today. There are no plans to remove the legacy mode in the observable future — but it won't be able to support these new features. -* **Blocking Mode:** `ReactDOM.createBlockingRoot(rootNode).render()`. It is currently experimental. It is intended as a first migration step for apps that want to get a subset of Concurrent Mode features. -* **Concurrent Mode:** `ReactDOM.createRoot(rootNode).render()`. It is currently experimental. In the future, after it stabilizes, we intend to make it the default React mode. This mode enables *all* the new features. +لكى نلخص: + +* **الوضع القديم:** `ReactDOM.render ( ، rootNode)`. هذا هو ما تستخدمه تطبيقات React اليوم. لا توجد خطط لإزالة الوضع القديم في المستقبل الذي يمكن ملاحظته - لكنه لن يكون قادرًا على دعم هذه الميزات الجديدة. +* **وضع الحظر:** `ReactDOM.createBlockingRoot(rootNode).render()`. انها حاليا التجريبية. الغرض منه هو خطوة الترحيل الأولى للتطبيقات التي ترغب في الحصول على مجموعة فرعية من ميزات الوضع المتزامن. +* **الوضع المتزامن:** `ReactDOM.createRoot(rootNode).render()`. انها حاليا التجريبية. في المستقبل، بعد استقراره، نعتزم جعله وضع React الافتراضي. يتيح هذا الوضع *جميع* الميزات الجديدة. ### Why So Many Modes? {#why-so-many-modes} From 205fe46401411b606d9136467baf73b1ae5af9e2 Mon Sep 17 00:00:00 2001 From: Mohamed Abdel Nasser Date: Wed, 15 Jan 2020 03:03:17 +0200 Subject: [PATCH 05/26] translated 'Why so many modes' --- content/docs/concurrent-mode-adoption.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index 5788f3694..eae6b4ad9 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -100,13 +100,13 @@ ReactDOM.createRoot( * **وضع الحظر:** `ReactDOM.createBlockingRoot(rootNode).render()`. انها حاليا التجريبية. الغرض منه هو خطوة الترحيل الأولى للتطبيقات التي ترغب في الحصول على مجموعة فرعية من ميزات الوضع المتزامن. * **الوضع المتزامن:** `ReactDOM.createRoot(rootNode).render()`. انها حاليا التجريبية. في المستقبل، بعد استقراره، نعتزم جعله وضع React الافتراضي. يتيح هذا الوضع *جميع* الميزات الجديدة. -### Why So Many Modes? {#why-so-many-modes} +### لماذا العديد من الأوضاع؟ {#why-so-many-modes} -We think it is better to offer a [gradual migration strategy](/docs/faq-versioning.html#commitment-to-stability) than to make huge breaking changes — or to let React stagnate into irrelevance. +نعتقد أنه من الأفضل تقديم [إستراتيجية ترحيل تدريجي](/docs/faq-versioning.html#commitment-to-stability) بدلاً من إجراء تغييرات فادحة هائلة - أو السماح لـ React بالركود إلى غير ذي صلة. -In practice, we expect that most apps using Legacy Mode today should be able to migrate at least to the Blocking Mode (if not Concurrent Mode). This fragmentation can be annoying for libraries that aim to support all Modes in the short term. However, gradually moving the ecosystem away from the Legacy Mode will also *solve* problems that affect major libraries in the React ecosystem, such as [confusing Suspense behavior when reading layout](https://github.com/facebook/react/issues/14536) and [lack of consistent batching guarantees](https://github.com/facebook/react/issues/15080). There's a number of bugs that can't be fixed in Legacy Mode without changing semantics, but don't exist in Blocking and Concurrent Modes. +من الناحية العملية، نتوقع أن تتمكن معظم التطبيقات التي تستخدم الوضع القديم من الانتقال إلى وضع الحظر على الأقل (إن لم يكن الوضع المتزامن). يمكن أن يكون هذا التجزئة مزعجًا بالنسبة للمكتبات التي تهدف إلى دعم جميع الأوضاع على المدى القصير. ومع ذلك، فإن نقل النظام الإيكولوجي تدريجياً بعيدًا عن Legacy Mode سيؤدي أيضًا إلى *حل* المشكلات التي تؤثر على المكتبات الرئيسية في نظام React، مثل [مربكة سلوك Suspense عند قراءة التخطيط](https://github.com/facebook/react/issues / 14536) و [عدم وجود ضمانات مجمعة متسقة](https://github.com/facebook/react/issues/15080). هناك عدد من الأخطاء التي لا يمكن إصلاحها في الوضع القديم دون تغيير الدلالات، ولكن لا توجد في أوضاع الحظر والتزامن. -You can think of the Blocking Mode as a "gracefully degraded" version of the Concurrent Mode. **As a result, in longer term we should be able to converge and stop thinking about different Modes altogether.** But for now, Modes are an important migration strategy. They let everyone decide when a migration is worth it, and upgrade at their own pace. +يمكنك التفكير في وضع الحظر كإصدار "متدهور بأمان" من الوضع المتزامن. **نتيجة لذلك، في المدى الطويل، يجب أن نكون قادرين على التقارب والتوقف عن التفكير في أوضاع مختلفة تمامًا.** لكن في الوقت الحالي، تعد الوسائط استراتيجية ترحيل مهمة. يسمحون للجميع بتحديد متى يستحق الترحيل ، وترقيتهم وفقًا لسرعتهم الخاصة. ### Feature Comparison {#feature-comparison} From 18e5674e6594d03a132eaccbf6cf5aa844581610 Mon Sep 17 00:00:00 2001 From: Mohamed Abdel Nasser Date: Wed, 15 Jan 2020 03:17:04 +0200 Subject: [PATCH 06/26] translated 'feature comparison' --- content/docs/concurrent-mode-adoption.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index eae6b4ad9..7eb773877 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -108,7 +108,7 @@ ReactDOM.createRoot( يمكنك التفكير في وضع الحظر كإصدار "متدهور بأمان" من الوضع المتزامن. **نتيجة لذلك، في المدى الطويل، يجب أن نكون قادرين على التقارب والتوقف عن التفكير في أوضاع مختلفة تمامًا.** لكن في الوقت الحالي، تعد الوسائط استراتيجية ترحيل مهمة. يسمحون للجميع بتحديد متى يستحق الترحيل ، وترقيتهم وفقًا لسرعتهم الخاصة. -### Feature Comparison {#feature-comparison} +### مقارنة الميزة {#feature-comparison}