Skip to content

Commit 6f02b3f

Browse files
committed
devtools is ready
1 parent d7a9ad7 commit 6f02b3f

File tree

2 files changed

+44
-46
lines changed

2 files changed

+44
-46
lines changed
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
1-
# Developer konsolu
1+
# Tərtibatçı alətləri
22

3-
Code is prone to errors. You will quite likely make errors... Oh, what am I talking about? You are _absolutely_ going to make errors, at least if you're a human, not a [robot](<https://en.wikipedia.org/wiki/Bender_(Futurama)>).
3+
Yazdığımız kodlar həmişə xatalara meyillidir. Yəni, yəqin ki, arada bir iki səhv edəcəksiniz də... desəm düzgün olmaz, çünki siz **mütləq** səhv edəcəksiniz. Siz insansınız.
44

5-
But in the browser, users don't see errors by default. So, if something goes wrong in the script, we won't see what's broken and can't fix it.
5+
Lakin brauzer mühitində istidəçilər həmin xətaları görmürlər. Əgər yazdığınız skriptdə nə isə qaydasında deyilsə, siz onu görə bilməyəcəksiniz və bu səbəbdən də problemi həll etmək sizin üçün çətin olacaq.
66

7-
To see errors and get a lot of other useful information about scripts, "developer tools" have been embedded in browsers.
7+
Məhz bu səbəbdən, etdiyimiz xətaları görmək və yazdığımız skriptlər haqqında əlavə məlumat əldə etmək üçün brauzerlər "tərtibatçı alətləri" (developer tools) təqdim edir.
88

9-
Most developers lean towards Chrome or Firefox for development because those browsers have the best developer tools. Other browsers also provide developer tools, sometimes with special features, but are usually playing "catch-up" to Chrome or Firefox. So most developers have a "favorite" browser and switch to others if a problem is browser-specific.
9+
Bu cür alətlərin ən yaxşısı və seviləni Chrome və Firefoxda olduğu üçün, əksər proqramçılar məhz bu brauzerləri istifadə edir. Digər brauzerlər də bu kimi tərtibatçı alətləri təqdim etsələr də, Chrome və Firefox ilə demək olar ki, eyni şey olduğu üçün bu iki brauzer əksər proqramçıların sevimlisidir və sadəcə brauzer-spesifik problemlər yarandığı hallarda digər brauzerlərə keçid edirlər.
1010

11-
Developer tools are potent; they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands.
11+
Tərtibatçı alətləri güclüdür və çoxlu sayda xüsusiyyətləri var. Başlanğıc üçün, gəlin onları açmağı, xətalara baxmağı və JavaScript komandalarını icra etməyi öyrənək.
1212

1313
## Google Chrome
1414

15-
Open the page [bug.html](bug.html).
15+
[bug.html](bug.html) səhifəsini açın.
1616

17-
There's an error in the JavaScript code on it. It's hidden from a regular visitor's eyes, so let's open developer tools to see it.
17+
Bu səhifədə yazılmış JavaScript-də xəta var. Bu xəta normal istifadəçidən gizlədilmişdir, gəlin tərtibatçı alətlərini açaq və görək yazılmış kodda nə problem var.
1818

19-
Press `key:F12` or, if you're on Mac, then `key:Cmd+Opt+J`.
19+
Bunun üçün `key:F12` düyməsini basın. Əgər Mac istifadəçisinizsə o zaman `key:Cmd+Opt+J` kombinasiyasından istifadə edin.
2020

21-
The developer tools will open on the Console tab by default.
21+
Tərtibatçı alətləri açılacaq və orada çoxlu sayda tab görəcəksiniz. Defolt olaraq isə Console tabı açıq olacaq.
2222

23-
It looks somewhat like this:
23+
Təxmini belə bir şey:
2424

2525
![chrome](chrome.png)
2626

27-
The exact look of developer tools depends on your version of Chrome. It changes from time to time but should be similar.
27+
Konsolun dəqiq görünüşü Chrome-un versiyasına görə dəyişə bilər lakin çox vaxt oxşardır.
2828

29-
- Here we can see the red-colored error message. In this case, the script contains an unknown "lalala" command.
30-
- On the right, there is a clickable link to the source `bug.html:12` with the line number where the error has occurred.
29+
- Yəqin ki, konsoldakı qırmızı rəngli xəta mesajını görürsünüz. Bu halda, xəta bizə "lalala" deyə bir şeyin təyin olunmadığını deyir.
30+
- Sağ tərəfdə isə `bug.html:12` adlı keçid var. Bu keçid, bizə xətanın `bug.html` faylının `12`-ci sətrindən qaynaqlandığını göstərir.
3131

