From fe291e58347f71c13678a5d36072386634a8d5c4 Mon Sep 17 00:00:00 2001 From: Gasim Gasimzada Date: Thu, 13 Feb 2020 22:27:06 +0400 Subject: [PATCH 1/6] Translate Hello World page --- .../1-hello-alert/solution.view/index.html | 2 +- .../01-hello-world/1-hello-alert/task.md | 6 +- .../01-hello-world/2-hello-alert-ext/alert.js | 2 +- .../2-hello-alert-ext/solution.md | 4 +- .../01-hello-world/2-hello-alert-ext/task.md | 6 +- 1-js/02-first-steps/01-hello-world/article.md | 84 +++++++++---------- 6 files changed, 52 insertions(+), 52 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html index 45e6744b3..7463e6097 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html @@ -4,7 +4,7 @@ diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md index afed6a91d..b96aaa794 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md @@ -2,11 +2,11 @@ importance: 5 --- -# Show an alert +# Xəbərdarlıq göstər -Create a page that shows a message "I'm JavaScript!". +"Mən JavaScript-əm!" mesajı göstərən səhifə yaradın. -Do it in a sandbox, or on your hard drive, doesn't matter, just ensure that it works. +Bunu ya sandbox-da, ya da öz maşınınızda tətbiq edin. Skriptin işlədiyindən əmin olun. [demo src="solution"] diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js index 4de725971..a563b589d 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js @@ -1 +1 @@ -alert("I'm JavaScript!"); \ No newline at end of file +alert("Mən JavaScript-əm!"); \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md index f42c41e6d..a3dd75e2a 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md @@ -1,8 +1,8 @@ -The HTML code: +HTML kod: [html src="index.html"] -For the file `alert.js` in the same folder: +Eyni direktoriyada yerlşən `alert.js` faylı: [js src="alert.js"] diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md index 26168d6a7..fd0005607 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md @@ -2,8 +2,8 @@ importance: 5 --- -# Show an alert with an external script +# Xəbərdarlığı kənar skriptdən göstər -Take the solution of the previous task . Modify it by extracting the script content into an external file `alert.js`, residing in the same folder. +Əvvəlki tapşırığında olan skripti eyni direktoriyada olan `alert.js` faylına ixrac edin. -Open the page, ensure that the alert works. +Səhifəni açıb xəbərdarlığın işlədiyindən əmin olun. diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index f5487b915..ace3421c0 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -1,17 +1,17 @@ -# Hello, world! +# Salam dünya! -This part of the tutorial is about core JavaScript, the language itself. +Dərsliyin bu hissəsində JavaScript dilinin özündən danışılır. -But we need a working environment to run our scripts and, since this book is online, the browser is a good choice. We'll keep the amount of browser-specific commands (like `alert`) to a minimum so that you don't spend time on them if you plan to concentrate on another environment (like Node.js). We'll focus on JavaScript in the browser in the [next part](/ui) of the tutorial. +Lakin, skriptləri icra etmək üçün biz işlək mühit lazımdır. Bu kitabın onlayn olduğundan bu skriptləri brauzerdə icra edəcəyik. Sizin fərqli mühitə (Node.js kimi) keçmək istədikdə brauzerə xas əmrlərin (`alert` kimi) üzərində çox vaxt xərcləməməniz üçün biz bu əmrləri çox az işlədəcəyik. Dərsliyin [sonrakı bölməsində](/ui) brauzerdə JavaScript haqqında danışacağıq. -So first, let's see how we attach a script to a webpage. For server-side environments (like Node.js), you can execute the script with a command like `"node my.js"`. +Gəlin ilk olaraq skripti səhifəyə qoşaq. Server mühitlərində (Node.js kimi) skripti `"node my.js"` formalı əmr ilə icra edə bilərsiniz. -## The "script" tag +## "script" təqi -JavaScript programs can be inserted into any part of an HTML document with the help of the ` */!* -

...After the script.

+

...Skriptdən sonra.

