From 5ac0732c1a1482f302fab8f75e98dfdba1ff9440 Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Fri, 28 Jun 2019 23:47:33 +0200 Subject: [PATCH 1/8] start translating "How to Contribute" --- content/docs/how-to-contribute.md | 12 ++++++------ content/docs/nav.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index 46d5d626a..90a123b4e 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -1,6 +1,6 @@ --- id: how-to-contribute -title: How to Contribute +title: دليل المساهمين layout: contributing permalink: docs/how-to-contribute.html next: codebase-overview.html @@ -9,15 +9,15 @@ redirect_from: - "tips/introduction.html" --- -React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have. +تعتبر React من أوائل المشاريع مفتوحة المصدر والتي ﻻزالت تحت التطوير المستمر والتي يتم استعمالها في شفرات برمجية للجميع في [facebook.com](https://www.facebook.com). ﻻزلنا مستمرّين في العمل على إصلاح العلل لجعل المُساهمة في هذا المشروع أسهل وأكثر شفافية قدر الإمكان. لم نبلغ ذلك حقّا، لكن نتمنى أن يوضّح هذا المستند مراحل المساهمة ويجيب عن الأسئلة التي يمكن أن تُراودك. -### [Code of Conduct](https://code.facebook.com/codeofconduct) {#code-of-conduct} +### [القواعد السلوكيّة](https://code.facebook.com/codeofconduct) {#code-of-conduct} -Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated. +لقد سطّرت Facebook قواعد للسلوك والتي تتطلع أن يحترمها المساهمون في مشاريعها. من فضلك اقرأ [النص الكامل](https://code.fb.com/codeofconduct/) حتى تتفهم أن بعض الأفعال غير مسموح بها. -### Open Development {#open-development} +### التطوير المفتوح {#open-development} -All work on React happens directly on [GitHub](https://github.com/facebook/react). Both core team members and external contributors send pull requests which go through the same review process. +كل العمل على React يحدث عل موقع[GitHub](https://github.com/facebook/react). كل من الفريق الرئيسي والمساهمون الآخرون يساهمون بإرسال طلبات السحب (Pull requests) والتي تدخل نفس مراحل المراجعة. ### Branch Organization {#branch-organization} diff --git a/content/docs/nav.yml b/content/docs/nav.yml index 21f238099..a98e6ee4e 100644 --- a/content/docs/nav.yml +++ b/content/docs/nav.yml @@ -126,7 +126,7 @@ - title: المساهمة items: - id: how-to-contribute - title: How to Contribute + title: دليل المساهمين - id: codebase-overview title: Codebase Overview - id: implementation-notes From 352e0da6642203ed976a38591734060785880070 Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Sat, 29 Jun 2019 01:21:28 +0200 Subject: [PATCH 2/8] translate to "how-to-get-in-touch" --- content/docs/how-to-contribute.md | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index 90a123b4e..8aebacd20 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -19,42 +19,42 @@ redirect_from: كل العمل على React يحدث عل موقع[GitHub](https://github.com/facebook/react). كل من الفريق الرئيسي والمساهمون الآخرون يساهمون بإرسال طلبات السحب (Pull requests) والتي تدخل نفس مراحل المراجعة. -### Branch Organization {#branch-organization} +### تنظيم الفروع (Branch Organization) {#branch-organization} -We will do our best to keep the [`master` branch](https://github.com/facebook/react/tree/master) in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We recommend that you use [the latest stable version of React](/downloads.html). +نحرص على أن يكون [الفرع الرئيسي (`master` branch)](https://github.com/facebook/react/tree/master) في أفضل حالة، بالاختبارات التي تمرّ بنجاح في كل مرّة. لكن حتى نتقدّم بسرعة، سنحدث تغييرات على الواجهة البرمجية (API) والتي ربما ستجعل تطبيقك غير متوافق معها. ننصحك باستعمال [آخر اصدار مستقر من React](/downloads.html). -If you send a pull request, please do it against the `master` branch. We maintain stable branches for major versions separately but we don't accept pull requests to them directly. Instead, we cherry-pick non-breaking changes from master to the latest stable major version. +من فضلك احرص على أن يكون طلب السحب (pull request) الذي تقوم به نحو الفرع الرئيسي `master`. نُبقي الفروع المستقرّة المختلفة للإصدارات الجذرية لكننا لن نقبل طلبات السحب نحوها مباشرة. بل ننتقي التغييرات التي ﻻ تُحدث تغييرات هدّامة من الفرع الرئيسي إلى آخر اصدار مستقر. -### Semantic Versioning {#semantic-versioning} +### الإدارة الدلالية لنُسخ البرمجيات {#semantic-versioning} -React follows [semantic versioning](https://semver.org/). We release patch versions for bugfixes, minor versions for new features, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. +تتبع React [الإدارة الدلالية لنُسخ البرمجيات](https://semver.org/lang/ar/). نُصدر اصدارات ترقيع (patch versions) عند القيام بإصلاحات للعلل والثغرات، اصدارات صُغرى عند إضافة ميزات ووظائف جديدة، وإصدارات جذرية عند القيام بتغيرات جذرية. عند القيام بتغيير جذري نقوم باستخدام تحذيرات بعدم الصلاحية (deprecation warnings) في الإصدارات الصغرى حتى يعلم مستخدمونا بالتغيرات التي ستطرأ وحتى يرقّوا شفراتهم البرمجية مُسبقا. -We tag every pull request with a label marking whether the change should go in the next [patch](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-patch), [minor](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-minor), or a [major](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-major) version. We release new patch versions every few weeks, minor versions every few months, and major versions one or two times a year. +كل طلب سحب يحمل وسمًا يحدد ما إذا كان سيذهب إلى [الترقيع (patch)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-patch) أو إلى [الإصدار الصغير (minor)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-minor) أو [الإصدار الجذري (major)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-major). نُصدر نسخ الترقيع في كلّ أسبوع ونُصدر الإصدارات الصُغرى كل بضعة أشهر وأما الإصدارات الجذرية تكون مرّة أو مرّتين في السنة. -Every significant change is documented in the [changelog file](https://github.com/facebook/react/blob/master/CHANGELOG.md). +كل تغيير معتبر موثّق في [جدول التغييرات (changelog)](https://github.com/facebook/react/blob/master/CHANGELOG.md). -### Bugs {#bugs} +### العلل (Bugs) {#bugs} -#### Where to Find Known Issues {#where-to-find-known-issues} +#### أين تجد المشاكل المعروفة {#where-to-find-known-issues} -We are using [GitHub Issues](https://github.com/facebook/react/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist. +نستعمل [GitHub Issues](https://github.com/facebook/react/issues) للمشاكل العامّة، نبقى على إطلاع على ذلك ونحاول أن نوضّح الأمر إن كنا بصدد عمل إصلاح داخلي. قبل طرح مهمّة جديدة، حاول أن تتأكد أنه لم يتم طرحها من قبل. -#### Reporting New Issues {#reporting-new-issues} +#### التبليغ عن مشكل جديد {#reporting-new-issues} -The best way to get your bug fixed is to provide a reduced test case. This [JSFiddle template](https://jsfiddle.net/Luktwrdm/) is a great starting point. +تقديم حالة اختبارية موجزة هي أفضل طريقة لإصلاح العلّة التي تواجهك. هذا [النموذج على JSFiddle](https://jsfiddle.net/Luktwrdm/) يُعدّ نقطة بداية مهمّة. -#### Security Bugs {#security-bugs} +#### الثغرات الأمنية {#security-bugs} -Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page. +لدى Facebook [برنامج مكفآت](https://ar-ar.facebook.com/whitehat/) للتبليغ الآمن عن الثغرات الأمنية. وبالتالي يرجى عدم التطرّق لذلك في العلن في (الـ issues). اذهب لتلك الصفحة واتبع الخطوات الموضحة هناك. -### How to Get in Touch {#how-to-get-in-touch} +### سُبُل التواصل {#how-to-get-in-touch} * IRC: [#reactjs on freenode](https://webchat.freenode.net/?channels=reactjs) -* Discussion forum: [discuss.reactjs.org](https://discuss.reactjs.org/) +* منتدى المحادثة: [discuss.reactjs.org](https://discuss.reactjs.org/) -There is also [an active community of React users on the Discord chat platform](https://www.reactiflux.com/) in case you need help with React. +هناك كذلك [مجتمع نشيط من مستخدمي React على منصّة Discord للمحادثة](https://www.reactiflux.com/) إذا ما احتجت للمساعدة فيما يتعلّق بـReact. -### Proposing a Change {#proposing-a-change} +### اقتراح تغيير {#proposing-a-change} If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend [filing an issue](https://github.com/facebook/react/issues/new). This lets us reach an agreement on your proposal before you put significant effort into it. From 27ce3e2e5ba6977ba4daa1cd0eef73a07846d1e4 Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Sat, 6 Jul 2019 01:54:40 +0200 Subject: [PATCH 3/8] translate to "Development Workflow" --- content/docs/how-to-contribute.md | 71 ++++++++++++++++--------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index 8aebacd20..ffc6b3573 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -56,61 +56,62 @@ redirect_from: ### اقتراح تغيير {#proposing-a-change} -If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend [filing an issue](https://github.com/facebook/react/issues/new). This lets us reach an agreement on your proposal before you put significant effort into it. +إن أردت احداث تغيير بالواجهة البرمجية (API)، أو احداث أي تغييرات مُعتَبرة ننصحك [بأن تقدم طلب مُشكلة (issue)](https://github.com/facebook/react/issues/new). هذا يُمكننا من مناقشة اقتراحك قبل أن تستثمر جهدك فيه. -If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend to file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue. +إن كنت تُقدم على إصلاح مشكلة فحسب، ﻻ بأس بإرسال طلب سحب (pull request) مباشرة، لكن من المهم أن تقدم طلب مُشكلة (issue) تُحدّد فيها بالتفصيل ما أنت بصدد إصلاحه. هذا مُهم في حالة ما إذا كنّا ﻻ نقبل ذاك الإصلاح بالتحديد لكن يمكننا الاستمرار في العمل على تلك المُشكلة. -### Your First Pull Request {#your-first-pull-request} +### أول طلب سحب (Pull Request) لك {#your-first-pull-request} -Working on your first Pull Request? You can learn how from this free video series: +هل تعمل على أول طلب سحب (Pull Request) لك؟ يمكنك أن تتعلّم كيفية عمل ذلك من سلسلة الفيديوهات المجانيّة التالية: -**[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)** +**[كيف تُساهم في مشروع مفتوح المصدر على Github (How to Contribute to an Open Source Project on GitHub)](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)** -To help you get your feet wet and get you familiar with our contribution process, we have a list of **[good first issues](https://github.com/facebook/react/issues?q=is:open+is:issue+label:"good+first+issue")** that contain bugs that have a relatively limited scope. This is a great place to get started. +حتى نساعدك في تَبليل قَدَمَيْك (الإنطلاق لأوّل مرّة) وحتى تَعتاد على نظام المُساهمة الخاص بنا، لدينا قائمة **[ببعض المشاكل السهلة على المبتدئين (good first issues)](https://github.com/facebook/react/issues?q=is:open+is:issue+label:"good+first+issue")** والتي تحوي عِلَلا ذات نطاق محدود نسبيّا فتعتبَرُ مكانًا جيدا للإنطلاق منه. -If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don't accidentally duplicate your effort. +إن قررت أن تُصلحَ مُشكلة (issue) قد تم طرحها، من فضلك ألقِ نظرة على النقاش في التعليقات لترى ما إذا كان أحدهم يعمل على إصلاحها. وإن لم يكن أي أحد يعمل عليها في ذلك الحين، الرجاء ترك تعليق بوضّح بأنك تريد العمل عليها حتى ﻻ يكرر الآخرون مَجهوداتك. -If somebody claims an issue but doesn't follow up for more than two weeks, it's fine to take it over but you should still leave a comment. +إن اقرّ أحدهم بأن هناك مشكلة ولم يعقّب على ذلك لأكثر من أسبوعين، ﻻ بأس أن تتناولها أنت لكن يجب عليك أن تَترُك تعليقًا على كلّ حال. -### Sending a Pull Request {#sending-a-pull-request} +### إرسال طلب سحب (Pull Request) {#sending-a-pull-request} -The core team is monitoring for pull requests. We will review your pull request and either merge it, request changes to it, or close it with an explanation. For API changes we may need to fix our internal uses at Facebook.com, which could cause some delay. We'll do our best to provide updates and feedback throughout the process. +يراقب الفريق الرئيسي طلبات السحب (pull requests). سنقوم بمراجعة طلب السحب الخاص بك وبعدها يمكنن أن ندمجه أو نطلب من أن تُحدث تغييرات به، أو يمكن أن نغلقه مع شرح الأسباب. أما التغيّرات التي تمسّ الواجهة البرمجية (API) قد تتطلب منا إحداث تغييرات وإصلاحات في استخدماتنا الداخلية في Facebook.com، والتي قد تُسبب تأخرًا. سنبذل قصارى جهدنا في تقديم التحديثات والنتائج المحصلّة خلال العمليّة. -**Before submitting a pull request,** please make sure the following is done: +**قبل تسجيل طلب السحب،** الرجاء التحقق من إتمام ما يلي: -1. Fork [the repository](https://github.com/facebook/react) and create your branch from `master`. -2. Run `yarn` in the repository root. -3. If you've fixed a bug or added code that should be tested, add tests! -4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. -5. Run `yarn test-prod` to test in the production environment. It supports the same options as `yarn test`. -6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect". -7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). -8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. -9. Run the [Flow](https://flowtype.org/) typechecks (`yarn flow`). -10. If you haven't already, complete the CLA. +1. قم باستنساخ المستودع [المستودع](https://github.com/facebook/react) (بعمل Fork) وبعدها أنشأ الفرع الخاص بك من الفرع الرئيسي `master` +2. نفّذ الأمل `yarn` في مجلّد المستودع. +3. إن أصلحت علّة أو أضفت شيفرة برمجية والتي تحتاج إلى اختبار، أضف الإختبارات. +4. تأكّد من نجاح سلسلة الإختبارات (`yarn test`). نصيحة: `yarn test --watch TestName` مفيدة أثناء التطوير. +5. نفّذ الأمر `yarn test-prod` للإختبار في وضع الإنتاج. الأمر يقبل نفس الخيارات (options) المتوفّرة مع الأمر `yarn test`. +6. إن كنت تحتاج مُنقّحًا، نفّذ `yarn debug-test --watch TestName`، وافتح `chrome://inspect`، ثمّ اضغط على تفحّص(Inspect). +7. نظّم شيفرتك البرمجية مع [prettier](https://github.com/prettier/prettier) بالأمر (`yarn prettier`). +8. تأكّد من أن شيفرتك البرمجية متناسقة بالأمر (`yarn lint`). نصيحة: `yarn linc` للتحقق فقط من الملفّات المُتَغيّرة. +9. نفّذ [Flow](https://flowtype.org/) للتحقق من الأصناف (typechecks) بالأمر (`yarn flow`). +10. راجع اتفاقية ترخيص المساهم (CLA)، إن لم تقم بذلك بعد. -### Contributor License Agreement (CLA) {#contributor-license-agreement-cla} +### اتفاقية ترخيص المساهم (CLA) {#contributor-license-agreement-cla} -In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username. +حتى يتمّ قبول طلب السحب الخاص بك، يجب عليك أولا أن تقوم بتسجيل إتفاقية ترخيص المساهم (CLA). عليك أن تفعل ذلك مرّة واحدة فحسب، لذا لو أردت المشاركة في أحد المشاريع مفتوحة المصدر من Facebook، فستكون جاهزا للإنطلاق. إن كنت تقوم بتسجيل طلب سحب للمرّة الأولى، أخبرنا بأنك أكملت مراجعة الإتفاقية (CLA) وعندها يمكننا أن نتحقق من ذلك باسم المستخدم الخاص بك على Github. -**[Complete your CLA here.](https://code.facebook.com/cla)** +**[أكمل الـCLA الخاصّة بك من هنا](https://code.facebook.com/cla)** -### Contribution Prerequisites {#contribution-prerequisites} +### مُتطلّبات للمساهمة {#contribution-prerequisites} * You have [Node](https://nodejs.org) installed at v8.0.0+ and [Yarn](https://yarnpkg.com/en/) at v1.2.0+. -* You have `gcc` installed or are comfortable installing a compiler if needed. Some of our dependencies may require a compilation step. On OS X, the Xcode Command Line Tools will cover this. On Ubuntu, `apt-get install build-essential` will install the required packages. Similar commands should work on other Linux distros. Windows will require some additional steps, see the [`node-gyp` installation instructions](https://github.com/nodejs/node-gyp#installation) for details. -* You are familiar with Git. +* لديك [Node](https://nodejs.org) مثبّت بنسخته الـv8.0.0+ و [Yarn](https://yarnpkg.com/en/) بالنسخة v1.2.0+. +* لديك `gcc` مُثبّت أو أنت مُعتاد على تثبيت المُتَرجمات (compilers) إذا ما احتجتها. بعض الإعتماديات (dependencies) تحتاج إلى مرحلة تَرجَمة (compilation step). في نظام OS X, طرفية Xcode (Xcode Command Line Tools) ستتكفّل بذلك، على Ubuntu، أمر `apt-get install build-essential` سيثبّت الحزم المطلوبة، أوامر مشابة يمكن أن تشتغل على توزعات لينُكس الأخرى. نظام ويندوز (Windows) سيتطلّب مراحل إضافية، راجع [إرشادات تثبيت `node-gyp`](https://github.com/nodejs/node-gyp#installation) لمزيد من التفاصيل. +* أنت مُعتاد على Git. -### Development Workflow {#development-workflow} +### آليّة التطوير {#development-workflow} -After cloning React, run `yarn` to fetch its dependencies. -Then, you can run several commands: +بعد استنساخ مشروع React على جهازك، نفّذ الأمر `yarn` لتحميل كل إعتماديّاته. +بعدها يمكنك تنفيذ بعض الأوامر: -* `yarn lint` checks the code style. -* `yarn linc` is like `yarn lint` but faster because it only checks files that differ in your branch. -* `yarn test` runs the complete test suite. -* `yarn test --watch` runs an interactive test watcher. -* `yarn test ` runs tests with matching filenames. +* `yarn lint` للتحقق من تنسيق الشيفرة البرمجية. +* `yarn linc` مثل `yarn lint` لكن أسرع ﻷنه يتحقق من الملفّات التي تغيّرت فحسب. +* `yarn test` يشغّل كل سلسلة الإختبارات. +* `yarn test --watch` يشغّل مُراقب الإختبارات التفاعلي (interactive tests watcher). +* `yarn test <نمط(pattern)>` يشغلّ الإختبارات التي الموافقة لاسم الملف. * `yarn test-prod` runs tests in the production environment. It supports all the same options as `yarn test`. * `yarn debug-test` is just like `yarn test` but with a debugger. Open `chrome://inspect` and press "Inspect". * `yarn flow` runs the [Flow](https://flowtype.org/) typechecks. From 7faa0f990561d897f6eda12bc9033ca14a62b37e Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Tue, 23 Jul 2019 20:33:53 +0100 Subject: [PATCH 4/8] finish translating "How to Contribute" --- content/docs/how-to-contribute.md | 74 +++++++++++++++---------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index c66ee9c30..3176302e9 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -112,68 +112,68 @@ redirect_from: * `yarn test` يشغّل كل سلسلة الإختبارات. * `yarn test --watch` يشغّل مُراقب الإختبارات التفاعلي (interactive tests watcher). * `yarn test <نمط(pattern)>` يشغلّ الإختبارات التي الموافقة لاسم الملف. -* `yarn test-prod` runs tests in the production environment. It supports all the same options as `yarn test`. -* `yarn debug-test` is just like `yarn test` but with a debugger. Open `chrome://inspect` and press "Inspect". -* `yarn flow` runs the [Flow](https://flowtype.org/) typechecks. -* `yarn build` creates a `build` folder with all the packages. -* `yarn build react/index,react-dom/index --type=UMD` creates UMD builds of just React and ReactDOM. +* `yarn test-prod` تشغّل الإختبارات في بيئة الإنتاج، تقبل كل خيارات الأمر `yarn test`. +* `yarn debug-test` يُشابه الأمر `yarn test` لكن مع مُنَقّح. افتح `chrome://inspect` ثمّ اضغط على تفحّص(Inspect). +* `yarn flow` يشغّل آلية [Flow](https://flowtype.org/) للتحقق من الأصناف. +* `yarn build` ينشأ مجلّد بناء (`build`) مع كل الحُزم. +* `yarn build react/index,react-dom/index --type=UMD` ينشأ بنيات بناء (UMD) مُكوّنة من React و ReactDOM فقط. -We recommend running `yarn test` (or its variations above) to make sure you don't introduce any regressions as you work on your change. However it can be handy to try your build of React in a real project. +ننصح باستعمال الأمر `yarn test` (أو ما يُشابهه من الأوامر أعلاه) للتأكد من عدم إتلاف أي شيء بينما تعمل على التغييرات التي تقوم بها. على كلّ، سيكون من الأحسن أن تختبر نسختك المبنيّة من React في مشروع حقيقي. -First, run `yarn build`. This will produce pre-built bundles in `build` folder, as well as prepare npm packages inside `build/packages`. +أولا، شغّل الأمر `yarn build`. هذا الأمر سينتج حزما مبنيّة مسبقا في مجلد `build` وستقوم تحضير حزم npm داخل `build/packages`. -The easiest way to try your changes is to run `yarn build react/index,react-dom/index --type=UMD` and then open `fixtures/packaging/babel-standalone/dev.html`. This file already uses `react.development.js` from the `build` folder so it will pick up your changes. +أسهل طريقة لتجربة التغييرات التي قمت بها هي بتشغل الأمر `yarn build react/index,react-dom/index --type=UMD` ثم بفتح `fixtures/packaging/babel-standalone/dev.html`. هذا الملف أصلا يستعمل `react.development.js` من مجلّد `build` حتى يُتابع التغييرات التي تقوم بها. -If you want to try your changes in your existing React project, you may copy `build/dist/react.development.js`, `build/dist/react-dom.development.js`, or any other build products into your app and use them instead of the stable version. If your project uses React from npm, you may delete `react` and `react-dom` in its dependencies and use `yarn link` to point them to your local `build` folder: +إن قررت أن تجرّب تغييراتك على مشروع React مُنشأ مسبقا، يمكنك نسخ `build/dist/react.development.js` و `build/dist/react-dom.development.js` و أيّ من نواتج البناء (build products) ووضعها في تطبيقك ومن ثمّ استعمالها عِوضَ النسخة المستقرّة. إن كان مشروعك يستعمل React من npm، يمكنك حذف `react` و `react-dom` من مُعتمديّاته ثم استعمل `yarn link` لربطها مع مسار مجلّد `build` المحلّي لديك: ```sh -cd ~/path_to_your_react_clone/build/node_modules/react +cd ~/مسار_نسختك_من_react/build/node_modules/react yarn link -cd ~/path_to_your_react_clone/build/node_modules/react-dom +cd ~/مسار_نسختك_من_react/build/node_modules/react-dom yarn link -cd /path/to/your/project +cd /مسار/المشروع/project_مشروع yarn link react react-dom ``` -Every time you run `yarn build` in the React folder, the updated versions will appear in your project's `node_modules`. You can then rebuild your project to try your changes. +في كل مرّة تشغّل فيها الأمر `yarn build` في مجلّد React ستظهر النسخ المُحدّثة في مجلّد `node_modules` داخل مسار مشروعك. تستطيع عندها إعادة بناء مشروعك لتجربة التغييرات التي قُمت بها. -We still require that your pull request contains unit tests for any new functionality. This way we can ensure that we don't break your code in the future. +نؤكّد مجددا أن يتوفّر طلب السحب (pull request) الخاص بك على وحدات اختبار ﻷي ميزة جديدة. بذلك نضمن أننا لن نُعطّل (نفسد) شيفرتك البرمجية في المستقبل. -### Style Guide {#style-guide} +### دليل التنسيق {#style-guide} -We use an automatic code formatter called [Prettier](https://prettier.io/). -Run `yarn prettier` after making any changes to the code. +نستعمل مُنسّق شيفرات برمجية آلي يدعى [Prettier](https://prettier.io/). +شغّل الأمر `yarn prettier` بعد القيام بأية تعديلات تمسّ الشيفرة البرمجية. -Then, our linter will catch most issues that may exist in your code. -You can check the status of your code styling by simply running `yarn linc`. +عندها ستقوم أداة التنسيق (linter) الخاصة بنا بالتقاط أغلب المشاكل التي يمكن أن توجد بشيفرتك البرمجية. +يمكنك عبر الأمر `yarn linc` أن تتحقق من حالة تنسيق شيفرتك البرمجية. -However, there are still some styles that the linter cannot pick up. If you are unsure about something, looking at [Airbnb's Style Guide](https://github.com/airbnb/javascript) will guide you in the right direction. +يمكن لأداة التنسيق (linter) أن تفشل في التقاط بعض التنسيقات، إن كنت غير متأكد من شيء ما، راجع [دليل تنسيق Airbnb](https://github.com/airbnb/javascript) سيقوم بإرشادك إلى الاتجاه الصحيح. -### Introductory Video {#introductory-video} +### فيديو تمهيدي {#introductory-video} -You may be interested in watching [this short video](https://www.youtube.com/watch?v=wUpPsEcGsg8) (26 mins) which gives an introduction on how to contribute to React. +قد تُهمّك مشاهدة [هذا الفيديو القصير](https://www.youtube.com/watch?v=wUpPsEcGsg8) (26 دقيقة) والذي يمكن أن يُعطيك مقدمّة عن المساهمة في React. -#### Video highlights: {#video-highlights} -- [4:12](https://youtu.be/wUpPsEcGsg8?t=4m12s) - Building and testing React locally -- [6:07](https://youtu.be/wUpPsEcGsg8?t=6m7s) - Creating and sending pull requests -- [8:25](https://youtu.be/wUpPsEcGsg8?t=8m25s) - Organizing code -- [14:43](https://youtu.be/wUpPsEcGsg8?t=14m43s) - React npm registry -- [19:15](https://youtu.be/wUpPsEcGsg8?t=19m15s) - Adding new React features +#### أبرز أجزاء الفيديو: {#video-highlights} +- [4:12](https://youtu.be/wUpPsEcGsg8?t=4m12s) - بناء واختبار React محليّا +- [6:07](https://youtu.be/wUpPsEcGsg8?t=6m7s) - إنشاء وإرسال طلبات السحب (pull requests) +- [8:25](https://youtu.be/wUpPsEcGsg8?t=8m25s) - تنظيم الشيفرة البرمجية +- [14:43](https://youtu.be/wUpPsEcGsg8?t=14m43s) - تسجيل React بـnpm (React npm registry) +- [19:15](https://youtu.be/wUpPsEcGsg8?t=19m15s) - إضافة ميزات جديدة لـ React -For a realistic overview of what it _feels_ like to contribute to React for the first time, check out [this entertaining ReactNYC talk](https://www.youtube.com/watch?v=GWCcZ6fnpn4). +لنيل نظرة واقعية عن "ما هو الشعور" عن القيام بالمساهمة في React للمرة الأولى، شاهد [هذه المحاضرة الممتعة من ReactNYC](https://www.youtube.com/watch?v=GWCcZ6fnpn4). -### Request for Comments (RFC) {#request-for-comments-rfc} +### طلب التعليقات (RFC أو Request for Comments) {#request-for-comments-rfc} -Many changes, including bug fixes and documentation improvements can be implemented and reviewed via the normal GitHub pull request workflow. +الكثير من التغييرات بما فيه إصلاحات العلل أو تحسين التوثيق تخضع لنظام طلبات السحب من Github (Github pull request workflow). -Some changes though are "substantial", and we ask that these be put through a bit of a design process and produce a consensus among the React core team. +على الرغم من أن بعض التغييرات "ضرورية" ، فإننا نطلب أن يتم إدخالها قليلاً إلى عملية التصميم وإيجاد توافق في الآراء بين فريق React الأساسي. -The "RFC" (request for comments) process is intended to provide a consistent and controlled path for new features to enter the project. You can contribute by visiting the [rfcs repository](https://github.com/reactjs/rfcs). +يوفّر نظام "طلب التعليقات" (RFC أو Request for Comments) مسارا ثابتا ومؤطّرا للميزات الجديدة لتضاف للمشروع. يمكنك المساهمة بزيارة [rfcs مستودع](https://github.com/reactjs/rfcs), -### License {#license} +### الرخصة {#license} -By contributing to React, you agree that your contributions will be licensed under its MIT license. +بمساهمتك في React، أنت توافق على أن مُساهماتك ستكون تحت رخصة MIT. -### What Next? {#what-next} +### ماذا بعد؟ {#what-next} -Read the [next section](/docs/codebase-overview.html) to learn how the codebase is organized. +إنتقل إلى [القسم التالي](/docs/codebase-overview.html) للتعرف على تنسيق وتنظيم قاعدة الشيفرة البرمجية. From 429fbc1cfaa52b51c539f0f9edb3150e7748e8f1 Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Mon, 29 Jul 2019 15:47:28 +0100 Subject: [PATCH 5/8] fix issues after review --- content/docs/how-to-contribute.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index 3176302e9..9fe7d8268 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -97,7 +97,6 @@ redirect_from: ### مُتطلّبات للمساهمة {#contribution-prerequisites} -* You have [Node](https://nodejs.org) installed at v8.0.0+ and [Yarn](https://yarnpkg.com/en/) at v1.2.0+. * لديك [Node](https://nodejs.org) مثبّت بنسخته الـv8.0.0+ و [Yarn](https://yarnpkg.com/en/) بالنسخة v1.2.0+. * لديك `gcc` مُثبّت أو أنت مُعتاد على تثبيت المُتَرجمات (compilers) إذا ما احتجتها. بعض الإعتماديات (dependencies) تحتاج إلى مرحلة تَرجَمة (compilation step). في نظام OS X, طرفية Xcode (Xcode Command Line Tools) ستتكفّل بذلك، على Ubuntu، أمر `apt-get install build-essential` سيثبّت الحزم المطلوبة، أوامر مشابة يمكن أن تشتغل على توزعات لينُكس الأخرى. نظام ويندوز (Windows) سيتطلّب مراحل إضافية، راجع [إرشادات تثبيت `node-gyp`](https://github.com/nodejs/node-gyp#installation) لمزيد من التفاصيل. * أنت مُعتاد على Git. @@ -137,7 +136,7 @@ yarn link react react-dom في كل مرّة تشغّل فيها الأمر `yarn build` في مجلّد React ستظهر النسخ المُحدّثة في مجلّد `node_modules` داخل مسار مشروعك. تستطيع عندها إعادة بناء مشروعك لتجربة التغييرات التي قُمت بها. -نؤكّد مجددا أن يتوفّر طلب السحب (pull request) الخاص بك على وحدات اختبار ﻷي ميزة جديدة. بذلك نضمن أننا لن نُعطّل (نفسد) شيفرتك البرمجية في المستقبل. +نؤكّد مجددا أن يتوفّر طلب السحب (pull request) الخاص بك على وحدات اختبار ﻷي ميزة جديدة. بذلك نضمن أننا لن نُعطّل شيفرتك البرمجية في المستقبل. ### دليل التنسيق {#style-guide} @@ -168,7 +167,7 @@ yarn link react react-dom على الرغم من أن بعض التغييرات "ضرورية" ، فإننا نطلب أن يتم إدخالها قليلاً إلى عملية التصميم وإيجاد توافق في الآراء بين فريق React الأساسي. -يوفّر نظام "طلب التعليقات" (RFC أو Request for Comments) مسارا ثابتا ومؤطّرا للميزات الجديدة لتضاف للمشروع. يمكنك المساهمة بزيارة [rfcs مستودع](https://github.com/reactjs/rfcs), +يوفّر نظام "طلب التعليقات" (RFC أو Request for Comments) مسارا ثابتا ومؤطّرا للميزات الجديدة لتضاف للمشروع. يمكنك المساهمة بزيارة [rfcs مستودع](https://github.com/reactjs/rfcs). ### الرخصة {#license} From 569c67f7a273205e06a1967afd54deda37a117af Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Mon, 29 Jul 2019 18:11:10 +0100 Subject: [PATCH 6/8] remove original title from "How to Contribute to an Open Source Project on GitHub " --- content/docs/how-to-contribute.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index 9fe7d8268..ea7d272ec 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -64,7 +64,7 @@ redirect_from: هل تعمل على أول طلب سحب (Pull Request) لك؟ يمكنك أن تتعلّم كيفية عمل ذلك من سلسلة الفيديوهات المجانيّة التالية: -**[كيف تُساهم في مشروع مفتوح المصدر على Github (How to Contribute to an Open Source Project on GitHub)](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)** +**[كيف تُساهم في مشروع مفتوح المصدر على Github](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)** حتى نساعدك في تَبليل قَدَمَيْك (الإنطلاق لأوّل مرّة) وحتى تَعتاد على نظام المُساهمة الخاص بنا، لدينا قائمة **[ببعض المشاكل السهلة على المبتدئين (good first issues)](https://github.com/facebook/react/issues?q=is:open+is:issue+label:"good+first+issue")** والتي تحوي عِلَلا ذات نطاق محدود نسبيّا فتعتبَرُ مكانًا جيدا للإنطلاق منه. From e1c1564887ca2d1a37cf15b5e111150e482d88d8 Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Mon, 29 Jul 2019 18:42:10 +0100 Subject: [PATCH 7/8] mention that React is one of Facebook's first oss projects --- content/docs/how-to-contribute.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index ea7d272ec..25bd62bb2 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -9,7 +9,7 @@ redirect_from: - "tips/introduction.html" --- -تعتبر React من أوائل المشاريع مفتوحة المصدر والتي ﻻزالت تحت التطوير المستمر والتي يتم استعمالها في شفرات برمجية للجميع في [facebook.com](https://www.facebook.com). ﻻزلنا مستمرّين في العمل على إصلاح العلل لجعل المُساهمة في هذا المشروع أسهل وأكثر شفافية قدر الإمكان. لم نبلغ ذلك حقّا، لكن نتمنى أن يوضّح هذا المستند مراحل المساهمة ويجيب عن الأسئلة التي يمكن أن تُراودك. +تعتبر React من أوائل المشاريع المفتوحة المصدر من Facebook والتي ﻻزالت تحت التطوير المستمر والتي يتم استعمالها في شفرات برمجية للجميع في [facebook.com](https://www.facebook.com). ﻻزلنا مستمرّين في العمل على إصلاح العلل لجعل المُساهمة في هذا المشروع أسهل وأكثر شفافية قدر الإمكان. لم نبلغ ذلك حقّا، لكن نتمنى أن يوضّح هذا المستند مراحل المساهمة ويجيب عن الأسئلة التي يمكن أن تُراودك. ### [القواعد السلوكيّة](https://code.facebook.com/codeofconduct) {#code-of-conduct} From dc5e71e07e3c131f562ccb6a99fafce6bf12311a Mon Sep 17 00:00:00 2001 From: Fcmam5 Date: Tue, 30 Jul 2019 01:51:33 +0100 Subject: [PATCH 8/8] correct semver words --- content/docs/how-to-contribute.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/how-to-contribute.md b/content/docs/how-to-contribute.md index 25bd62bb2..bb7d00413 100644 --- a/content/docs/how-to-contribute.md +++ b/content/docs/how-to-contribute.md @@ -29,7 +29,7 @@ redirect_from: تتبع React [الإدارة الدلالية لنُسخ البرمجيات](https://semver.org/lang/ar/). نُصدر اصدارات ترقيع (patch versions) عند القيام بإصلاحات للعلل والثغرات، اصدارات صُغرى عند إضافة ميزات ووظائف جديدة، وإصدارات جذرية عند القيام بتغيرات جذرية. عند القيام بتغيير جذري نقوم باستخدام تحذيرات بعدم الصلاحية (deprecation warnings) في الإصدارات الصغرى حتى يعلم مستخدمونا بالتغيرات التي ستطرأ وحتى يرقّوا شفراتهم البرمجية مُسبقا. -كل طلب سحب يحمل وسمًا يحدد ما إذا كان سيذهب إلى [الترقيع (patch)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-patch) أو إلى [الإصدار الصغير (minor)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-minor) أو [الإصدار الجذري (major)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-major). نُصدر نسخ الترقيع في كلّ أسبوع ونُصدر الإصدارات الصُغرى كل بضعة أشهر وأما الإصدارات الجذرية تكون مرّة أو مرّتين في السنة. +كل طلب سحب يحمل وسمًا يحدد ما إذا كان سيذهب إلى [الرُقعة (patch)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-patch) أو إلى [الإصدار الفرعي (minor)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-minor) أو [الإصدار الرئيسي (major)](https://github.com/facebook/react/pulls?q=is:open+is:pr+label:semver-major). نُصدر نسخ الترقيع في كلّ أسبوع ونُصدر الإصدارات الصُغرى كل بضعة أشهر وأما الإصدارات الجذرية تكون مرّة أو مرّتين في السنة. كل تغيير معتبر موثّق في [جدول التغييرات (changelog)](https://github.com/facebook/react/blob/master/CHANGELOG.md).