diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html b/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html index ff1d871b0..b680fc6f7 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html @@ -4,7 +4,7 @@ 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..f66522b46 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..0c0f6f781 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,10 @@ importance: 5 --- -# Show an alert +# გაფრთხილების ჩვენება -Create a page that shows a message "I'm JavaScript!". +შექმენით გვერდი, რომელიც აჩვენებს შეტყობინებას: „მე ვარ JavaScript-ი!“. -Do it in a sandbox, or on your hard drive, doesn't matter, just ensure that it works. +გააკეთეთ ეს sandbox-ში ან თქვენს მყარ დისკზე, არა აქვს მნიშვნელობა, უბრალოდ დარწმუნდით, რომ მუშაობს. [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..5c0b66292 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("მე ვარ JavaScript-ი!"); \ 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..18096a0da 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,7 @@ -The HTML code: +HTML-კოდი: [html src="index.html"] -For the file `alert.js` in the same folder: +იმავე საქაღალდეში არსებული `alert.js` ფაილისთვის: [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..8e0954a10 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 +# გაფრთხილების ჩვენება გარე სკრიპტის გამოყენებით -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. +აიღეთ წინა დავალების () ამონახსნი და მოახდინეთ მასი ცვლილება. სკრიპტის შიგთავსი გაიტანეთ ცალკე `alert.js` ფაილში, რომელიც განთავსებულია იმავე საქაღალდეში. -Open the page, ensure that the alert works. +გახსენით გვერდი, დარწმუნდით, რომ გაფრთხილება მუშაობს. \ No newline at end of file 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 fa935f341..1cee4c972 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! +# გამარჯობა, მსოფლიო! -This part of the tutorial is about core JavaScript, the language itself. +სახელმძღვანელოს ეს ნაწილი ეხება JavaScript-ს, უშუალოდ ენას. -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. +ამის მიუხედავად გვჭირდება სამუშაო გარემო, რათა გავუშვათ ჩვენი სკრიპტები და, რადგან ეს გახლავთ ონლაინ-წიგნი, ბრაუზერი ამისთვის მშვენიერი არჩევანია. ჩვენ მინიმუმამდე დავიყვანთ ბრაუზერისთვის სპეციფიკური ბრძანებების (როგორიცაა `alert`) რაოდენობას, რათა მათზე დრო არ დაკარგოთ [იმ შემთხვევაში], თუ გეგმავთ, კონცენტრირდეთ სხვა გარემოზე (როგორიცაა Node.js). ბრაუზერში JavaScript-ის გამოყენებაზე ყურადღებას გავამახვილებთ სახელმძღვანელოს [შემდეგ ნაწილში](/ui). -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"`. +მაშასადამე, თავდაპირველად ვნახოთ, როგორ ხდება ვებგვერდისათვის სკრიპტის მიბმა. სერვერის მხარის გარემოში (როგორიცაა Node.js) სკრიპტის გაშვება შეგიძლიათ შემდეგნაირი ბრძანებით: `„node my.js“`. -## The "script" tag +## ტეგი „script“ -JavaScript programs can be inserted almost anywhere into an HTML document using the ` */!* -

...After the script.

+

...სკრიპტის შემდეგ.

@@ -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. +ზემოთ მოცემული განყოფილების მარჯვენა ზედა კუთხეში არსებულ „Play“ ღილაკზე დაწკაპუნებით შეგიძლიათ მაგალითში მოცემული კოდი გაუშვათ. ``` -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. +აქ `/path/to/script.js` არის აბსოლუტური მისამართი საიტის ფესვიდან სკრიპტის ფაილამდე. ასევე შეიძლება მივუთითოთ ფარდობითი მისამართი მიმდინარე გვერდიდან. მაგალითად, `src="script.js"` [ან `src="./script.js"`] გულისხმობს, რომ `"script.js"` ფაილი განთავსებულია მიმდინარე საქაღალდეში. -We can give a full URL as well. For instance: +ასევე შეგვიძლია სრული URL-მისამართის მითითება. მაგალითად: ```html ``` -To attach several scripts, use multiple tags: +რამდენიმე სკრიპტის მისაბმელად [ერთდროულად] ვიყენებთ მრავალ ტეგს: ```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. +როგორც წესი, HTML-ში თავსდება მხოლოდ უმარტივესი სკრიპტები, უფრო რთულები კი — ცალკეულ ფაილებში. -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). +ცალკეული ფაილის უპირატესობა ის გახლავთ, რომ ბრაუზერი მოახდენს მის ჩამოტვირთვას და [ქეშში](https://en.wikipedia.org/wiki/Web_cache) შენახვას. -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. +სხვა გვერდები, რომლებიც შეიცავენ იმავე სკრიპტს, ნაცვლად ჩამოტვირთვისა, ამოიღებენ მას ქეშიდან. ამრიგად, ფაილის ჩამოტვირთვა ფაქტობრივად მხოლოდ ერთხელ მოხდება. -That reduces traffic and makes pages faster. +ეს ამცირებს ტრაფიკს და გვერდებს უფრო სწრაფს ხდის. ``` -````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 +## შეჯამება -- We can use a ``. +- გვერდისათვის JavaScript-კოდის დასამატებლად ``. -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. +ჯერ კიდევ ბევრი რამ გვაქვს განსახილველი ბრაუზერის სკრიპტებისა და ვებგვერდთან მათი ურთიერთქმედების შესახებ, მაგრამ, როგორც უკვე აღვნიშნეთ, სახელმძღვანელოს ეს ნაწილი მიეძღვნა პროგრამირების ენა JavaScript-ს, ასე რომ, ნუ გაამახვილებთ ყურადღებას ბრაუზერთან დაკავშირებულ დეტალებზე. ჩვენ გამოვიყენებთ ბრაუზერს, როგორც გზას JavaScript-ის გასაშვებად, რაც ონლაინ კითხვის კონტექსტში ძალიან მოსახერხებელია, თუმცა ეს არ გახლავთ ერთადერთი გზა.