Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update article.md #308

Conversation

tay-na
Copy link
Contributor

@tay-na tay-na commented Jul 15, 2019

Статью перевела. Задание пришлю завтра. Жду комментарии и пожелания по исправлениям в переводе.

Статью перевела. Задание чуть позже сегодня сделаю. Жду комментариев и пожеланий по исправлениям в переводе.
@xcurveballx
Copy link
Member

@tay-na отлично, там еще одно задание к главе, его тоже нужно перевести.

@tay-na
Copy link
Contributor Author

tay-na commented Jul 15, 2019

@xcurveballx да, я помню про задание - если вы не против, я его завтра пришлю.
Вообще немного грустно получилось, что перевод еще в 3 часа дня закончила и по своей же глупости PR не сделала. Еще учиться и учиться мне всему.

@xcurveballx
Copy link
Member

@tay-na хорошо, особой спешки нет, добавьте перевод задания позднее.

@iliakan iliakan added the review needed Review needed, please approve or request changes label Jul 16, 2019
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
2-ui/3-event-details/1-mouse-events-basics/article.md Outdated Show resolved Hide resolved
@javascript-translate-bot
Copy link
Contributor

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

@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 Jul 16, 2019
внесла изменения
@xcurveballx xcurveballx added work in progress and removed changes requested Waiting for changes and /done from PR author labels Jul 16, 2019
@xcurveballx
Copy link
Member

Ок, тогда продолжим ревью после перевода задания.


[iframe border="1" src="solution" height=180]

P.S. For this task we can assume that list items are text-only. No nested tags.
P.P.S. Prevent the native browser selection of the text on clicks.
P.S. Для этого задания можно предположить, что все элементы списка доступны только в текстовом формате. Нет вложенных тэгов.
Copy link
Member

Choose a reason for hiding this comment

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

тегов

P.S. For this task we can assume that list items are text-only. No nested tags.
P.P.S. Prevent the native browser selection of the text on clicks.
P.S. Для этого задания можно предположить, что все элементы списка доступны только в текстовом формате. Нет вложенных тэгов.
P.P.S. Предотвратите стандартное для браузера выделение текста при клике.
Copy link
Member

Choose a reason for hiding this comment

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

при кликах


- A click on a list element selects only that element (adds the class `.selected`), deselects all others.
- If a click is made with `key:Ctrl` (`key:Cmd` for Mac), then the selection is toggled on the element, but other elements are not modified.
- При клике на элемент списка выделяет только этот элемент (добавляется класс `.selected`), отменяется выделение остальных элементов.
Copy link
Member

Choose a reason for hiding this comment

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

выделяется

@javascript-translate-bot javascript-translate-bot added the changes requested Waiting for changes and /done from PR author label Jul 16, 2019
@javascript-translate-bot
Copy link
Contributor

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

@javascript-translate-bot javascript-translate-bot removed the changes requested Waiting for changes and /done from PR author label Jul 16, 2019
@javascript-translate-bot javascript-translate-bot added the needs +1 One more review needed label Jul 16, 2019
Copy link
Member

@iliakan iliakan left a comment

Choose a reason for hiding this comment

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

Спасибо! Внеси, пожалуйста, изменения.


[iframe border="1" src="solution" height=180]

P.S. For this task we can assume that list items are text-only. No nested tags.
P.P.S. Prevent the native browser selection of the text on clicks.
P.S. Для этого задания можно предположить, что все элементы списка доступны только в текстовом формате. Нет вложенных тегов.
Copy link
Member

Choose a reason for hiding this comment

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

P.S. В этом задании все элементы списка содержат только текст. Без вложенных тегов.


The most used simple events are:
Наиболее часто используются простые события:
Copy link
Member

Choose a reason for hiding this comment

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

Самые часто используемые простые события:


`click`
: Triggers after `mousedown` and then `mouseup` over the same element if the left mouse button was used.
: Вызывается при `mousedown` , а затем `mouseup` , над одним и тем же элементом, если использовалась левая кнопка мыши.
Copy link
Member

Choose a reason for hiding this comment

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

: Вызывается при mousedown , а затем mouseup над одним и тем же элементом, если использовалась левая кнопка мыши.


In most cases when Windows/Linux uses `key:Ctrl`, on Mac people use `key:Cmd`. So where a Windows user presses `key:Ctrl+Enter` or `key:Ctrl+A`, a Mac user would press `key:Cmd+Enter` or `key:Cmd+A`, and so on, most apps use `key:Cmd` instead of `key:Ctrl`.
В большинстве случаев, когда в Windows/Linux используется `key:Ctrl`, на Mac люди используют `key:Cmd`. Поэтому, когда пользователь Windows нажимает `key:Ctrl+Enter` и `key:Ctrl+A`, пользователь Mac нажимает `key:Cmd+Enter` или `key:Cmd+A`, и так далее, большинство приложений использует `key:Cmd` вместо `key:Ctrl`.
Copy link
Member

