Skip to content

[문자 클래스] 번역 PR 요청#532

Merged
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
LuiGeeDev:master
May 13, 2020
Merged

[문자 클래스] 번역 PR 요청#532
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
LuiGeeDev:master

Conversation

@LuiGeeDev
Copy link
Contributor

@LuiGeeDev LuiGeeDev commented Apr 23, 2020

Pull Request 체크리스트

TODO

  • [V] 번역 규칙을 확인하셨나요?
    • [V] 줄 바꿈과 단락을 '원문과 동일하게' 유지하셨나요?
    • [V] 맞춤법 검사기로 맞춤법을 확인하셨나요?
    • [V] 마크다운 문법에 사용되는 공백(스페이스), 큰따옴표("), 작은따옴표('), 대시(-), 백틱(`) 등의 특수문자는 그대로 두셨나요?
  • [V] 로컬 서버 세팅 후 최종 결과물을 확인해 보셨나요?
  • [V] PR 하나엔 번역문 하나만 넣으셨나요?
  • [V] 의미 있는 커밋 메시지를 작성하셨나요?
    • 예시
      • [프락시] 번역
      • [프락시] 과제 번역
      • [if문과 조건부 연산자 '?'] 리뷰
      • [주석] 2차 리뷰
      • [Date 객체와 날짜] 번역

PR 내용

9-2. 문자 클래스 번역

@CLAassistant
Copy link

CLAassistant commented Apr 23, 2020

CLA assistant check
All committers have signed the CLA.

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.

안녕하세요.
정규표현식도 번역이 어서 진행되어야 할텐데, 먼저 진행해 주심에 정말 감사의 말씀을 드립니다.

readme와 번역 모범사례를 한번 더 확인하신 후, 코멘트 참고하시어 수정 해주시면 될것같습니다.

이렇게 하려면, 숫자가 아닌 것들은 모두 찾아서 지우면 되겠죠. 문자 클래스를 여기서 사용할 수 있습니다.

A *character class* is a special notation that matches any symbol from a certain set.
*문자 클래스*는 특정 집합에 포함된 어떠한 기호에나 일치하는 특별한 표현입니다.
Copy link
Member

Choose a reason for hiding this comment

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

문자 클래스는 처음 등장하는 용어이므로 한영병기를 권유드립니다.

*문자 클래스*는 특정 집합에 포함된 어떠한 기호에나 일치하는 특별한 표현입니다.

For the start, let's explore the "digit" class. It's written as `pattern:\d` and corresponds to "any single digit".
가장 먼저 숫자 클래스부터 알아봅시다. 숫자 클래스는 `pattern:\d`라고 쓰고 "아무 숫자 하나"에 대응합니다.
Copy link
Member

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.

숫자 클래스 처음 등장하는 용어이므로 '숫자(digit)' 와 같이 한영 병기해주시기 바랍니다.

가장 먼저 숫자 클래스부터 알아봅시다. 숫자 클래스는 `pattern:\d`라고 쓰고 "아무 숫자 하나"에 대응합니다.

For instance, the let's find the first digit in the phone number:
예시로 아까 전화번호의 첫 번째 숫자를 찾아봅시다.
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
예시로 아까 전화번호의 첫 번째 숫자를 찾아봅시다.
위에서 살펴본 전화번호 예시에서 첫 번째 숫자를 찾아봅시다.

let regexp = /\d/;

alert( str.match(regexp) ); // 7
alert(str.match(regexp)); // 7
Copy link
Member

Choose a reason for hiding this comment

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

주석을 번역해야하는 경우를 제외하곤 되도록이면 코드는 건드리지 말아주세요.

```

Without the flag `pattern:g`, the regular expression only looks for the first match, that is the first digit `pattern:\d`.
`pattern:g` 플래그가 없으면 정규 표현식은 가장 처음에 일치하는 문자만 찾습니다. 여기서는 `pattern:\d`와 일치하는 첫 번째 숫자죠.
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
`pattern:g` 플래그가 없으면 정규 표현식은 가장 처음에 일치하는 문자만 찾습니다. 여기서는 `pattern:\d` 일치하는 첫 번째 숫자죠.
`pattern:g` 플래그가 없으면 정규 표현식은 패턴과 일치하는 첫 문자를 찾습니다. 여기선 `pattern:\d` 일치하는 첫 번째 숫자이죠.

let str = "+7(903)-123-45-67";

alert( str.match(/\d/g).join('') ); // 79031234567
alert(str.match(/\d/g).join("")); // 79031234567
Copy link
Member

Choose a reason for hiding this comment

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

되도록이면 소스코드는 수정하지 말아주세요.
영어 원문을 병합할 때 충돌이 일어나서 그렇습니다.

README에도 관련 사항을 명시해 놓았으니 확인부탁드립니다.


````warn header="Pay attention to spaces"
Usually we pay little attention to spaces. For us strings `subject:1-5` and `subject:1 - 5` are nearly identical.
````warn header="공백을 주의하세요"
Copy link
Member

Choose a reason for hiding this comment

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

문장으로 번역하려면 끝에 마침표를 찍어주세요.

// or we can use \s class:
alert( "1 - 5".match(/\d\s-\s\d/) ); // 1 - 5, also works
alert( "1 - 5".match(/\d - \d/) ); // 1 - 5, 이제 제대로 되네요
// \s 클래스를 사용해도 됩니다:
Copy link
Member

Choose a reason for hiding this comment

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

쌍점 번역 모범 사례 확인

- `pattern:\w` -- Latin letters, digits, underscore `'_'`.
- `pattern:\W` -- all but `pattern:\w`.
- `pattern:.` -- any character if with the regexp `'s'` flag, otherwise any except a newline `\n`.
- `pattern:\d` -- 숫자.
Copy link
Member

Choose a reason for hiding this comment

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

주술관계가 있는 문장으로 끝나지 않는 경우엔 마침표가 없어도 됩니다.

- `pattern:.` -- 정규 표현식 `'s'` 플래그가 있으면 모든 문자, 없으면 줄 바꿈 `\n`을 제외한 모든 문자.

...But that's not all!
...하지만 이게 전부는 아닙니다!
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

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

@LuiGeeDev
Copy link
Contributor Author

/done

alert( "CSS4".match(regexp) ); // CSS4
alert( "CS-4".match(regexp) ); // CS-4
alert( "CS 4".match(regexp) ); // CS 4 (space is also a character)
alert( "CS 4".match(regexp) ); // CS 4 (공백도 문자예요)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
alert( "CS 4".match(regexp) ); // CS 4 (공백도 문자예요)
alert( "CS 4".match(regexp) ); // CS 4 (공백도 문자예요.)


```js run
alert( "CS4".match(/CS.4/) ); // null, no match because there's no character for the dot
alert( "CS4".match(/CS.4/) ); // null, 점과 일치하는 문자가 없기 때문에 일치 결과가 없습니다
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
alert( "CS4".match(/CS.4/) ); // null, 점과 일치하는 문자가 없기 때문에 일치 결과가 없습니다
alert( "CS4".match(/CS.4/) ); // null, 점과 일치하는 문자가 없기 때문에 일치 결과가 없습니다.

alert( "1 - 5".match(/\d - \d/) ); // 1 - 5, now it works
// or we can use \s class:
alert( "1 - 5".match(/\d\s-\s\d/) ); // 1 - 5, also works
alert( "1 - 5".match(/\d - \d/) ); // 1 - 5, 이제 제대로 되네요
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
alert( "1 - 5".match(/\d - \d/) ); // 1 - 5, 이제 제대로 되네요
alert( "1 - 5".match(/\d - \d/) ); // 1 - 5, 이제 제대로 되네요.

alert( "1 - 5".match(/\d\s-\s\d/) ); // 1 - 5, also works
alert( "1 - 5".match(/\d - \d/) ); // 1 - 5, 이제 제대로 되네요
// \s 클래스를 사용해도 됩니다.
alert( "1 - 5".match(/\d\s-\s\d/) ); // 1 - 5, 이것도 됩니다
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
alert( "1 - 5".match(/\d\s-\s\d/) ); // 1 - 5, 이것도 됩니다
alert( "1 - 5".match(/\d\s-\s\d/) ); // 1 - 5, 이것도 됩니다.

@LuiGeeDev
Copy link
Contributor Author

/done

alert( "CS4".match(/CS.4/) ); // null, 점과 일치하는 문자가 없기 때문에 일치 결과가 없습니다.
```

### "s" 플래그와 점을 사용해 정말로 모든 문자 찾기
Copy link
Member

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.

확인 후 수정부탁드릴게요

@LuiGeeDev
Copy link
Contributor Author

/done

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.

안녕하세요.

번역 모범사례 다시한번 쭉 훑어보시고 퇴고 부탁드립니다.

쌍따옴표 관련 사항이 지켜지지 않는 문장들이 여전히 남아있고, 콤마 관련 사항들도 유의 부탁드립니다.

## 요약

There exist following character classes:
문자 클래스에는 다음 클래스들이 있습니다:
Copy link
Member

Choose a reason for hiding this comment

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

문장 끝은 마침표로 끝나야합니다. (번역 모범사례 및 README 파일 확인 요망)

실제 업무 상황을 생각해봅시다. `"+7(903)-123-45-67"`같은 전화번호에서 `79035419441`처럼 숫자만 남겨야 합니다.

To do so, we can find and remove anything that's not a number. Character classes can help with that.
이렇게 하려면, 숫자가 아닌 것들은 모두 찾아서 지우면 되겠죠. 문자 클래스를 여기서 사용할 수 있습니다.
Copy link
Member

Choose a reason for hiding this comment

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

영어의 콤마는 한국어와 그 용도가 다릅니다. (번역 모범사례 및 README 파일 확인 요망)

@javascript-translate-bot javascript-translate-bot requested a review from a team April 28, 2020 14:19
이렇게 하려면 숫자가 아닌 문자를 모두 찾아서 지우면 되겠죠. 여기서 문자 클래스를 사용할 수 있습니다.

A *character class* is a special notation that matches any symbol from a certain set.
*문자 클래스(character class)*는 특정 집합에 포함된 모든 기호에 일치하는 특별한 표현입니다.
Copy link
Member

@Violet-Bora-Lee Violet-Bora-Lee May 3, 2020

Choose a reason for hiding this comment

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

로컬 서버 구동하시어 렌더링 최종적으로 확인해주시기 바랍니다.

Suggested change
*문자 클래스(character class)*는 특정 집합에 포함된 모든 기호에 일치하는 특별한 표현입니다.
*문자 클래스(character class)* 는 특정 집합에 포함된 모든 기호에 일치하는 특별한 표현입니다.

suggestion 드린것 처럼 )* 뒤에는 한 칸 공백이 들어가야 제대로 렌더링 되더라구요.
image

````warn header="Not supported in Firefox, IE, Edge"
Check <https://caniuse.com/#search=dotall> for the most recent state of support. At the time of writing it doesn't include Firefox, IE, Edge.
````warn header="Firefox, IE, Edge에서 지원하지 않음"
<https://caniuse.com/#search=dotall>에서 지원 여부의 최신 상황을 확인해보세요. 이 글을 작성하는 시점에는 Firefox, IE, Edge에서 아직 지원하지 않고 있습니다.
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
<https://caniuse.com/#search=dotall>에서 지원 여부의 최신 상황을 확인해보세요. 이 글을 작성하는 시점에는 Firefox, IE, Edge에서 아직 지원하지 않고 있습니다.
<https://caniuse.com/#search=dotall>에서 지원 여부의 최신 상황을 확인해보세요. 이 글이 작성 된 시점에 정규 표현식의 점은 Firefox, IE, Edge에서 지원하지 않고 있습니다.

Copy link
Member

Choose a reason for hiding this comment

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

번역 모범사례의 대명사 관련한 부분을 살펴봐주세요.
문장에 주어가 없어서 매끄럽지 않게 읽힙니다.

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.

고생 많으셨습니다!
코멘트 달아놓은 것들 해결되고,
커밋 하나로 합쳐주시면 바로 머지 진행하겠습니다 :)

@javascript-translate-bot

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

@Violet-Bora-Lee
Copy link
Member

image

Pull Request 체크리스트도 마크다운 수정해주세요.

@LuiGeeDev
Copy link
Contributor Author

/done

@Violet-Bora-Lee
Copy link
Member

컨플릭 해결해주시고, 커밋 하나로 합쳐주시면 머지 진행하겠습니다.
오랜시간 작업해주시느라 고생하셨습니다. 감사합니다 👍

@LuiGeeDev
Copy link
Contributor Author

처음이라 미숙한데 계속 도와주셔서 감사합니다 /done

@Violet-Bora-Lee
Copy link
Member

Conflict가 발생하여 머지가 불가능합니다.
rebase등을 사용하시어 소스를 최신상태로 유지해주세요.

@LuiGeeDev
Copy link
Contributor Author

/done

@Violet-Bora-Lee
Copy link
Member

고생 많으셨습니다.
머지 진행하겠습니다 👍

@Violet-Bora-Lee Violet-Bora-Lee merged commit 3439745 into javascript-tutorial:master May 13, 2020
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.

5 participants