Skip to content

Commit bf1fa48

Browse files
add: added 98% translations
1 parent 42f27a0 commit bf1fa48

File tree

527 files changed

+41988
-47292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

527 files changed

+41988
-47292
lines changed
Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,114 @@
1-
# Browser environment, specs
1+
# Brauzer muhiti, xususiyatlari
22

3-
The JavaScript language was initially created for web browsers. Since then it has evolved and become a language with many uses and platforms.
3+
JavaScript tili dastlab veb-brauzerlar uchun yaratilgan. O'shandan beri u rivojlanib, ko'plab foydalanish va platformalarga ega tilga aylandi.
44

5-
A platform may be a browser, or a web-server or another *host*, even a "smart" coffee machine, if it can run JavaScript. Each of them provides platform-specific functionality. The JavaScript specification calls that a *host environment*.
5+
Platforma JavaScript-ni ishga tushira olsa, brauzer yoki veb-server yoki boshqa _host_, hatto "aqlli" qahva mashinasi bo'lishi mumkin. Ularning har biri platformaga xos funksiyalarni taqdim etadi. JavaScript spetsifikatsiyasi buni _host muhiti_ deb ataydi.
66

7-
A host environment provides own objects and functions additional to the language core. Web browsers give a means to control web pages. Node.js provides server-side features, and so on.
7+
Xost muhiti til yadrosiga qo'shimcha ravishda o'z ob'ektlari va funktsiyalarini ta'minlaydi. Veb-brauzerlar veb-sahifalarni boshqarish vositalarini beradi. Node.js server tomonidagi xususiyatlarni taqdim etadi va hokazo.
88

9-
Here's a bird's-eye view of what we have when JavaScript runs in a web browser:
9+
JavaScript veb-brauzerda ishlayotganida bizda nima borligini qushning nazari bilan ko'rib chiqamiz:
1010

1111
![](windowObjects.svg)
1212

13-
There's a "root" object called `window`. It has two roles:
13+
`Oyna` deb nomlangan "ildiz" ob'ekti mavjud. Uning ikkita roli bor:
1414

15-
1. First, it is a global object for JavaScript code, as described in the chapter <info:global-object>.
16-
2. Second, it represents the "browser window" and provides methods to control it.
15+
1. Birinchidan, bu <info:global-object> bobida tasvirlanganidek, JavaScript kodi uchun global obyektdir.
16+
2. Ikkinchidan, u "brauzer oynasi" ni ifodalaydi va uni boshqarish usullarini taqdim etadi.
1717

18-
For instance, here we use it as a global object:
18+
Masalan, biz uni global ob'ekt sifatida ishlatamiz:
1919

2020
```js run
2121
function sayHi() {
2222
alert("Hello");
2323
}
2424

25-
// global functions are methods of the global object:
25+
// global funktsiyalar global ob'ektning usullari:
2626
window.sayHi();
2727
```
2828

29-
And here we use it as a browser window, to see the window height:
29+
Va bu erda biz uni brauzer oynasi sifatida ishlatamiz, oyna balandligini ko'rish uchun:
3030

3131
```js run
32-
alert(window.innerHeight); // inner window height
32+
alert(window.innerHeight); // oynaning ichki balandligi
3333
```
3434

35-
There are more window-specific methods and properties, we'll cover them later.
35+
Ko'proq oynaga xos usullar va xususiyatlar mavjud, biz ularni keyinroq ko'rib chiqamiz.
3636

3737
## DOM (Document Object Model)
3838

39-
Document Object Model, or DOM for short, represents all page content as objects that can be modified.
39+
Hujjat ob'ekt modeli yoki qisqacha DOM barcha sahifa mazmunini o'zgartirish mumkin bo'lgan ob'ektlar sifatida ifodalaydi.
4040

41-
The `document` object is the main "entry point" to the page. We can change or create anything on the page using it.
41+
`Hujjat` ob'ekti sahifaning asosiy "kirish nuqtasi" hisoblanadi. Uning yordamida biz sahifadagi biror narsani o'zgartirishimiz yoki yaratishimiz mumkin.
42+
43+
Masalan:
4244

43-
For instance:
4445
```js run
45-
// change the background color to red
46+
// fon rangini qizil rangga o'zgartiring
4647
document.body.style.background = "red";
4748

48-
// change it back after 1 second
49-
setTimeout(() => document.body.style.background = "", 1000);
49+
// 1 soniyadan keyin uni qayta o'zgartiring
50+
setTimeout(() => (document.body.style.background = ""), 1000);
5051
```
5152

52-
Here we used `document.body.style`, but there's much, much more. Properties and methods are described in the specification: [DOM Living Standard](https://dom.spec.whatwg.org).
53+
Bu erda biz `document.body.style` dan foydalandik, lekin yana ko'p narsalar bor. Xususiyatlar va usullar spetsifikatsiyada tasvirlangan: [DOM Living Standard](https://dom.spec.whatwg.org).
5354

