Modules, introduction#106
Conversation
mahdyar
left a comment
There was a problem hiding this comment.
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)
|
Please make the requested changes. After it, add a comment "/done". |
|
/done |
| ## Build tools | ||
| ## ابزار های ساخت و ساز |
There was a problem hiding this comment.
Please remove the English term after translating it!
| ### External scripts | ||
| ### اسکریپت های اکسترنال |
There was a problem hiding this comment.
Please remove the English term after translating it!
|
Please make the requested changes. After it, add a comment "/done". |
|
/done |
| - برای بارگزاری اسکریپت های خارجی(external) از منابع دیگر (دامنه/پروتکل/پورت)، هدر های CORS نیاز هستند. | ||
| - اسکریپت های مشابه external نادیده گرفته می شوند. | ||
| 2. ماژول های اسکوپ سطح بالای خود را دارند و از طریق عبارات `import/export` کارایی های خود را با دیگر اسکریپت های به اشتراک می گذارند. | ||
| 3. Modules always `use strict`. |
There was a problem hiding this comment.
Please remove the English term after translating it!
There was a problem hiding this comment.
sorry i will check whole translate again.
There was a problem hiding this comment.
It happens. :) Although I think this was the last one. 🤔
|
Please make the requested changes. After it, add a comment "/done". |
|
/done |
| در زمان انتشار، برنامه نویسان معمولا از باندل هایی مانند [Webpack](https://webpack.js.org) برای جمع کردن ماژول ها در کنار هم و بالا بردن کارایی و چند دلیل دیگر استفاده می کنند. | ||
|
|
||
| In the next chapter we'll see more examples of modules, and how things can be exported/imported. | ||
| در فصل بعد ما مثال های بیشتری از ماژول ها را می بینیم، و اینکه چگونه آن ها صادر/وارد می شوند. |
There was a problem hiding this comment.
As you didn't translate import/export in other places, please don't translate it here as well.
| ``` | ||
|
|
||
| ## Build tools | ||
| ## ابزار های ساخت و ساز |
| یکی از مزایای استفاده از باندلرها -- اینها به ما کنترل بیشتر بر روی اینکه ماژول ها چگونه اجرا می شوند، می دهد، اجازه اجرا شدن ماژول های برهنه و بسیار کارهای دیگر، مانند ماژول های CSS/HTML. | ||
|
|
||
| Build tools do the following: | ||
| ابزارهای ساخت برای انجام کارهای زیر: |
There was a problem hiding this comment.
ابزارهای ساخت کارهای زیر را میکنند: would be a better translation.
There was a problem hiding this comment.
I will write;
ابزارهای ساخت کارهای زیر را انجام می دهند:
| ``` | ||
|
|
||
| ### Module-level scope | ||
| ### اسکوپ های سطح ماژول |
| خب، حال با هم یک مثال پیشرفته تر را می بینیم. | ||
|
|
||
| Let's say, a module exports an object: | ||
| فرض می کنیم که یک ماژول یک آبجکت را صادر می کند: |
There was a problem hiding this comment.
Use the term export, صادرکردن may cause misunderstanding.
There was a problem hiding this comment.
I should change all of he صادر to export or just this one??
There was a problem hiding this comment.
Because we use export in persian, what do you think about using finglish: اکسپورت?
There was a problem hiding this comment.
Should i change وارد کردنs to import or just صادرs?
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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 است |
There was a problem hiding this comment.
I should change all of he undefined to تعریف نشده or just this one??
|
Please make the requested changes. After it, add a comment "/done". |
|
/done |
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
No description provided.