Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions textlint/data/rules/translateGlossary.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,33 @@ module.exports = {
note: '',
},
},
{
sources: [/\busage\b/i],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
sources: [/\busage\b/i],
sources: [/\bUsage\b/],

현재 구현에서는 i 플래그를 기본적으로 추가하여 검사하고 있기 때문에, i 플래그가 없어도 괜찮을 것 같아요.

const matchIndex = text.match(new RegExp(source, 'i')); // Do not use 'g' flag with textlint's CLI 'pretty-error' option. It prevents textlint from finding the exact locations.
const match = textStripped.match(new RegExp(source, 'i'));

그리고 로직과는 상관 없지만 앞선 다른 정규표현식들이 모두 맨 첫 문자를 대문자로 표기했기에, 대문자 U로 정규식을 시작하면 더 좋을 것 같습니다.

target: '용법',
Copy link
Copy Markdown
Collaborator

@lumirlumir lumirlumir Jan 31, 2026

Choose a reason for hiding this comment

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

Suggested change
target: '용법',
target: '사용법',

#1425 (comment)

논의를 참고했을 때, 용법이 아닌 사용법이 맞는 것 같습니다.

meta: {
term: 'Usage',
discussions: [1425],
note: '',
},
},
{
sources: [/\btransitions?\b/],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
sources: [/\btransitions?\b/],
sources: [/\bTransitions?\b/],

앞선 리뷰와 동일합니다.

target: '트랜지션',
meta: {
term: 'transition',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
term: 'transition',
term: 'Transition',

discussions: [1425],
note: '',
},
},
{
sources: [/\bimperative\b/],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
sources: [/\bimperative\b/],
sources: [/\bImperative\b/],

target: '명령형',
meta: {
term: 'imperative',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
term: 'imperative',
term: 'Imperative',

discussions: [1425],
note: '',
},
},
],
},
// untranslated: {
Expand Down
3 changes: 3 additions & 0 deletions wiki/translate-glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,7 @@ Caveats|`/\bCaveats?\b/`, `/주의사항/`|주의 사항|[#1095](https://github.
Logic|`/\bLogic\b/`|로직|[#695](https://github.com/reactjs/ko.react.dev/issues/695)||
Dependency|`/\bDependenc(?:y\|ies)\b/`|의존성|[#841](https://github.com/reactjs/ko.react.dev/issues/841)||
Directive|`/\bDirectives?\b/`|지시어|[#819](https://github.com/reactjs/ko.react.dev/issues/819)||
Usage|`/\busage\b/i`|용법|[#1425](https://github.com/reactjs/ko.react.dev/issues/1425)||
transition|`/\btransitions?\b/`|트랜지션|[#1425](https://github.com/reactjs/ko.react.dev/issues/1425)||
imperative|`/\bimperative\b/`|명령형|[#1425](https://github.com/reactjs/ko.react.dev/issues/1425)||

Loading