54-
```smart header="DOM is not only for browsers"
55-
The DOM specification explains the structure of a document and provides objects to manipulate it. There are non-browser instruments that use DOM too.
55+
```smart header="DOM faqat brauzerlar uchun emas"
56+
DOM spetsifikatsiyasi hujjatning tuzilishini tushuntiradi va uni boshqarish uchun ob'ektlarni taqdim etadi. DOM-dan foydalanadigan brauzer bo'lmagan asboblar ham mavjud.
5657
57-
For instance, server-side scripts that download HTML pages and process them can also use DOM. They may support only a part of the specification though.
58+
Masalan, HTML-sahifalarni yuklaydigan va ularni qayta ishlovchi server tomonidagi skriptlar ham DOM-dan foydalanishi mumkin. Ular spetsifikatsiyaning faqat bir qismini qo'llab-quvvatlashi mumkin.
5859
```
5960

60-
```smart header="CSSOM for styling"
61-
There's also a separate specification, [CSS Object Model (CSSOM)](https://www.w3.org/TR/cssom-1/) for CSS rules and stylesheets, that explains how they are represented as objects, and how to read and write them.
61+
```smart header="Styling uchun CSSOM"
62+
Shuningdek, CSS qoidalari va uslublar jadvallari uchun [CSS Object Model (CSSOM)](https://www.w3.org/TR/cssom-1/) alohida spetsifikatsiya mavjud bo'lib, ular qanday ob'ektlar sifatida taqdim etilishini, ularni qanday o'qish va yozishni tushuntiradi.
6263
63-
CSSOM is used together with DOM when we modify style rules for the document. In practice though, CSSOM is rarely required, because we rarely need to modify CSS rules from JavaScript (usually we just add/remove CSS classes, not modify their CSS rules), but that's also possible.
64+
Hujjat uchun uslub qoidalarini o'zgartirganda CSSOM DOM bilan birgalikda ishlatiladi. Amalda, CSSOM kamdan-kam talab qilinadi, chunki biz kamdan-kam hollarda JavaScript-dan CSS qoidalarini o'zgartirishimiz kerak (odatda biz CSS sinflarini qo'shamiz/o'chiramiz, ularning CSS qoidalarini o'zgartirmaymiz), lekin bu ham mumkin.
6465
```
6566

6667
## BOM (Browser Object Model)
6768

68-
The Browser Object Model (BOM) represents additional objects provided by the browser (host environment) for working with everything except the document.
69+
Brauzer ob'ekt modeli (BOM) hujjatdan tashqari hamma narsa bilan ishlash uchun brauzer (xost muhiti) tomonidan taqdim etilgan qo'shimcha ob'ektlarni ifodalaydi.
6970

70-
For instance:
71+
Masalan:
7172

