◐ Shell
clean mode source ↗

Modules, introduction by emadpoursina · Pull Request #106 · javascript-tutorial/fa.javascript.info

mahdyar

Choose a reason for hiding this comment

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

Hello @emadpoursina,
Please read the For New Translators section there (#1):

The pull request title should be same as the article, e.g. An Introduction to JavaScript (just like comment)

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@emadpoursina emadpoursina changed the title translate article.md Modules, introduction

Apr 6, 2021

@emadpoursina

mahdyar

Comment on lines +347 to +348

## Build tools
## ابزار های ساخت و ساز

Choose a reason for hiding this comment

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

Please remove the English term after translating it!

Comment on lines 299 to +300

### External scripts
### اسکریپت های اکسترنال

Choose a reason for hiding this comment

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

Please remove the English term after translating it!

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@emadpoursina

mahdyar

- برای بارگزاری اسکریپت های خارجی(external) از منابع دیگر (دامنه/پروتکل/پورت)، هدر های CORS نیاز هستند.
- اسکریپت های مشابه external نادیده گرفته می شوند.
2. ماژول های اسکوپ سطح بالای خود را دارند و از طریق عبارات ‍`import/export` کارایی های خود را با دیگر اسکریپت های به اشتراک می گذارند.
3. Modules always `use strict`.

Choose a reason for hiding this comment

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

Please remove the English term after translating it!

Choose a reason for hiding this comment

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

sorry i will check whole translate again.

Choose a reason for hiding this comment

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

It happens. :) Although I think this was the last one. 🤔

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@emadpoursina

mahdyar

در زمان انتشار، برنامه نویسان معمولا از باندل هایی مانند [Webpack](https://webpack.js.org) برای جمع کردن ماژول ها در کنار هم و بالا بردن کارایی و چند دلیل دیگر استفاده می کنند.

In the next chapter we'll see more examples of modules, and how things can be exported/imported.
در فصل بعد ما مثال های بیشتری از ماژول ها را می بینیم، و اینکه چگونه آن ها صادر/وارد می شوند.

Choose a reason for hiding this comment

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

As you didn't translate import/export in other places, please don't translate it here as well.

```

## Build tools
## ابزار های ساخت و ساز

Choose a reason for hiding this comment

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

ابزارهای ساخت would be enough.

یکی از مزایای استفاده از باندلرها -- اینها به ما کنترل بیشتر بر روی اینکه ماژول ها چگونه اجرا می شوند، می دهد، اجازه اجرا شدن ماژول های برهنه و بسیار کارهای دیگر، مانند ماژول های CSS/HTML.

Build tools do the following:
ابزارهای ساخت برای انجام کارهای زیر:

Choose a reason for hiding this comment

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

ابزارهای ساخت کارهای زیر را می‌کنند: would be a better translation.

Choose a reason for hiding this comment

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

I will write;
ابزارهای ساخت کارهای زیر را انجام می دهند:

```

### Module-level scope
### اسکوپ های سطح ماژول

Choose a reason for hiding this comment

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

محدودهٔ/اسکوپ سطح ماژول

خب، حال با هم یک مثال پیشرفته تر را می بینیم.

Let's say, a module exports an object:
فرض می کنیم که یک ماژول یک آبجکت را صادر می کند:

Choose a reason for hiding this comment

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

Use the term export, صادرکردن may cause misunderstanding.

Choose a reason for hiding this comment

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

I should change all of he صادر to export or just this one??

Choose a reason for hiding this comment

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

Because we use export in persian, what do you think about using finglish: اکسپورت?

Choose a reason for hiding this comment

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

Should i change وارد کردنs to import or just صادرs?

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Yup, change both import and export.
And I think it'd be a good idea to change it everywhere else as well.

@@ -201,23 +201,23 @@ sayHi(); // Ready to serve, *!*Pete*/!*!

### import.meta

Choose a reason for hiding this comment

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

Always translate the titles, since the translation will be in RTL, English doesn't look good that way.
You can use شی import.meta

```

### In a module, "this" is undefined
### در یک ماژول، "this" undefined است

Choose a reason for hiding this comment

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

تعریف‌نشده

Choose a reason for hiding this comment

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

I should change all of he undefined to تعریف نشده or just this one??

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Just this one.

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@emadpoursina

mahdyar

Choose a reason for hiding this comment

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

@javascript-translate-bot

Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