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

[ko] with 문서 신규 번역 #22055

Merged
merged 2 commits into from
Jul 1, 2024
Merged

Conversation

witch-factory
Copy link
Contributor

Description

deprecated된 명령문이기는 하지만 기존에 한국어로 존재하지 않던 문서 with을 신규 번역하였습니다.

Motivation

Additional details

Related issues and pull requests

@witch-factory witch-factory requested a review from a team as a code owner June 28, 2024 12:19
@witch-factory witch-factory requested review from 1ilsang and removed request for a team June 28, 2024 12:19
@github-actions github-actions bot added the l10n-ko Issues related to Korean content. label Jun 28, 2024
Copy link
Contributor

github-actions bot commented Jun 28, 2024

Preview URLs

Flaws (5)

URL: /ko/docs/Web/JavaScript/Reference/Statements/with
Title: with
Flaw count: 5

  • macros:
    • /ko/docs/Web/JavaScript/Guide/Using_classes does not exist but fell back to /en-US/docs/Web/JavaScript/Guide/Using_classes
    • /ko/docs/Web/JavaScript/Guide/Meta_programming does not exist but fell back to /en-US/docs/Web/JavaScript/Guide/Meta_programming
    • /ko/docs/Web/JavaScript/Reference/Lexical_grammar does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Lexical_grammar
    • /ko/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features
    • /ko/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables

(comment last updated: 2024-07-01 14:46:37)

@wisedog
Copy link
Contributor

wisedog commented Jun 29, 2024

@1ilsang 이 PR 린트 돌다 만것 같은데 원인이 뭘까요?

@1ilsang
Copy link
Member

1ilsang commented Jun 29, 2024

@wisedog

현재는 린트가 깨진 것으로 보이는데요, 이 부분을 질문 주신 게 맞을까요?

제가 이전에 잠깐 봤을 때 린트 자체가 실행되지 않은 것 같았는데 이 부분을 질문 주신 걸까요?

@witch-factory
Copy link
Contributor Author

witch-factory commented Jun 29, 2024

Preview URL에서 확인해 보았을 때 최상단의 {{jsSidebar("Statements")}}와 맨 밑의 같이 보기 항목의 {{jsxref("Symbol.unscopables")}}(번역 문서가 없는 문서로 연결)에서 문제가 생겨서 린트가 돌지 않는 것 같습니다.

영문 문서 원본에서는 {{jsSidebar("Statements")}}를 사용하고 있지만 다른 번역 문서에서는 jsSidebar 대신 {{JSRef}}를 사용하고 또한 같이 보기 항목 문서로의 링크를 직접 걸고 있는 듯 한데, 그렇게 수정하면 어떨까요?

@witch-factory
Copy link
Contributor Author

witch-factory commented Jun 30, 2024

다시 확인해 보았더니 제가 생각한 게 아니었고 {{jsSidebar("Statements")}}를 쓴 다른 번역 문서도 많네요. 린트를 다시 실행시킬 방법이 없을까요?

@wisedog
Copy link
Contributor

wisedog commented Jun 30, 2024

다시 확인해 보았더니 제가 생각한 게 아니었고 {{jsSidebar("Statements")}}를 쓴 다른 번역 문서도 많네요. 린트를 다시 실행시킬 방법이 없을까요?

해당 브랜치에 추가 커밋하면 아마 린트가 다시 실행될겁니다.

@witch-factory
Copy link
Contributor Author

감사합니다! 다시 커밋하였습니다.

Copy link
Member

@1ilsang 1ilsang left a comment

Choose a reason for hiding this comment

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

@witch-factory 님 안녕하세요. 기여해주셔서 감사합니다! 💯

몇 가지 코멘트 남겨두었습니다.

확인하시고 다시 리뷰 요청 부탁드리겠습니다. 🙇

질문이나 도움이 필요하시다면 언제든 멘션 부탁드리겠습니다.

title: with
slug: Web/JavaScript/Reference/Statements/with
l10n:
sourceCommit: 38361b921514fe10258f5c44a4a0563b917859cd
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
sourceCommit: 38361b921514fe10258f5c44a4a0563b917859cd
sourceCommit: fb85334ffa4a2c88d209b1074909bee0e0abd57a

sourceCommit이 잘못된 것 같은데요, 해당 커밋이 맞을까요?

이 파일의 최신 커밋은 fb85334ffa4a2c88d209b1074909bee0e0abd57a입니다.

}
```

## 명세
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
## 명세
## 명세서

문서의 통일성을 위해 용어를 맞추고 있습니다.

용어집은 Glossary guide에서 확인할 수 있습니다.

Comment on lines 133 to 134

---보는중
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
---보는중

원문과 다른 내용은 삭제해 주세요.


`with`문은 문의 스코프 체인을 확장합니다.

## 문법
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
## 문법
## 구문

문서의 통일성을 위해 용어를 맞추고 있습니다.

용어집은 Glossary guide에서 확인할 수 있습니다.

console.log(globalThis.Math === Math); // true
```