Choose a reason for hiding this comment

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

В большинстве случаев, когда в Windows/Linux используется key:Ctrl, на Mac люди используют key:Cmd. Поэтому, когда пользователь Windows нажимает key:Ctrl+Enter и key:Ctrl+A, пользователь Mac нажимает key:Cmd+Enter или key:Cmd+A, и так далее, большинство приложений используют key:Cmd вместо key:Ctrl.


Even if we'd like to force Mac users to `key:Ctrl`+click -- that's kind of difficult. The problem is: a left-click with `key:Ctrl` is interpreted as a *right-click* on Mac, and it generates the `contextmenu` event, not `click` like Windows/Linux.
Даже если мы хотим заставить людей использовать `key:Ctrl`+клик на Mac, это довольно сложно. Проблема в том, что левый клик в сочетании с `key:Ctrl` интерпретируется как *правый клик* на Mac и генерирует событие `contextmenu`, а не `click` как на Windows/Linux.
Copy link
Member

Choose a reason for hiding this comment

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

Даже если мы и хотели бы заставить людей использовать key:Ctrl+клик на Mac, это довольно сложно. Проблема в том, что левый клик в сочетании с key:Ctrl интерпретируется как правый клик на Mac и генерирует событие contextmenu, а не click как на Windows/Linux.


The text inside it is still selectable. However, the selection should start not on the text itself, but before or after it. Usually that's fine though.
Текст внутри него по прежнему можно выделить. Однако, выделение должно начаться не на самом тексте, а до него или после. Обычно это нормально.
Copy link
Member

Choose a reason for hiding this comment

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

Текст внутри него по прежнему можно выделить. Однако, выделение должно начаться не на самом тексте, а до него или после. Обычно это нормально воспринимается пользователями.

<b ondblclick="*!*getSelection().removeAllRanges()*/!*">
Double-click me
Двойной клик на мне
Copy link
Member

Choose a reason for hiding this comment

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

Сделайте двойной клик на мне

```

If you double-click on the bold element, then the selection appears and then is immediately removed. That doesn't look nice though.
При двойном клике на элементе, выделенном жирным шрифтом, выделение сначала появится, а затем будет немедленно снято. Хотя выглядит это не очень красиво.
Copy link
Member

Choose a reason for hiding this comment

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

При двойном клике на элементе, выделенном жирным шрифтом, выделение появится и тут же будет немедленно снято ("мигнёт"). Выглядит это не очень красиво.


It's also important to deal with text selection as an unwanted side-effect of clicks.
Также важно позаботиться о выделении текста, как о нежелательном побочном эффекте кликов.
Copy link
Member

Choose a reason for hiding this comment

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

Также важно позаботиться о выделении текста, оно может быть нежелательным побочным эффектом кликов.

Есть несколько способов сделать это, например:
1. CSS-свойство `user-select:none` (с префиксами для различных браузеров) полностью отключает выделение текста.
2. Отмена выделения постфактум, используя `getSelection().removeAllRanges()`.
3. Обработать событие `mousedown` и предотвратить его действие по умолчанию (обычно является лучшим решением).
Copy link
Member

Choose a reason for hiding this comment

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

Добавь плиз строку:
Впрочем, работа с выделением - это отдельная тема, раскрытая в соответствующей главе < info:selection-range >.

@javascript-translate-bot
Copy link
Contributor

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

@javascript-translate-bot javascript-translate-bot added the changes requested Waiting for changes and /done from PR author label Jul 16, 2019
@tay-na
Copy link
Contributor Author

tay-na commented Jul 17, 2019

Я внесла поправки, которые вы просили. Что-то нужно ещё изменить в переводе?

@xcurveballx xcurveballx removed the changes requested Waiting for changes and /done from PR author label Jul 17, 2019
@iliakan
Copy link
Member

iliakan commented Jul 18, 2019

В последней строчке убери плиз пробелы вокруг < ... > =)

@iliakan
Copy link
Member

iliakan commented Jul 18, 2019

Впрочем, я сам после мержа. Спасибо!

@iliakan
Copy link
Member

iliakan commented Jul 18, 2019

🚀

@javascript-translate-bot javascript-translate-bot merged commit 8278c24 into javascript-tutorial:master Jul 18, 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.

None yet

4 participants