Skip to content

[DONE]: Translating "Quick Start / Index Page" #465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 30, 2023

Conversation

Yarob50
Copy link
Contributor

@Yarob50 Yarob50 commented Apr 26, 2023

🚧 Work in progress

@Yarob50
Copy link
Contributor Author

Yarob50 commented Apr 26, 2023

Hi guys, I need your help..
as you can see in the deployed version the direction is not set to rtl so not only does it align the text to the left side, but also the order of the sentence is missed.

So I was wondering about the right place to fix the direction. should that be done by my side or what?
image

anyone?

@Yarob50
Copy link
Contributor Author

Yarob50 commented Apr 27, 2023

So as mentioned in the last commit, the initial translation of all the sections of the page is complete, I kept the English version of the content, for now, to make it easier for the reviewer to know what was the original sentence and compare it with the translation I made, so I will remove it later at the end.
Also, it still looks messed up with the current LTR direction of the website which I am waiting for the response on.
Waiting for your notes to wrap it up.

@AhmedBaset
Copy link
Collaborator

So I was wondering about the right place to fix the direction. should that be done by my side or what?

In my local environment, I added these lines to src/styles/index.css:

[lang="ar"] :is(h1, h2, h3, h4, h5, h6, p), 
[lang="ar"] :not(code, pre, .sp-layout) :is(ul, ol, li) {
   direction: rtl;
}

@Yarob50
Copy link
Contributor Author

Yarob50 commented Apr 30, 2023

@A7med3bdulBaset
I guess this one should be added as part of the codebase to be there for anyone contributing. Thanks Ahamed.

@AhmedBaset
Copy link
Collaborator

Yesterday, I made a PR for that #470 with some improvements

@Yarob50 Yarob50 changed the title [WIP]: Translating "Quick Start / Index Page" [DONE]: Translating "Quick Start / Index Page" May 3, 2023
@Yarob50
Copy link
Contributor Author

Yarob50 commented May 3, 2023

@3imed-jaberi, the code is now ready for review.
thanks.

Since They used `Yarn` in the original repo. Using anything else like `npm` will generate `package-lock.json` which is not needed.
Please the next time try to use yarn or make sure to not add this file in the commit.
@github-actions
Copy link

github-actions bot commented May 30, 2023

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since They used Yarn in the original repo. Using anything else like npm will generate package-lock.json which is not needed.
Please use yarn in the next time or make sure to not add the lock file in the commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

يُفضل ترجمة النصوص والتعليقات أثناء الكود المضمن، مثلا:

<div>Welcome to my app</div>

إلى

<div>مرحبًا بكم في تطبيقي</div>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

استنادًا إلى قائمة المصطلحات
فإن بعض المصطلحات مثل Rendering يتم ترجمتها على أنها "تصيير".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

هذه الفقرة تحتاج لإعادة نظر


In the above example, style={{}} is not a special syntax, but a regular {} object inside the style={ } JSX curly braces. You can use the style attribute when your styles depend on JavaScript variables.
في المثال الموضح أعلاه style={{}} تمثل بناءً خاصا، يحوي بداخله كائن جافاسكريبت المعروف {} و المعرف بداخل الأقواس المعقوفة الخاصة بال JSX بداخل style={ }. يمكنك استخدام خاصية style عندما يكون التصميم لديك معتمدا على متغير جافاسكريبت.



## Updating the screen {/*updating-the-screen*/}
غالبا ستكون بحاجة أن يقوم المكوّن "بتذكر" المعلومات و عرضها على الشاشة. فمثلا، قد تحتاج إلى عرض عدد المرات التي تم فيها الضغط على زر ما. لتنفيذ ذلك قم بإضافة ما يعرف ب *حالة* أو الـ *state* الخاصة بالمكون:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

الجملة العربية كما تعلم لا تحتاج إلى فعل مساعد، فعادة لا نستخدم "قام بصناعة كذا" وإنما نقول "صنع كذا".
كذلك الجملة "ستكون بحاجة إلى أن يقوم المكون بتذكر ..."
يمكنك أن تقول "ستحتاج أن يتذكر المكون...".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

أهنيك والله على تمكنك من اللغة العربية، شكرا لك


```js
import { useState } from 'react';
```
و الآن يمكنك تعريف *متغير الحالة* أو الـ *state variable* بداخل المكوّن:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

من الأخطاء الإملائية غير المقصودة الشائعة في الترجمة وضع مسافة بعد حرف العطف الواو "و الآن"
الصواب ألا نضع مسافة "والآن"

In the previous example, each `MyButton` had its own independent `count`, and when each button was clicked, only the `count` for the button clicked changed:
## مشاركة البيانات بين المكوّنات {/*sharing-data-between-components*/}

في المثال السابق، كل `MyButton` كان لديه حالة الـ `count` المستقلة الخاصة به، و عندما يتم الضغط على أي منهما حينها يتم تعديل الـ `count` الخاصة بذلك الزر فقط:

<DiagramGroup>

<Diagram name="sharing_data_child" height={367} width={407} alt="Diagram showing a tree of three components, one parent labeled MyApp and two children labeled MyButton. Both MyButton components contain a count with value zero.">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

النص البديل للصور وغيرها من المكونات يحتاج للترجمة

@AhmedBaset AhmedBaset merged commit 0989e6e into reactjs:main May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants