Skip to content
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 2 commits into from
Feb 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions STYLE-GUIDE.md
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> ارث می‌برد.
Copy link
Member

Choose a reason for hiding this comment

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

هدف اصلی ترجمه معادل سازی مناسب و موجز برای عبارتی مثل state هست. بکار بردن همان عبارت باعث تنزل برگردان به فارسی خواهدشد

Copy link
Collaborator Author

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

Copy link
Member

Choose a reason for hiding this comment

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

@sorousht بله من هم موافق هستم با شما. برخی کلمات معادل سازی مناسبی نخواهند شد پس بهتره عین عبارت بکار برود.
اما در مورد State به نظرم توی برگردان ها جاهایی که مثلا قرار هست در مورد آن صحبت شه بهتر برگردانی شبیه
حالت یا وضعیت
بکار برده شه.
در مورد ترجمه چینی نمیشه بطور قطع نظر داد باید دید که برگردان این عبارت به چینی به چه صورت خواهد شد. ولی توی دایره لغت اونها هم بسیار موارد برگردان شده

Copy link
Collaborator Author

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! :)

Copy link
Collaborator

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.

Copy link
Member

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 :)

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member

@masoud-bahrami masoud-bahrami Feb 12, 2019

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 a React Application .

Component is a term that has come up with many definitions As Martin Fowler said:

When talking about components we run into the difficult definition of what makes a component.

There are different perceptions and definitions of the component.
But the most accepted definition as Martin said is:

A component is a unit of software that is independently replaceable and upgradeable.

In this standpoint, the مولفه can be a proper term.
what's your opinion?

</p>
<br />
<p dir="rtl">
برای لینک‌هایی که معادل فارسی ندارند مثل Stack Overflow و ویدیو‌های YouTube، از همان لینک انگلیسی استفاده‌شود.
</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>