Skip to content

Conversation

@Croftyland
Copy link
Collaborator

No description provided.

@Croftyland Croftyland requested a review from AMashoshyna January 5, 2021 16:00
@Croftyland Croftyland changed the title complete translation scopes-closures/ch2 translation Jan 5, 2021
Copy link
Member

@AMashoshyna AMashoshyna left a comment

Choose a reason for hiding this comment

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

Awesome work! Please see my comments below. Also, please check formatting of code pieces in text: in many places there are redundant white spaces not present in initial text, like so: getStudentName (..)

Згадаємо свій шкільний математичний клас: недостатньо отримати правильну відповідь без наявності ходу власних думок! У нашому випадку потрібно будувати точні та корисні розумові моделі,щоб рухатись вперед.

## Marbles, and Buckets, and Bubbles... Oh My!
Цей розділ проілюструє _області видимості_ кількома метафорами. Головна мета:_обдумати_ як обробляється ваша програма за допомогою рушія JS таким чином, щоб ближче відповідати тому, як насправді працює рушій JS.
Copy link
Member

Choose a reason for hiding this comment

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

I think the idea here is that our thinking about the programs must be more alike to how the engine actually treats them. I'm referring to "щоб ближче відповідати тому": what is phrase related to?

Цей розділ проілюструє _області видимості_ кількома метафорами. Головна мета:_обдумати_ як обробляється ваша програма за допомогою рушія JS таким чином, щоб ближче відповідати тому, як насправді працює рушій JS.

One metaphor I've found effective in understanding scope is sorting colored marbles into buckets of their matching color.
## Кульки, і Відра, і Оболонки ... Ой, лишенько!
Copy link
Member

Choose a reason for hiding this comment

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

Why uppercase?

Щоб _зрозуміти_ наші програми, важливо мати чітке уявлення того, як працює область видимості. Якщо ми покладатимемось тільки на здогадки та інтуїцію, ми можемо випадково отримати правильні відповіді, але зрештою так не відбувається. Це не наш рецепт успіху.

This chapter will illustrate *scope* with several metaphors. The goal here is to *think* about how your program is handled by the JS engine in ways that more closely align with how the JS engine actually works.
Згадаємо свій шкільний математичний клас: недостатньо отримати правильну відповідь без наявності ходу власних думок! У нашому випадку потрібно будувати точні та корисні розумові моделі,щоб рухатись вперед.
Copy link
Member

Choose a reason for hiding this comment

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

missing whitespace: "моделі,щоб "

Якщо змінна є _початковою_, невирішений пошук ідентифікатора вважається незадекларованою (невідомою, відсутнею) змінною, що завжди призводить до "ReferenceError". Крім того, якщо змінна є _цільовою_, а код на той момент працює в строгому режимі, змінна вважається незадекларованою і аналогічно видає `ReferenceError`.

The error message for an undeclared variable condition, in most JS environments, will look like, "Reference Error: XYZ is not defined." The phrase "not defined" seems almost identical to the word "undefined," as far as the English language goes. But these two are very different in JS, and this error message unfortunately creates a persistent confusion.
Повідомлення про помилку для незадекларованої умови змінної у більшості середовищ JS буде виглядати так: "Помилка посилання: XYZ не визначено". Фраза "не визначено" здається майже ідентичною слову "невизначений", що стосується англійської мови. Але ці двоє дуже різні в JS, і це повідомлення про помилку, на жаль, створює стійке непорозуміння.
Copy link
Member

Choose a reason for hiding this comment

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

I would leave the error text untranslated or translated in parentheses additionally to English text

Цей розділ проілюструє _області видимості_ кількома метафорами. Головна мета:_обдумати_ як обробляється ваша програма за допомогою рушія JS таким чином, щоб ближче відповідати тому, як насправді працює рушій JS.

One metaphor I've found effective in understanding scope is sorting colored marbles into buckets of their matching color.
## Кульки, і Відра, і Оболонки ... Ой, лишенько!
Copy link
Member

Choose a reason for hiding this comment

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

How about "кошик"? I know it's not and exact translation of "bucket", but "Відра" as a metaphor sound unclear in Ukrainian

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like it, it sounds much better

Copy link
Contributor

Choose a reason for hiding this comment

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

In this case (use word "кошик") I propose to change translation in Book 1 as well (вiдерця -> кошики) to be more consistent.

Croftyland and others added 8 commits January 23, 2021 21:19
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Co-authored-by: Anastasiya Mashoshyna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants