-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add STYLE-GUID.md #4
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<h1 dir="rtl">شیوه نگارش</h1> | ||
|
||
<p dir="rtl"> | ||
برای حفظ یکپارچگی ترجمه در تمام صفحات و همچنین میان سایر زبانها، لطفا قوانین زیر را مدنظر داشتهباشید. | ||
</p> | ||
|
||
<h2 dir="rtl">شناسه عنوانها</h2> | ||
|
||
<p dir="rtl">هر عنوانی یک شناسه منحصربهفرد دارد، مانند زیر:</p> | ||
|
||
```md | ||
## Try React {#try-react} | ||
``` | ||
<p dir="rtl">از ترجمه شناسهها <b>بپرهیزید</b>! از آنها برای هدایت به بخشهای مختلف یک صفحه استفاده میشود. به خصوص اگر کاربر از یک لینک خارجی به یک بخش مورد نظر از صفحه هدایت شدهباشد، این قابلیت از کار خواهد افتاد.</p> | ||
|
||
|
||
<p dir="rtl">✅ صحیح:</p> | ||
|
||
```md | ||
## ریاکت را امتحان کنید {#try-react} | ||
``` | ||
|
||
<p dir="rtl">❌ غلط:</p> | ||
|
||
```md | ||
## ریاکت را امتحان کنید {#react-ra-emtehan-konid} | ||
``` | ||
<p dir="rtl">ترجمه باعث از کار افتادن لینک بالا شدهاست.</p> | ||
|
||
|
||
<h2 dir="rtl">متن در کد</h2> | ||
<p dir="rtl"> | ||
فقط کامنتهای یک کد را ترجمه کنید. از ترجمه دیگر بخشهای کد بپرهیزید. | ||
</p> | ||
|
||
<p dir="rtl">مثال:</p> | ||
|
||
```js | ||
// Example | ||
const element = <h1>Hello, world</h1>; | ||
ReactDOM.render(element, document.getElementById('root')); | ||
``` | ||
|
||
<p dir="rtl">✅ صحیح:</p> | ||
|
||
```js | ||
// مثال | ||
const element = <h1>Hello, world</h1>; | ||
ReactDOM.render(element, document.getElementById('root')); | ||
``` | ||
|
||
<p dir="rtl">❌ غلط:</p> | ||
|
||
```js | ||
// مثال | ||
const element = <h1>سلام، دنیا</h1>; | ||
ReactDOM.render(element, document.getElementById('root')); | ||
``` | ||
|
||
<p dir="rtl">❌ غلط:</p> | ||
|
||
```js | ||
// مثال | ||
const element = <h1>سلام، دنیا</h1>; | ||
// "root" به شناسه یک تگ اشاره دارد | ||
// نباید آن را ترجمه کرد! | ||
ReactDOM.render(element, document.getElementById('ریشه')); | ||
``` | ||
|
||
<p dir="rtl">❌ کاملا غلط:</p> | ||
|
||
```js | ||
// مثال | ||
const eleman = <h1>سلام، دنیا</h1>; | ||
ReactDOM.render(eleman, sanad.yaftanElemeanBaId('ریشه')); | ||
|
||
``` | ||
<h2 dir="rtl">لینکهای خارجی</h2> | ||
<p dir="rtl"> | ||
اگر یک لینک خارجی به یک مقاله از منابعی مانند <a href="https://developer.mozilla.org/fa/" taget="_blank">شبکه توسعهدهنگان موزیلا (MDN)</a> و <a href="https://en.wikipedia.org/wiki/Main_Page" taget="_blank">ویکیپدیا (Wikipedia)</a> ارجاع داده شدهاست، در صورتی که نسخه فارسی آن مقاله موجود و از کیفیت مناسبی برخوردار است، به نسخه فارسی ارجاع دادهشود. | ||
</p> | ||
|
||
<p dir="rtl">مثال:</p> | ||
|
||
<p> | ||
A stateful component inherits <code>Component</code> <a href="https://en.wikipedia.org/wiki/Class_(computer_programming)" target="_blank">class</a>. | ||
</p> | ||
|
||
|
||
|
||
<p dir="rtl">✅ صحیح:</p> | ||
<p dir="rtl"> | ||
یک کامپوننت دارای state از <a href="https://fa.wikipedia.org/wiki/%DA%A9%D9%84%D8%A7%D8%B3_(%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C)" target="_blank">کلاس</a> <code>Component</code> ارث میبرد. | ||
</p> | ||
<br /> | ||
<p dir="rtl"> | ||
برای لینکهایی که معادل فارسی ندارند مثل Stack Overflow و ویدیوهای YouTube، از همان لینک انگلیسی استفادهشود. | ||
sorousht marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</p> | ||
|
||
<h2 dir="rtl">زبان فارسی</h2> | ||
<p dir="rtl"> | ||
هدف تمام مشارکتکنندگان تولید محتوای فارسی با بهترین کیفیت ممکن است تا به منبعی قابل استفاده برای همگان تبدیل شود. قطعا دستیابی به این هدف بدون رعایت شیوه نگارش استاندارد فارسی میسر نخواهدشد. اگر نیاز به یک یادآوری داشتید، مقاله <a href="https://virastaran.net/a/v/m/e/eh/148/" target="_blank">شیوهنامۀ «ویراستاران» برای نگارش در وب</a> منبع مناسبی است. | ||
</p> | ||
<p dir="rtl"> | ||
اگر فکر میکنید چیزی فراموش شدهاست یا نیاز به تصحیح دارد، حتما نظر خود را با ما درمیان بگذارید. | ||
</p> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
هدف اصلی ترجمه معادل سازی مناسب و موجز برای عبارتی مثل state هست. بکار بردن همان عبارت باعث تنزل برگردان به فارسی خواهدشد
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@masoud-bahrami Some technical words do not have any proper translation in Persian context. In these cases, I myself prefer using the original word to avoid any confusion. Please, take a look at the following link. The simplified Chinese team used the same idea. They wrote a list of words that do not require to be translated.
reactjs/zh-hans.react.dev#2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorousht بله من هم موافق هستم با شما. برخی کلمات معادل سازی مناسبی نخواهند شد پس بهتره عین عبارت بکار برود.
اما در مورد
State
به نظرم توی برگردان ها جاهایی که مثلا قرار هست در مورد آن صحبت شه بهتر برگردانی شبیهحالت
یاوضعیت
بکار برده شه.
در مورد ترجمه چینی نمیشه بطور قطع نظر داد باید دید که برگردان این عبارت به چینی به چه صورت خواهد شد. ولی توی دایره لغت اونها هم بسیار موارد برگردان شده
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@masoud-bahrami @Schabaani @zahrajoulaei We have to discuss this challenging topic! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would agree to use English words as few as possible in the translated text, but it is inevitable that we can not find a replacement for all of them, here we also have a problem with the word "component" for example. My suggestion would be using a valid dictionary which includes a significant number of web/computer worlds translated to the Persian language.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorousht @Schabaani @zahrajoulaei the most challenging part of translation is finding appropriate translation for terms such as
Declarative
. As I said before glossary is very important, we should spend more time. I agree that the Glossary will be completed gradually. Bu at least it should contains more item in it :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vachak can be helpful. It has been developed by a couple of my friends who have had very good and useful experiences (for example ضروریات اسکرام) in translating computer works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zahrajoulaei For the
component
word, the phraseمولفه
is common in the community.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I hear component I imagine a small UI. But مولفه doesn't show it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Schabaani
component
is the Building Block of React. It is the Separation of Concern(SoC) for aReact Application
.Component
is a term that has come up with many definitions As Martin Fowler said:There are different perceptions and definitions of the
component
.But the most accepted definition as Martin said is:
In this standpoint, the
مولفه
can be a proper term.what's your opinion?