32-
Below the error message, there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands. Press `key:Enter` to run them.
32+
Ondan aşağıda gördüyünüz `>` işarəsi isə komanda xəttidir (command line) . Siz burada JavaScript komandaları yaza və `key:Enter` basmaqla həmin komandaları icra edə bilərsiniz.
3333

34-
Now we can see errors, and that's enough for a start. We'll come back to developer tools later and cover debugging more in-depth in the chapter <info:debugging-chrome>.
34+
Artıq xətaları görə bildiyimizə görə hələ ki, bu bizim üçün kifayətdir. Sonrakı fəsillərdə debugging (bug-lardan təmizləmə) haqqında daha çox öyrənəcəyik.
3535

36-
```smart header="Multi-line input"
37-
Usually, when we put a line of code into the console, and then press `key:Enter`, it executes.
36+
```smart header="Bir neçə sətirlik komandalar"
37+
Adətən komandanı daxil edib `key:Enter` basdıqdan sonra həmin komanda icra olunur.
3838
39-
To insert multiple lines, press `key:Shift+Enter`. This way one can enter long fragments of JavaScript code.
39+
Əgər bir neçə sətirlik kod yazırsınızsa, o zaman `key:Shift+Enter` basın. Bu vasitə ilə siz uzun JavaScript kodları yaza və icra edə bilərsiniz.
4040
```
4141

42-
## Firefox, Edge, and others
42+
## Firefox, Edge və başqaları
4343

44-
Most other browsers use `key:F12` to open developer tools.
44+
Əksər brauzerlərdə alətləri açmaq üçün `key:F12` komandasından istifadə olunur.
4545

46-
The look & feel of them is quite similar. Once you know how to use one of these tools (you can start with Chrome), you can easily switch to another.
46+
Görünüş hamısında demək olar ki, eynidir. Birini istifadə etməyi tam öyrəndikdən sonra (misalçün Chrome ilə başlaya bilərsiniz) digərlərinə rahatlıqla keçid edə bilərsiniz.
4747

4848
## Safari
4949

50-
Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
50+
Safaridə (Mac brauzerdiri, Windows/Linux əməliyyat sistemlərində dəstəklənmir) isə vəziyyət bir qədər fərqlidir. Əvvəlcə "Develop menu"-nu aktiv etməyimiz lazımdır.
5151

52-
Open Preferences and go to the "Advanced" pane. There's a checkbox at the bottom:
52+
Bunun üçün öncəliklər (Preferences) pəncərəsini açın və "Advanced" panelinə daxil olun. Orada aşağıdakı kimi bir checkbox görəcəksiniz:
5353

5454
![safari](safari.png)
5555

56-
Now `key:Cmd+Opt+C` can toggle the console. Also, note that the new top menu item named "Develop" has appeared. It has many commands and options.
56+
İndi isə `key:Cmd+Opt+C` kombinasiyası ilə konsolu aça və bağlaya bilərsiniz. Nəzərinizə çatdıraq ki, yuxarı menyuda da "Develop" adlı yeni bir seçim yaranmışdır.
5757

58-
## Summary
58+
## Xülasə
5959

60-
- Developer tools allow us to see errors, run commands, examine variables, and much more.
61-
- They can be opened with `key:F12` for most browsers on Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first).
60+
- Tərtibatçı alətləri bizə xətaları görmək, komandalar icra etmək, dəyişənləri təhlil etmək və s. bu kimi çoxlu sayda imkanlar yaradır.
61+
- `key:F12` komandası ilə onları aça və istifadə edə bilərsiniz. Chrome for Mac üçün `key:Cmd+Opt+J`, Safari üçün isə `key:Cmd+Opt+C` kombinasiyalarında istifadə edin (unutmayın ki, Safaridə əvvəlcə bunu aktivləşdirmək lazmdır).
6262

63-
Now we have the environment ready. In the next section, we'll get down to JavaScript.
63+
Mühit ilə bağlı hər şeyi yekunlaşdırdığımız üçün artıq JavaScript ilə yaxından tanış olmağa tam hazırıq.
Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
<!DOCTYPE HTML>
2-
<html>
3-
4-
<head>
5-
<meta charset="utf-8">
6-
</head>
7-
8-
<body>
9-
10-
There is an error in the script on this page.
11-
<script>
12-
lalala
13-
</script>
14-
15-
</body>
16-
17-
</html>
1+
<!DOCTYPE html>
2+
<html lang="az">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Debugging</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
8+
</head>
9+
<body>
10+
Bu səhifədəki skriptdə bir xəta var.
11+
<script>
12+
lalala;
13+
</script>
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)