Skip to content

Commit decf20c

Browse files
author
PENTALOG\ctodor
committed
3-devtools/article
1 parent b91760b commit decf20c

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed
Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,57 @@
1-
# Developer console
1+
# Consola dezvoltatorului
22

3-
Code is prone to errors. You are quite likely to 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+
Codul este înclinat erorilor. Este destul de probabil să comiți erori... Oh, stai, despre ce vorbesc? *Cu siguranță* vei avea erori, cel puțin dacă ești om și nu robot (https://en.wikipedia.org/wiki/Bender_(Futurama)).
44

5-
But in the browser, a user doesn't see the errors by default. So, if something goes wrong in the script, we won't see what's broken and can't fix it.
5+
Dar în browser, un utilizator nu poate vedea erorile în mod implicit. Așa că, dacă ceva merge prost în script, nu vom putea vedea ce s-a stricat și nu vom putea repara.
66

7-
To see errors and get a lot of other useful information about scripts, "developer tools" have been embedded in browsers.
7+
Pentru a vedea erorile și a strânge alte informații folositoare despre script-uri, "unelte pentru dezvoltatori" (developer tools) au devenit încorporate în browsere.
88

9-
Most often 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 people have a "favorite" browser and switch to others if a problem is browser-specific.
9+
Cel mai adesea dezvoltatorii sunt înclinați înspre Chrome sau Firefox pentru dezvoltare, deoarece aceste browsere au cele mai bune developer tools. Alte browsere oferă de asemenea developer tools, uneori cu trăsături speciale, dar de obicei încearcă să prindă din urmă pe cele din Chrome sau Firefox. Așa că majoritatea majoritatea oamenilor au un browser "favorit" și folosesc altul dacă apare o problemă specifică browser-ului.
1010

11-
Developer tools are potent; there are many features. To start, we'll learn how to open them, look at errors and run JavaScript commands.
11+
Developer tools sunt puternice; există multe caracteristici. Pentru a începe, vom învăța cum să le deschidem, să ne uităm la erori și să rulăm comenzi JavaScript.
1212

1313
## Google Chrome
1414

15-
Open the page [bug.html](bug.html).
15+
Deschide pagina [bug.html](bug.html).
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+
Există o eroare în aceasta. Este ascunsă de ochii unui vizitator obișnuit, așa că să deschidem developer tools pentru a o vedea.
1818

19-
Press `key:F12` or, if you're on Mac, then `key:Cmd+Opt+J`.
19+
Apasă `tasta:F12` sau, daca ești pe un Mac, `tastele:Cmd+Opt+J`.
2020

21-
The developer tools will open on the Console tab by default.
21+
Uneltele pentru dezvoltatori se vor deschide în Console (consolă) în mod implicit.
2222

23-
It looks somewhat like this:
23+
Arată ceva în genul acesta:
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+
Aspectul exact al uneltelor depinde de versiunea ta de Chrome. Se schimbă din timp în timă dar ar trebui să fie similar.
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+
- Aici putem vedea mesajul eroare de culoare roșie. În acest caz, script-ul conține o comandă străină,"lalala".
30+
- Pe dreapta, este un link clickable către sursa `bug.html:12` cu numărul liniei pe care a apărut eroarea.
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 (`key:Shift+Enter` to input multi-line commands).
32+
Sub mesajul de eroare, există un simbol albastru, `>`. Marchează o "linie de comandă" unde putem tasta comenzi JavaScript. Apasă `tasta:Enter` pentru a le rula (`tastele:Shift+Enter` pentru a insera comenzi multi-linie).
3333

34-
Now we can see errors, and that's enough for a start. We'll be back to developer tools later and cover debugging more in-depth in the chapter <info:debugging-chrome>.
34+
Acum putem vedea erori, iar asta e suficient pentru început. Vom reveni la uneltele pentru dezvoltatori mai târziu și vom acoperi debugging-ul mai în detaliu în capitolul <info:debugging-chrome>.
3535

36+
## Firefox, Edge, și altele
3637

37-
## Firefox, Edge, and others
38+
Majoritatea celorlalte browsere folosesc `tasta:F12` pentru a deschide uneltele pentru dezvoltatori.
3839

39-
Most other browsers use `key:F12` to open developer tools.
40-
41-
The look & feel of them is quite similar. Once you know how to use one of those tools (you can start with Chrome), you can easily switch to another.
40+
Aspectul și senzația lor este chiar similară. Odată ce știi cum să folosești una dintre aceste unelte (poți începe cu Chrome), vei putea să treci la altele cu ușurință.
4241

4342
## Safari
4443

45-
Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
44+
Safari (browser Mac, nu este suportat de Windows/Linux) este ceva mai special în acest caz. Trebuie să activăm "Meniul de dezvoltare" (Develop menu) mai întâi.
4645

47-
Open Preferences and go to "Advanced" pane. There's a checkbox at the bottom:
46+
Deschide Preferințe (Preferences) și mergi la panoul "Avansat" (Advanced). La capăt exista un checkbox:
4847

4948
![safari](safari.png)
5049

51-
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.
50+
Acum `tasta:Cmd+Opt+C` poate comuta consola. De asemenea, observă că noul item de sus denumit "Develop" a apărut. Acesta conține multe comenzi și opțiuni.
5251

53-
## Summary
52+
## Rezumat
5453

55-
- Developer tools allow us to see errors, run commands, examine variables and much more.
56-
- They can be opened with `key:F12` for most browsers under Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first).
54+
- Uneltele pentru dezvoltatori ne permit să vedem erorile, să rulăm comenzi. să examinăm variabile și multe altele.
55+
- Ele pot fi deschise cu `tasta:F12` pentru majoritatea browserelor sub Windows. Chrome pentru Mac are `tastele:Cmd+Opt+J`, Safari: `tastele:Cmd+Opt+C` (trebuie să le activezi mai întâi).
5756

58-
Now we have the environment ready. In the next section, we'll get down to JavaScript.
57+
Acum avem mediul pregătit. În următoarele secțiuni vom trece la JavaScript.

0 commit comments

Comments
 (0)