@@ -35,24 +35,24 @@ For instance: ``` ```online -You can run the example by clicking the "Play" button in the right-top corner of the box above. +Yuxarıdakı qutunun yuxarı sağ küncündə yerləşən "Play" düyməsini tıklayaraq bu nümunəni icra edə bilərsiniz. ``` -The ` ``` - This trick isn't used in modern JavaScript. These comments hide JavaScript code from old browsers that didn't know how to process the ` ``` -Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder. +Burada, `/path/to/script.js` dəyəri saytın kökündən absolut yol ilə skript faylına istinad edir. Əlavə olaraq, cari səhifədən nisbi yerləşən fayla da istinad etmək olar. Məsələn, `src="script.js"` dəyəri `"script.js"` faylının cari direktoriyada olması deməkdir. -We can give a full URL as well. For instance: +Biz, tam skriptin mənbəsini tam URL ilə də təyin edə bilərik. Məsələn: ```html ``` -To attach several scripts, use multiple tags: +Bir neçə skripti qoşmaq üçün bir neçə təqdən istifadə edin: ```html @@ -90,29 +90,29 @@ To attach several scripts, use multiple tags: ``` ```smart -As a rule, only the simplest scripts are put into HTML. More complex ones reside in separate files. +Qayda olaraq yalnız çox sadə skriptləri HTML faylında saxlayın. Daha mürəkkəb skriptləri fərqli fayllarda saxlayın. -The benefit of a separate file is that the browser will download it and store it in its [cache](https://en.wikipedia.org/wiki/Web_cache). +Skripti kənarda saxladıqda brauzer faylı yükləyib öz [kəşində](https://en.wikipedia.org/wiki/Web_cache) saxlayacaq. -Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once. +Eyni skripti yükləyən digər səhifələr skripti yükləmək əvəzinə kəşdən oxuyacaq. Bu səbəbdən skript faylı yalnız bir dəfə yüklənəcək. -That reduces traffic and makes pages faster. +Bu, trafiki azaldaraq səhifəni tezləşdirəcək. ``` -````warn header="If `src` is set, the script content is ignored." -A single ` ``` -We must choose either an external ` @@ -122,11 +122,11 @@ The example above can be split into two scripts to work: ``` ```` -## Summary +## Xülasə -- We can use a ``. +- JavaScript kodunu səhifəyə əlavə etmək üçün `` təqi ilə yükləmək mümkündür. -There is much more to learn about browser scripts and their interaction with the webpage. But let's keep in mind that this part of the tutorial is devoted to the JavaScript language, so we shouldn't distract ourselves with browser-specific implementations of it. We'll be using the browser as a way to run JavaScript, which is very convenient for online reading, but only one of many. +Brauzer skriptləri və onların veb səhifə ilə interaksiyası haqqında öyrənilməli daha çox məlumat var. Lakin, dərsliyin bu hissəsinin JavaScript dilinə hərs olunduğu üçün biz brauzerə xas tətbiqlərə fokuslanmayacağıq. Biz JavaScript kodunu icra etmək üçün brauzerdən istifadə edəcəyik. Brauzerdə icra etdikdə icra olunan skriptləri onlayn oxumaq olur. Lakin, skriptləri başqa formalarda da icra etmək mümkündür. From 3f152104a0b5145a02365f1d8734cb52e42443af Mon Sep 17 00:00:00 2001 From: Gasim Gasimzada Date: Thu, 13 Feb 2020 22:28:09 +0400 Subject: [PATCH 2/6] Fix external scripts header --- 1-js/02-first-steps/01-hello-world/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index ace3421c0..84b752141 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -63,7 +63,7 @@ Skriptlərdən öncə və sonra kommentlər. Modern JavaScript-də bu fokusdan istifadə edilmir. Bu kommentlər ` */!* @@ -46,7 +46,7 @@ Brauzer ` ``` - Modern JavaScript-də bu fokusdan istifadə edilmir. Bu kommentlər ` @@ -92,7 +92,7 @@ Bir neçə skripti qoşmaq üçün bir neçə təqdən istifadə edin: ```smart Qayda olaraq yalnız çox sadə skriptləri HTML faylında saxlayın. Daha mürəkkəb skriptləri fərqli fayllarda saxlayın. -Skripti kənarda saxladıqda brauzer faylı yükləyib öz [kəşində](https://en.wikipedia.org/wiki/Web_cache) saxlayacaq. +Skripti kənarda saxladıqda brauzer, faylı yükləyib öz [kəşində](https://en.wikipedia.org/wiki/Web_cache) saxlayacaq. Eyni skripti yükləyən digər səhifələr skripti yükləmək əvəzinə kəşdən oxuyacaq. Bu səbəbdən skript faylı yalnız bir dəfə yüklənəcək. @@ -100,7 +100,7 @@ Bu, trafiki azaldaraq səhifəni tezləşdirəcək. ``` ````warn header="`src` atributu təyin edildikdə skriptin kontenti sayılmır." -Tək ` ``` -Biz ya kənar skripti yükləyən `` təqi ilə yükləmək mümkündür. -Brauzer skriptləri və onların veb səhifə ilə interaksiyası haqqında öyrənilməli daha çox məlumat var. Lakin, dərsliyin bu hissəsinin JavaScript dilinə hərs olunduğu üçün biz brauzerə xas tətbiqlərə fokuslanmayacağıq. Biz JavaScript kodunu icra etmək üçün brauzerdən istifadə edəcəyik. Brauzerdə icra etdikdə icra olunan skriptləri onlayn oxumaq olur. Lakin, skriptləri başqa formalarda da icra etmək mümkündür. +Brauzer skriptləri və onların veb səhifə ilə interaksiyası haqqında öyrənilməli daha çox məlumat var. Lakin, dərsliyin bu hissəsinin JavaScript dilinə hərs olunduğu üçün biz brauzerə xas tətbiqlərə fokuslanmayacağıq. Biz JavaScript kodunu icra etmək üçün brauzerdən istifadə edəcəyik. Brauzerdən istifadə etdikdə icra olunan skriptləri onlayn oxumaq olur. Lakin, skriptləri başqa mühitlərdə də icra etmək mümkündür. From 64237d2af090a9e08e21edfc048d61825abd902b Mon Sep 17 00:00:00 2001 From: Gasim Gasimzada Date: Fri, 14 Feb 2020 15:38:30 +0400 Subject: [PATCH 4/6] Fix Hello World translationa after another self-review --- 1-js/02-first-steps/01-hello-world/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index a815687a0..6f0c38214 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -73,7 +73,7 @@ Skript faylları HTML-ə `src` atributu ilə qoşulurlar: ``` -Burada, `/path/to/script.js` dəyəri saytın kökündən absolut yol ilə skript faylına istinad edir. Əlavə olaraq, cari səhifədən nisbi yerləşən fayla da istinad etmək olar. Məsələn, `src="script.js"` dəyəri `"script.js"` faylının cari direktoriyada olması deməkdir. +Burada, `/path/to/script.js` dəyəri saytın kökündən absolut yol ilə skript faylına istinad edir. Əlavə olaraq, cari səhifəyə nisbi yerləşən fayla da istinad etmək olar. Məsələn, `src="script.js"` dəyəri `"script.js"` faylının cari direktoriyada olması deməkdir. Biz, skriptin mənbəsini tam URL ilə də təyin edə bilərik. Məsələn: From 192fce02c851b694af734bedb1f767fefa14d1ae Mon Sep 17 00:00:00 2001 From: Ziyaddin Sadigov Date: Tue, 18 Feb 2020 11:38:38 +0400 Subject: [PATCH 5/6] Update article.md --- 1-js/02-first-steps/01-hello-world/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index 6f0c38214..8cd486273 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -129,4 +129,4 @@ Yuxarıdakı nümunənin işləməsi üçün skriptləri ayrı-ayrı təqlərə - Kənar faylda yerləşən skriptləri `` təqi ilə yükləmək mümkündür. -Brauzer skriptləri və onların veb səhifə ilə interaksiyası haqqında öyrənilməli daha çox məlumat var. Lakin, dərsliyin bu hissəsinin JavaScript dilinə hərs olunduğu üçün biz brauzerə xas tətbiqlərə fokuslanmayacağıq. Biz JavaScript kodunu icra etmək üçün brauzerdən istifadə edəcəyik. Brauzerdən istifadə etdikdə icra olunan skriptləri onlayn oxumaq olur. Lakin, skriptləri başqa mühitlərdə də icra etmək mümkündür. +Brauzer skriptləri və onların veb səhifə ilə interaksiyası haqqında öyrənilməli daha çox məlumat var. Lakin, dərsliyin bu hissəsinin JavaScript dilinə həsr olunduğu üçün biz brauzerə xas tətbiqlərə fokuslanmayacağıq. Biz JavaScript kodunu icra etmək üçün brauzerdən istifadə edəcəyik. Brauzerdən istifadə etdikdə icra olunan skriptləri onlayn oxumaq olur. Lakin, skriptləri başqa mühitlərdə də icra etmək mümkündür. From 802b659c307bc9cd3c66086013149d7194607d5f Mon Sep 17 00:00:00 2001 From: Ziyaddin Sadigov Date: Tue, 18 Feb 2020 12:23:43 +0400 Subject: [PATCH 6/6] Update article.md --- 1-js/02-first-steps/01-hello-world/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index 8cd486273..325a2b32a 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -124,7 +124,7 @@ Yuxarıdakı nümunənin işləməsi üçün skriptləri ayrı-ayrı təqlərə ## Xülasə -- JavaScript kodunu səhifəyə əlavə etmək üçün `` təqi ilə yükləmək mümkündür.