72-
- The [navigator](mdn:api/Window/navigator) object provides background information about the browser and the operating system. There are many properties, but the two most widely known are: `navigator.userAgent` -- about the current browser, and `navigator.platform` -- about the platform (can help to differ between Windows/Linux/Mac etc).
73-
- The [location](mdn:api/Window/location) object allows us to read the current URL and can redirect the browser to a new one.
73+
- [navigator](mdn:api/Window/navigator) obyekti brauzer va operatsion tizim haqida fon maʼlumotlarini taqdim etadi. Ko'pgina xususiyatlar mavjud, lekin eng ko'p ma'lum bo'lgan ikkitasi: `navigator.userAgent` -- joriy brauzer haqida va `navigator.platform` -- platforma haqida (Windows/Linux/Mac va boshqalar o'rtasidagi farqni aniqlashga yordam beradi).
74+
- [location](mdn:api/Window/location) obyekti bizga joriy URL manzilini o‘qish imkonini beradi va brauzerni yangisiga yo‘naltirishi mumkin.
7475

75-
Here's how we can use the `location` object:
76+
`location` obyektidan shunday foydalanishimiz mumkin:
7677

7778
```js run
78-
alert(location.href); // shows current URL
79+
alert(location.href); // hozirgi urlni ko'rsatadi
7980
if (confirm("Go to Wikipedia?")) {
80-
location.href = "https://wikipedia.org"; // redirect the browser to another URL
81+
location.href = "https://wikipedia.org"; // boshqa url ga yo'naltiradi
8182
}
8283
```
8384

84-
Functions `alert/confirm/prompt` are also a part of BOM: they are directly not related to the document, but represent pure browser methods of communicating with the user.
85+
`alert/confirm/prompt` funksiyalari ham BOMning bir qismidir: ular hujjat bilan bevosita bog'liq emas, lekin foydalanuvchi bilan muloqot qilishning sof brauzer usullarini ifodalaydi.
8586

86-
```smart header="Specifications"
87-
BOM is the part of the general [HTML specification](https://html.spec.whatwg.org).
87+
```smart header="Xususiyatlar"
88+
BOM umumiy [HTML spetsifikatsiyasi] (https://html.spec.whatwg.org) qismidir.
8889
89-
Yes, you heard that right. The HTML spec at <https://html.spec.whatwg.org> is not only about the "HTML language" (tags, attributes), but also covers a bunch of objects, methods and browser-specific DOM extensions. That's "HTML in broad terms". Also, some parts have additional specs listed at <https://spec.whatwg.org>.
90+
Ha, siz buni to'g'ri eshitdingiz. <https://html.spec.whatwg.org> saytidagi HTML spetsifikatsiyasi nafaqat "HTML tili" (teglar, atributlar), balki bir qator ob'ektlar, usullar va brauzerga xos DOM kengaytmalarini ham qamrab oladi. Bu "keng ma'noda HTML". Shuningdek, ba'zi qismlarda <https://spec.whatwg.org> ro'yxatida qo'shimcha xususiyatlar mavjud.
9091
```
9192

92-
## Summary
93+
## Xulosa
9394

94-
Talking about standards, we have:
95+
Standartlar haqida gapiradigan bo'lsak, bizda:
9596

96-
DOM specification
97-
: Describes the document structure, manipulations and events, see <https://dom.spec.whatwg.org>.
97+
DOM spetsifikatsiyasi
98+
: Hujjat tuzilishi, manipulyatsiyalar va hodisalarni tavsiflaydi, qarang: <https://dom.spec.whatwg.org>.
9899

99-
CSSOM specification
100-
: Describes stylesheets and style rules, manipulations with them and their binding to documents, see <https://www.w3.org/TR/cssom-1/>.
100+
CSSOM spetsifikatsiyasi
101+
: Uslublar jadvallari va uslublar qoidalarini, ular bilan manipulyatsiyalarni va ularni hujjatlarga bog'lashni tavsiflaydi, qarang: <https://www.w3.org/TR/cssom-1/>.
101102

102-
HTML specification
103-
: Describes the HTML language (e.g. tags) and also the BOM (browser object model) -- various browser functions: `setTimeout`, `alert`, `location` and so on, see <https://html.spec.whatwg.org>. It takes the DOM specification and extends it with many additional properties and methods.
103+
HTML spetsifikatsiyasi
104+
: HTML tilini (masalan, teglar) va shuningdek, BOMni (brauzer ob'ekt modeli) tavsiflaydi -- turli xil brauzer funktsiyalari: `setTimeout`, `alert`, `location` va boshqalar, qarang: <https://html.spec.whatwg.org>. U DOM spetsifikatsiyasini oladi va uni ko'plab qo'shimcha xususiyatlar va usullar bilan kengaytiradi.
104105

105-
Additionally, some classes are described separately at <https://spec.whatwg.org/>.
106+
Bundan tashqari, ba'zi sinflar <https://spec.whatwg.org/> da alohida tasvirlangan.
106107

107-
Please note these links, as there's so much stuff to learn it's impossible to cover and remember everything.
108+
Iltimos, ushbu havolalarga e'tibor bering, chunki o'rganish uchun juda ko'p narsa bor, hamma narsani qamrab olish va eslab qolish mumkin emas.
108109

109-
When you'd like to read about a property or a method, the Mozilla manual at <https://developer.mozilla.org/en-US/search> is also a nice resource, but the corresponding spec may be better: it's more complex and longer to read, but will make your fundamental knowledge sound and complete.
110+
Xususiyat yoki usul haqida oʻqishni istasangiz, <https://developer.mozilla.org/en-US/search> sahifasidagi Mozilla qoʻllanmasi ham yaxshi manba boʻlib xizmat qiladi, ammo mos keladigan xususiyat yaxshiroq boʻlishi mumkin: u murakkabroq va oʻqish uchun uzoqroq, lekin asosiy bilimlaringizni mustahkam va toʻliq qiladi.
110111

111-
To find something, it's often convenient to use an internet search "WHATWG [term]" or "MDN [term]", e.g <https://google.com?q=whatwg+localstorage>, <https://google.com?q=mdn+localstorage>.
112+
Biror narsani topish uchun "WHATWG [term]" yoki "MDN [term]" kabi internet qidiruvidan foydalanish qulay, masalan, <https://google.com?q=whatwg+localstorage>, <https://google.com?q=mdn+localstorage>.
112113

113-
Now we'll get down to learning DOM, because the document plays the central role in the UI.
114+
Endi biz DOMni o'rganishga kirishamiz, chunki hujjat UIda markaziy rol o'ynaydi.

0 commit comments

Comments
 (0)