Skip to content

Translate fragments.md - #128

Closed
BaseMax wants to merge 7 commits into
reactjs:masterfrom
MaxFork:master
Closed

BaseMax wants to merge 7 commits into
reactjs:masterfrom
MaxFork:master

Conversation

@BaseMax

@BaseMax BaseMax commented Jan 18, 2020 •

Copy link
Copy Markdown

Hello,

We worked on below file:
Target: Advanced Guides - Fragments #1

Sorry for #127
Thank you for review and your comment. @sorousht

Demo: https://deploy-preview-128--fa-reactjs.netlify.com/docs/fragments.html

Best,
Max Base

@netlify

netlify Bot commented Jan 18, 2020 •

Copy link
Copy Markdown

Deploy preview for fa-reactjs ready!

Built with commit b44b534

https://deploy-preview-128--fa-reactjs.netlify.com

@BaseMax
BaseMax requested a review from sorousht January 18, 2020 14:00

@sorousht sorousht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@BaseMax عزیز

از زحمتی که برای ترجمه کشیدید متشکرم. هدف اول ما در ترجمه اسناد ری‌اکت کیفیت و مفید بودن آن برای فارسی زبان‌هاست. اگر برای ترجمه وقتی صرف نشود، وقتی که دیگران برای خواندن آن صرف خواهند کرد هم به هدر خواهد رفت.

تمام جملات نیاز به بازنویسی دارند و پیشنهاد می کنم که تلاش بیشتری برای بهبود ترجمه صرف کنید. به عنوان مثال چند جمله را بازنویسی کردم. لطفا به واژه‌نامه ما هم مراجعه کنید.

اگر سوالی بود من در خدمتم

سپاس، سروش

Comment thread content/docs/fragments.md
---

A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding extra nodes to the DOM.
یک الگوی رایج در React این است که یک مؤلفه بتواند عناصر مختلف را برگرداند. قطعات به شما امکان می دهد لیستی از فرزندان را بدون اضافه کردن گره های اضافی به DOM گروه بندی کنید.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

یک الگوی رایج در ری‌اکت این است که که یک کامپوننت، چند المنت را باز گرداند. استفاده از fragment ها به شما این امکان را می‌دهد که چند فرزند را در یک گروه قرار دهید، بدون این‌که یک المنت اضافی به DOM افزوده شود.

Comment thread content/docs/fragments.md
```

There is also a new [short syntax](#short-syntax) for declaring them.
همچنین یک [نحو کوتاه](#short-syntax) برای اعلام آنها وجود دارد.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

همچنین، یک روش نوشتن کوتاه برای تعریف آن وجود دارد.

Comment thread content/docs/fragments.md
## انگیزه {#motivation}

A common pattern is for a component to return a list of children. Take this example React snippet:
یک الگوی رایج برای این است که یک جزء بتواند لیستی از فرزندان را برگرداند. از این مثال نمونه React snippet بگیرید:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

یک الگوی مرسوم برای یک کامپوننت این است که لیستی از فرزند‌ها را بازگرداند. این تکه کد ری‌اکت را به عنوان مثال درنظر بگیرید:

Comment thread content/docs/fragments.md
Comment on lines +41 to +42
دستور `<Columns />` نیاز خواهد بود تا بتوانید چند `<td>` را برگردانید که در خروجی از لحاظ HTML معتبر باشند.
اگر در بخش ارائه از `<Columns />` استفاده کنید, خروجی HTML نادرست خواهد بود.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

کامپوننت Columns باید چندین المنت td را بازگرداند تا HTML رند شده صحیح باشد. اگر در متد render کامپوننت Columns از یک div پدر استفاده شود، HTML تولید شده معتبر نخواهدبود.

به دلیل مشکل در نمایش کامنت، نتونستم Columns و td رو درون تگ قرار بدهم!

@sorousht sorousht closed this Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants