Skip to content

Commit 3c98cd0

Browse files
authored
Update article.md
1 parent 06f634f commit 3c98cd0

File tree

1 file changed

+35
-30
lines changed

1 file changed

+35
-30
lines changed
Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,68 @@
1-
# Developer console
1+
# کۆنسۆلی گەشەپێدەر
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+
کۆدە تووشی هەڵە دەبێت. بە ئەگەرێکی زۆرەوە هەڵە دەکەن ، ئەوەی من باسی دەکەم *لانیکەم* ئەگەر مرۆڤ بیت تووشی هەڵە دەبیت لە کۆد نووسین، بەڵام ئەگەر [ڕۆبۆت](https://en.wikipedia.org/wiki/Bender_(Futurama)). بیت دۆخەکە فەرق دەکات.
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+
بەڵام لە وێبگەڕەکەدا بەکارهێنەران بە شێوازی پێشوەختە هەڵە نابینن. بۆیە ئەگەر شتێک لە کۆدی سکڕێپت ئێمە هەڵە بوو، ناتوانین بزانین چی هەڵەیە و ناتوانین چاکی بکەینەوە.
66

7-
To see errors and get a lot of other useful information about scripts, "developer tools" have been embedded in browsers.
7+
وێبگەڕەکان "ئامرازی گەشەپێدەر"ی ناوەکییان هەیە بۆ بینینی هەڵەکان و وەرگرتنی زانیاری زۆر بەسوود و تر سەبارەت بە سکریپتەکان.
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+
زۆربەی گەشەپێدەران کرۆم یان فایەرفۆکسیان پێ باشترە بۆ پەرەپێدان چونکە ئەم وێبگەڕانە باشترین ئامرازی گەشەپێدەریان هەیە. هەروەها وێبگەڕەکانی تر ئامرازی گەشەپێدەر پێشکەش دەکەن، کە هەندێک جار تایبەتمەندی زۆر باشیان هەیە، بەڵام بەزۆری هەمان تایبەتمەندی کرۆم یان فایەرفۆکس بەکاردەهێنن.بۆیە زۆربەی گەشەپێدەران وێبگەڕێکی "دڵخواز"یان هەیە و ئەگەر کێشەکە پەیوەندی بە وێبگەڕەکەوە هەبێت، ئەوا وێبگەڕەکانی تر تاقی دەکەنەوە بۆ چارەسەرکردنی کێشەکە.
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.
1211

13-
## Google Chrome
12+
ئامرازەکانی گەشەپێدەر بەهێزن. چەندین تایبەتمەندییان هەیە. بۆ دەستپێکردن فێر دەبین چۆن بیانکەینەوە و چۆن پشکنین لەسەر هەڵەکان بکەین و فەرمانەکانی جاڤاسکڕێپت جێبەجێ بکەین.
1413

15-
Open the page [bug.html](bug.html).
14+
## گووگڵ کرۆم
1615

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.
16+
لاپەڕەی [bug.html](bug.html) بکەرەوە.
1817

19-
Press `key:F12` or, if you're on Mac, then `key:Cmd+Opt+J`.
18+
هەڵەیەک لە کۆدی جاڤاسکڕێپتدا هەیە لەسەری. لە چاوی سەردانکەرێکی ئاسایی شاراوەتەوە، بۆیە با ئامرازەکانی گەشەپێدەر بکەینەوە بۆ بینینی.
2019

21-
The developer tools will open on the Console tab by default.
20+
ئەمە کارە بکە :`key:F12` یان ئەگەر ماک بەکاردەهێنیت، `key:Cmd+Opt+J` فشار بە.
2221

23-
It looks somewhat like this:
22+
ئامرازەکانی گەشەپێدەر لە تابی Console بە شێوازی پێشوەختە دەکرێنەوە.
23+
24+
شتێکی لەم شێوەیە دەچێت:
2425

2526
![chrome](chrome.png)
2627

27-
The exact look of developer tools depends on your version of Chrome. It changes from time to time but should be similar.
28+
دەرکەوتنی ئامرازەکانی گەشەپێدەر بەندە بە وەشانی کرۆمەکەتەوە. جار جار دەگۆڕێت بەڵام دەبێ هاوشێوە بێت.
29+
30+
- لێرەدا دەتوانین پەیامی هەڵەی سوور ببینین. لەم حاڵەتەدا سکریپتەکە فرمانێکی نەناسراوی "lalala" لەخۆدەگرێت.
31+
- لە لای ڕاستەوە بەستەرێک هەیە کە دەتوانرێت کلیک بکرێت بۆ سەرچاوەی `bug.html:12` لەگەڵ ژمارەی دێڕەکە کە هەڵەکە تێیدا ڕوویداوە.
2832

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.
33+
لە خوارەوەی پەیامی هەڵەکە ئایکۆنێکی شین `>` هەیە. ئەمەش "هێڵی فەرمان" دیاری دەکات کە دەتوانین فەرمانەکانی جاڤاسکڕێپت تێیدا بنووسین.`key:Enter` فشار بە بۆ ئەوە جێبەجێ بێت.
3134

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.
35+
ئێستا دەتوانین هەڵەکان ببینین و ئەوە بەسە بۆ دەستپێکردن.دواتر دەگەڕێینەوە سەر ئامرازەکانی گەشەپێدەر و لە بەشی <info:debugging-chrome> دەچینە ناو چاککردنەوەی زیاتر.
3336

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>.
3537

3638
```smart header="Multi-line input"
37-
Usually, when we put a line of code into the console, and then press `key:Enter`, it executes.
39+
بەزۆری کاتێک جێبەجێ دەکرێت کە دێڕێکی کۆد دەخەینە ناو کۆنسۆڵەکەوە و پاشان `کلیلی :Enter` دادەگرین.
3840
39-
To insert multiple lines, press `key:Shift+Enter`. This way one can enter long fragments of JavaScript code.
41+
بۆ دانانی چەندین دێڕ،` Shift+Enter` فشار بە. بەم شێوەیە دەتوانرێت پارچە درێژەکانی کۆدی جاڤاسکڕێپت بخرێتە ناوەوە.
4042
```
4143

42-
## Firefox, Edge, and others
44+
## فایەرفۆکس و ئێدج و ئەوانی تر
4345

44-
Most other browsers use `key:F12` to open developer tools.
46+
زۆربەی وێبگەڕەکانی تر `key:F12` بەکاردەهێنن بۆ کردنەوەی ئامرازەکانی گەشەپێدەر.
4547

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.
48+
ڕوخسار و هەستیان بە تەواوی وەک یەک. کاتێک زانیت چۆن یەکێک لەم ئامرازانە بەکاربهێنیت (دەتوانیت لە کرۆمەوە دەست پێبکەیت)، دەتوانیت بە ئاسانی لەگەڵ ئامرازەکانی تر ڕابێیت چونکە هەموویان هەمان بناغە و پێکهاتە بەکاردەهێنن.
4749

48-
## Safari
50+
## سەفاری
4951

50-
Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
52+
سەفاری (کە لەلایەن ویندۆز/لینوکسەوە پشتگیری ناکرێ) لێرەدا کەمێک تایبەتە. سەرەتا پێویستە "مێنۆی پەرەپێدان" چالاک بکەین.
5153

52-
Open Preferences and go to the "Advanced" pane. There's a checkbox at the bottom:
54+
Preferences بکەرەوە و بچۆ بۆ لاپەڕەی "Advanced". لە خوارەوە بۆکسێکی هەڵبژاردن هەیە:
5355

5456
![safari](safari.png)
5557

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.
5758

58-
## Summary
59+
شۆرتکات `key:Cmd+Opt+C` ئێستا دەتوانێت کۆنسۆڵەکە بگۆڕێت. هەروەها تێبینی بکە کە بابەتی نوێی سەرەوەی مینیو بە ناوی "Develop" دەرکەوتووە. چەندین فەرمان و بژاردەی هەیە.
60+
61+
62+
## پوختە
63+
64+
- ئامرازەکانی گەشەپێدەر ڕێگەمان پێدەدەن هەڵەکان ببینین، فەرمانەکان جێبەجێ بکەین، گۆڕاوەکان بپشکنین و زۆر شتی تر.
65+
- دەتوانرێت بە `key:F12` بۆ زۆربەی وێبگەڕەکانی ویندۆز بکرێتەوە. کرۆم بۆ ماک پێویستی بە `کلیل:Cmd+Opt+J` هەیە، سەفاری: `کلیل: Cmd+Opt+C` (پێویستە سەرەتا چالاک بکرێت).
5966

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).
6267

63-
Now we have the environment ready. In the next section, we'll get down to JavaScript.
68+
ئێستا ژینگەمان ئامادە کردووە. لە بەشی داهاتوودا باس لە جاڤاسکڕێپت دەکەین.

0 commit comments

Comments
 (0)