`with` 문은 문의 본문이 평가되는 동안 주어진 객체를 스코프 체인의 맨 앞에 추가한다. 모든 제한되지 않은 이름은 상위 스코프 체인을 검색하기 전에 먼저 주어진 객체 내에서 ([in](/ko/docs/Web/JavaScript/Reference/Operators/in)으로 확인하여) 검색됩니다.
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
`with` 문은 문의 본문이 평가되는 동안 주어진 객체를 스코프 체인의 맨 앞에 추가한다. 모든 제한되지 않은 이름은 상위 스코프 체인을 검색하기 전에 먼저 주어진 객체 내에서 ([in](/ko/docs/Web/JavaScript/Reference/Operators/in)으로 확인하여) 검색됩니다.
`with` 문은 문의 본문이 평가되는 동안 주어진 객체를 스코프 체인의 맨 앞에 추가합니다. 모든 제한되지 않은 이름은 상위 스코프 체인을 검색하기 전에 먼저 주어진 객체 내에서 ([in](/ko/docs/Web/JavaScript/Reference/Operators/in)으로 확인하여) 검색됩니다.
Comment on lines 79 to 85
```js
function f(foo, values) {
with (foo) {
console.log(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
```js
function f(foo, values) {
with (foo) {
console.log(values);
}
}
```
```js
function f(foo, values) {
with (foo) {
console.log(values);
}
}
```
image

원문과 형태를 동일하게 유지해 주세요. 들여쓰기가 빠져있습니다.

}
```

ECMAScript 5 환경에서 `f([1, 2, 3], obj)`를 호출하면, `with` 문 내의 `values` 참조는 `obj`로 이행됩니다. 그러나 ECMAScript 2015는 Array.prototype에 [values](/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/values) 속성을 도입합니다(따라서 모든 배열에서 `values` 속성을 사용할 수 있게 됩니다). 따라서 환경을 업그레이드하면 `with` 문 내의 `values` 참조는 `[1, 2, 3].values`로 이행되며, 이는 버그를 일으킬 가능성이 큽니다. 이 특정 예제에서는 `values`가 [Array.prototype[@@unscopables]](/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/@@unscopables)에 의해 스코프에 포함되지 않도록 정의되어 있어 해당 코드의 `values`는 여전히 `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
ECMAScript 5 환경에서 `f([1, 2, 3], obj)`를 호출하면, `with` 문 내의 `values` 참조는 `obj`로 이행됩니다. 그러나 ECMAScript 2015는 Array.prototype에 [values](/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/values) 속성을 도입합니다(따라서 모든 배열에서 `values` 속성을 사용할 수 있게 됩니다). 따라서 환경을 업그레이드하면 `with` 문 내의 `values` 참조는 `[1, 2, 3].values`로 이행되며, 이는 버그를 일으킬 가능성이 큽니다. 이 특정 예제에서는 `values`[Array.prototype[@@unscopables]](/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/@@unscopables)에 의해 스코프에 포함되지 않도록 정의되어 있어 해당 코드의 `values`는 여전히 `values` 매개변수로 올바르게 이행됩니다. 만약 스코프에 포함되지 않도록 정의되지 않았다면, 이는 디버깅하기 어려운 문제가 될 수 있습니다.
ECMAScript 5 환경에서 `f([1, 2, 3], obj)`를 호출하면, `with` 문 내의 `values` 참조는 `obj`로 이행됩니다. 그러나 ECMAScript 2015는 `Array.prototype`[`values`](/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/values) 속성을 도입합니다(따라서 모든 배열에서 `values` 속성을 사용할 수 있게 됩니다). 따라서 환경을 업그레이드하면 `with` 문 내의 `values` 참조는 `[1, 2, 3].values`로 이행되며, 이는 버그를 일으킬 가능성이 큽니다.
이 특정 예제에서는 `values`[`Array.prototype[@@unscopables]`](/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/@@unscopables)에 의해 스코프에 포함되지 않도록 정의되어 있어 해당 코드의 `values`는 여전히 `values` 매개변수로 올바르게 이행됩니다. 만약 스코프에 포함되지 않도록 정의되지 않았다면, 이는 디버깅하기 어려운 문제가 될 수 있습니다.
  1. 줄 수는 원본과 동일하게 해주세요. 관련 논의는 여기에서 확인할 수 있습니다.
  2. 원문과 형태를 동일하게 유지해 주세요. ` 백틱이 빠져있습니다.
@witch-factory
Copy link
Contributor Author

witch-factory commented Jul 1, 2024

@1ilsang 안녕하세요. ���뷰해 주신 부분들을 반영하였습니다. 확인 부탁드립니다. 그리고 unscopables를 "스코프 지정 불가능"으로 변경하였습니다.

스코프 지정 불가능이라는 번역은 Array.prototype[@@unscopables]에서 unscopable을 "범위 지정 불가능"으로 번역하고 있는 걸 참고하였습니다. 용어 안내서에서는 scope를 범위로 번역하고 있으나, 이 글에서는 다른 부분에서 "스코프 체인"이라는 단어가 반복적으로 쓰이는데 다른 문서에서도 이를 스코프 체인으로 번역한 문서가 많아 범위 체인과 같이 변경하는 것은 어색하다고 보였습니다.

그래서 일단 스코프 쪽으로 통일하였는데 용어 가이드를 따라 scope를 범위로 일괄적으로 번역하거나 scope chain을 스코프 체인으로, unscopable은 범위 지정 불가능으로 하는 등 다른 방식이 낫다면 그대로 반영하겠습니다. 감사합니다.

Copy link
Member

@1ilsang 1ilsang left a comment

Choose a reason for hiding this comment

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

@witch-factory

단일 문서 내의 용어를 통일하는 것이 더 좋다고 느낍니다. 따라서 "스코프 체인 / 스코프 지정 불가능"으로 번역되어도 문제없어 보입니다.

LGTM 고생하셨습니다. 👍

@1ilsang 1ilsang merged commit 564d1e5 into mdn:main Jul 1, 2024
7 checks passed
@witch-factory witch-factory deleted the ko-with-statement branch July 1, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-ko Issues related to Korean content.
3 participants