Skip to content

Comments

#236 맵과 셋 과제 번역#257

Merged
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
JuYeong0413:map-set-task
Oct 8, 2019
Merged

#236 맵과 셋 과제 번역#257
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
JuYeong0413:map-set-task

Conversation

@JuYeong0413
Copy link
Contributor

No description provided.

```

If we ever meet a word the same letter-sorted form again, then it would overwrite the previous value with the same key in the map. So we'll always have at maximum one word per letter-form.
정렬된 글자가 같은 단어를 맵에서 다시 만나면 동일한 키로 이전 값을 덮어씁니다. 그래서 항상 글자 형태의 키 하나에 최대 한 개의 단어가 저장되는 것이죠.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

머리로는 이해가 되는데 이 부분을 매끄럽게 번역하는 게 쉽지가 않네요... 더 좋은 표현이 있으면 코멘트 부탁드리겠습니다. 😃

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
정렬된 글자가 같은 단어를 맵에서 다시 만나면 동일한 키로 이전 값을 덮어씁니다. 그래서 항상 글자 형태의 키 하나에 최대개의 단어가 저장되는 것이죠.
정렬 이후의 글자 구성이 같은 단어를 또다시 만나게 되면, 키가 동일하므로 값이 덮어씌워 집니다. 따라서 맵엔 글자 구성이 같은 단어는 단번만 저장되게 됩니다.

Copy link
Member

@Violet-Bora-Lee Violet-Bora-Lee left a comment

Choose a reason for hiding this comment

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

이해하기 쉽도록 풀어써봤어요.
의견주세요 :)

---

# Iterable keys
# 반복 가능한 키
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# 반복 가능한 키
# 반복 가능한 객체의

# 반복 가능한 키

We'd like to get an array of `map.keys()` in a variable and then do apply array-specific methods to it, e.g. `.push`.
`map.keys()`의 배열을 변수에 저장해 `.push`와 같은 배열 메서드를 적용해봅시다.
Copy link
Member

Choose a reason for hiding this comment

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

array of map.keys()map.keys()의 배열로 직역하셨는데(of 를 ~의로 번역) 사실 이러면 번역투가 되는거거든요.

사전을 읽어보시고 1,2번 뜻(의)뿐만 아니라 다른 뜻들이 많다는걸 알면서 번역해주심 좋을것같아요.

Suggested change
`map.keys()`배열을 변수에 저장해 `.push`와 같은 배열 메서드를 적용해봅시다.
`map.keys()`를 사용해 배열을 반환받고, 이 배열을 변수에 저장해 `.push`와 같은 배열 메서드를 적용하고 싶다고 해봅시다.

```

Why? How can we fix the code to make `keys.push` work?
이유가 무엇일까요? `keys.push`가 작동하기 위해 어떻게 코드를 고쳐야 할까요?
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
이유가 무엇일까요? `keys.push`작동하기 위해 어떻게 코드를 고쳐야 할까요?
이유가 무엇일까요? `keys.push`작동하게 하려면 어떻게 코드를 고쳐야 할까요?

@@ -1,7 +1,7 @@

That's because `map.keys()` returns an iterable, but not an array.
`map.keys()`가 배열이 아니라 이터러블을 반환하기 때문입니다.
Copy link
Member

Choose a reason for hiding this comment

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

대명사 That을 풀어써주면 훨씬 나은 글이 됩니다.

Suggested change
`map.keys()`가 배열이 아니라 이터러블을 반환하기 때문입니다.
`keys.push`가 동작하지 않은 이유는 `map.keys()`가 배열이 아니라 이터러블을 반환하기 때문입니다.

```

We'll use the letter-sorted variants as map keys to store only one value per each key:
각각의 키에 단 하나의 값을 저장하기 위해 정렬된 글자를 맵의 키로 사용하겠습니다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
각각의 키에 단 하나의 값을 저장하기 위해 정렬된 글자를 맵의 키로 사용하겠습니다.
알파벳 순으로 정렬된 글자를 맵의 키로 사용해, 키 하나엔 값 하나만 저장되도록 하겠습니다.

`(*)`로 표시한 줄에서 일련의 메서드 호출을 통해 해당 단어를 구성하는 글자가 정렬됩니다.

For convenience let's split it into multiple lines:
편의상 여러 줄로 나눠봅시다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
편의상 여러 줄로 나눠봅시다.
`(*)`로 표시한 줄을 여러 줄에 나눠서 작성하면 아래와 같은 코드가 됩니다.

```

Two different words `'PAN'` and `'nap'` receive the same letter-sorted form `'anp'`.
`'PAN'``'nap'`은 동일하게 `'anp'`라는 정렬된 글자 형태를 받습니다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`'PAN'``'nap'`은 동일하게 `'anp'`라는 정렬된 글자 형태를 받습니다.
`'PAN'``'nap'`은 동일하게 `'anp'`라는 글자로 정렬되죠.

```

If we ever meet a word the same letter-sorted form again, then it would overwrite the previous value with the same key in the map. So we'll always have at maximum one word per letter-form.
정렬된 글자가 같은 단어를 맵에서 다시 만나면 동일한 키로 이전 값을 덮어씁니다. 그래서 항상 글자 형태의 키 하나에 최대 한 개의 단어가 저장되는 것이죠.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
정렬된 글자가 같은 단어를 맵에서 다시 만나면 동일한 키로 이전 값을 덮어씁니다. 그래서 항상 글자 형태의 키 하나에 최대개의 단어가 저장되는 것이죠.
정렬 이후의 글자 구성이 같은 단어를 또다시 만나게 되면, 키가 동일하므로 값이 덮어씌워 집니다. 따라서 맵엔 글자 구성이 같은 단어는 단번만 저장되게 됩니다.

정렬된 글자가 같은 단어를 맵에서 다시 만나면 동일한 키로 이전 값을 덮어씁니다. 그래서 항상 글자 형태의 키 하나에 최대 한 개의 단어가 저장되는 것이죠.

At the end `Array.from(map.values())` takes an iterable over map values (we don't need keys in the result) and returns an array of them.
결과에 키는 필요하지 않기 때문에 마지막에서 `Array.from(map.values())`는 맵의 값을 순회하여 만들어진 배열을 반환합니다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
결과에 키는 필요하지 않기 때문에 마지막에서 `Array.from(map.values())`는 맵의 값을 순회하여 만들어진 배열을 반환합니다.
함수 마지막 줄의 `map.values()`는 맵의 값을 담은 반복 가능한 객체를 반환하는데, `Array.from`은 이 반복 가능한 객체를 배열로 바꿔줍니다(키는 필요하지 않기 때문에 `map.values()`를 사용함).

결과에 키는 필요하지 않기 때문에 마지막에서 `Array.from(map.values())`는 맵의 값을 순회하여 만들어진 배열을 반환합니다.

Here we could also use a plain object instead of the `Map`, because keys are strings.
키가 문자형이므로 `맵` 대신 일반적인 객체를 사용할 수도 있습니다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
키가 문자형이므로 `` 대신 일반적인 객체를 사용할 수도 있습니다.
이 문제에서 키는 문자형이므로 `` 대신 일반적인 객체를 사용할 수도 있습니다.

@javascript-translate-bot

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

@JuYeong0413
Copy link
Contributor Author

번역을 하긴 했지만 뭔가 도움이 되지 못한 느낌이...😓 번거롭게 해 드린 것 같아 죄송하고, 리뷰 감사드립니다. 다음 번역은 좀 더 발전시키도록 하겠습니다. /done

@Violet-Bora-Lee
Copy link
Member

기여해주신 덕분에 다양한 관점이 있다는걸 저도 공부하고있어서 항상 감사드립니다.
리뷰 감사합니다.
머지 진행할게요. 👍 👍 👍

@Violet-Bora-Lee Violet-Bora-Lee merged commit 4bc7fa8 into javascript-tutorial:master Oct 8, 2019
@JuYeong0413 JuYeong0413 deleted the map-set-task branch October 26, 2019 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants