Skip to content

5-network/06-url#256

Merged
iliakan merged 5 commits into
javascript-tutorial:masterfrom
OliverWall:master
Jun 20, 2019
Merged

5-network/06-url#256
iliakan merged 5 commits into
javascript-tutorial:masterfrom
OliverWall:master

Conversation

@OliverWall

Copy link
Copy Markdown
Contributor

Глава переведена.
Ссылки заменены на developer.mozilla.org, т.к. доступ к сайту https://url.spec.whatwg.org закрыт.
Одна из статей на которую ссылаемся из текста, не переведена. Аналогов не нашел.
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams

Буду рад замечаниям и обсуждениям.

@javascript-translate-bot javascript-translate-bot added the review needed Review needed, please approve or request changes label Jun 19, 2019
@javascript-translate-bot javascript-translate-bot requested a review from a team June 19, 2019 14:45
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


smyagkov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
Comment thread 5-network/06-url/article.md Outdated
@javascript-translate-bot javascript-translate-bot added changes requested Waiting for changes and /done from PR author and removed review needed Review needed, please approve or request changes labels Jun 19, 2019
@javascript-translate-bot

Copy link
Copy Markdown
Contributor

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@OliverWall

Copy link
Copy Markdown
Contributor Author

Спасибо за ревью

/done

@javascript-translate-bot javascript-translate-bot added review needed Review needed, please approve or request changes and removed changes requested Waiting for changes and /done from PR author labels Jun 19, 2019
@javascript-translate-bot javascript-translate-bot requested a review from a team June 19, 2019 17:21
@javascript-translate-bot javascript-translate-bot added needs +1 One more review needed and removed review needed Review needed, please approve or request changes labels Jun 19, 2019
@iliakan

iliakan commented Jun 20, 2019

Copy link
Copy Markdown
Member

Ссылки на спецификацию, поскольку она лучше, чем MDN.
Верни правильные.

Человек, готовый изучать веб-технологии, должен победить Роскомнадзор =)
Или хотя бы обматюгать его, увидев, что ссылки не работают.

@iliakan iliakan added the changes requested Waiting for changes and /done from PR author label Jun 20, 2019
@OliverWall

Copy link
Copy Markdown
Contributor Author

Вернул старые ссылки.

/done

@javascript-translate-bot javascript-translate-bot added review needed Review needed, please approve or request changes and removed changes requested Waiting for changes and /done from PR author labels Jun 20, 2019
@javascript-translate-bot javascript-translate-bot requested a review from a team June 20, 2019 08:34
Comment thread 5-network/06-url/article.md Outdated
@@ -1,22 +1,22 @@

# URL objects
# URL объекты

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# URL объекты
# Объекты URL

Comment thread 5-network/06-url/article.md Outdated
Встроенный класс [URL](https://url.spec.whatwg.org/#api) предоставляет удобный интерфейс для создания и анализа URL-адресов.

We don't have to use it at all. There are no networking methods that require exactly an `URL` object, strings are good enough. But sometimes it can be really helpful.
Мы не обязаны его использовать. Нет сетевых методов, которые требуют `URL` объект, достаточно использовать строку. Но иногда он может быть полезным.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Мы не обязаны его использовать. Нет сетевых методов, которые требуют `URL` объект, достаточно использовать строку. Но иногда он может быть полезным.
Мы не обязаны его использовать. Нет сетевых методов, которые требуют объект `URL`, достаточно использовать строку. Но иногда он может быть полезным.

Comment thread 5-network/06-url/article.md Outdated
## Создание URL

The syntax to create a new URL object:
Синтаксис создания нового URL объекта:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Синтаксис создания нового URL объекта:
Синтаксис создания нового объекта URL:

Comment thread 5-network/06-url/article.md Outdated

- **`url`** -- the text url
- **`base`** -- an optional base for the `url`
- **`url`** -- url-адрес

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **`url`** -- url-адрес
- **`url`** -- URL-адрес

Comment thread 5-network/06-url/article.md Outdated
- **`base`** -- дополнительные опции для `url`

The `URL` object immediately allows us to access its components, so it's a nice way to parse the url, e.g.:
`URL` объект позволяет нам получить доступ к его свойствам, поэтому это отличный способ распарсить url, например:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`URL` объект позволяет нам получить доступ к его свойствам, поэтому это отличный способ распарсить url, например:
Объект `URL` позволяет нам получить доступ к его свойствам, поэтому это отличный способ распарсить URL-адрес, например:

Comment thread 5-network/06-url/article.md Outdated
- также есть свойства `user` и `password`, если используется http-аутентификация.

We can also use `URL` to create relative urls, using the second argument:
Мы можем использовать `URL` объект для создания относительных url, используя второй аргумент:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Мы можем использовать `URL` объект для создания относительных url, используя второй аргумент:
Мы можем использовать объект `URL` для создания относительных URL-адресов, используя второй аргумент:

Comment thread 5-network/06-url/article.md Outdated
alert(url); // https://javascript.info/profile/admin

url = new URL('tester', url); // go to 'tester' relative to current url path
url = new URL('tester', url); // перейти к 'tester' относительно текущего url

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = new URL('tester', url); // перейти к 'tester' относительно текущего url
url = new URL('tester', url); // перейти к 'tester' относительно текущего URL-пути

Comment thread 5-network/06-url/article.md Outdated
We can use an `URL` object in `fetch` or `XMLHttpRequest`, almost everywhere where a string url is expected.

In the vast majority of methods it's automatically converted to a string.
Мы можем использовать `URL` объект в методах `fetch` или `XMLHttpRequest` и почти во всех других, где ожидается url-строка.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Мы можем использовать `URL` объект в методах `fetch` или `XMLHttpRequest` и почти во всех других, где ожидается url-строка.
Мы можем использовать объект `URL` в методах `fetch` или `XMLHttpRequest` и почти во всех других, где ожидается URL-строка.

Comment thread 5-network/06-url/article.md Outdated
## Параметры поиска

Let's say we want to create an url with given search params, for instance, `https://google.com/search?query=value`.
Допустим, мы хотим создать url с заданными параметрами, например, `https://google.com/search?query=value`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Допустим, мы хотим создать url с заданными параметрами, например, `https://google.com/search?query=value`.
Допустим, мы хотим создать URL-адрес с заданными параметрами, например, `https://google.com/search?query=value`.

Comment thread 5-network/06-url/article.md Outdated
- ...и также методы для итерации, как в объектах `Map`.

So, `URL` object also provides an easy way to operate on url parameters.
Таким образом, `URL` объект также дает возможность оперировать параметрами url.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Таким образом, `URL` объект также дает возможность оперировать параметрами url.
Таким образом, `URL` объект также дает возможность оперировать параметрами URL-адреса.

@javascript-translate-bot javascript-translate-bot added changes requested Waiting for changes and /done from PR author and removed review needed Review needed, please approve or request changes labels Jun 20, 2019
@javascript-translate-bot

Copy link
Copy Markdown
Contributor

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@OliverWall

Copy link
Copy Markdown
Contributor Author

/done

@javascript-translate-bot javascript-translate-bot added review needed Review needed, please approve or request changes and removed changes requested Waiting for changes and /done from PR author labels Jun 20, 2019
@javascript-translate-bot javascript-translate-bot requested a review from a team June 20, 2019 10:10
@iliakan

iliakan commented Jun 20, 2019

Copy link
Copy Markdown
Member

🚀

@iliakan iliakan merged commit aa6637a into javascript-tutorial:master Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs +1 One more review needed review needed Review needed, please approve or request changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants